[ticket/17616] Add simple maintenance page without autoloader, sessions, etc.#6933
[ticket/17616] Add simple maintenance page without autoloader, sessions, etc.#6933marc1706 wants to merge 18 commits intophpbb:masterfrom
Conversation
PHPBB-17616
PHPBB-17616
PHPBB-17616
|
Documentation: |
Usually I'd be all for this but the point of this is to rely on as little as possible files from phpBB. Hence no extra HTML file or using sessions, config, template system, etc. |
|
@marc1706: It will be nice! |
PHPBB-17616
There was a problem hiding this comment.
Pull request overview
Adds a static, lightweight maintenance page intended to be served during updates (via a lock file) without needing Composer autoloading, sessions, etc.
Changes:
- Adds a new maintenance page template and stylesheet and exports them into a static lock file (
store/UPDATE_LOCK.*). - Adds a
maintenance_generatorservice to generate the lock file content with localized strings and optional social links. - Adds early startup handling to serve the maintenance page (HTTP 503) when the lock file exists.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| phpBB/styles/all/theme/maintenance.css | New CSS for the maintenance page layout and links section. |
| phpBB/styles/all/template/maintenance_page.html | New Twig template for the maintenance page (inline CSS + small JS for localization/time). |
| phpBB/phpbb/update/maintenance_generator.php | New generator that renders the template and writes a lock file into store/. |
| phpBB/language/en/common.php | Adds new language keys for maintenance title/message/start time. |
| phpBB/includes/startup.php | Adds early maintenance-mode detection and response handling before autoloading. |
| phpBB/develop/maintenance_preview.php | Dev-only preview script to generate and display the maintenance page. |
| phpBB/config/default/container/services_updater.yml | Registers update.maintenance_generator in DI container. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
PHPBB-17616
PHPBB-17616
PHPBB-17616
PHPBB-17616
PHPBB-17616
| * @return void | ||
| * @throws ExceptionInterface If writing of maintenance lock file fails | ||
| */ | ||
| public function write_maintenance_lock(array $social_links = []): void |
There was a problem hiding this comment.
I would add also a method to delete the maintenance lock using this service to have all the logic for handling maintenance here
There was a problem hiding this comment.
delete_maintenance_lock
and a static methods maintenance_lock_exist and read_maintenance_lock to be able to call the methods before initialize DI.
Also move all the references to the lock file here. There is a lot of references to the file

Replaces #6932
It is possible to test the maintenance page by commenting out the
die()in the develop script and navigating to it. This script will remove the lock file again at the end. In order to test the behavior of the maintenance page disabling the normal board, one can also uncomment the unlink to keep the UPDATE_LOCK.php in place.Checklist:
Tracker ticket:
https://tracker.phpbb.com/browse/PHPBB-17616