- No breaking API changes for existing callers.
MaintenanceController::check(),Filters\Maintenance,Libraries\MaintenanceStorage, and themm:*commands keep their public signatures. - New layered architecture with
MaintenanceService,Storage\*,IpChecker, and theMaintenanceDataDTO. See architecture.md. - Config-level deprecations (still honoured, will be removed in v4).
| Before | After | Why |
|---|---|---|
$config->useCache = true; |
$config->driver = 'cache'; |
Explicit driver picker, future-proof. |
IpUtils::checkIp(...) |
(new IpChecker())->checkIp(...) |
Testable, bounded cache. |
| Setting cookie value to the cookie's name | Reissue with mm:up && mm:down; use the printed cookie_value |
Cookie bypass now requires the high-entropy random value. |
If you upgrade from v2.x:
- CI was not running if your default branch was
master. The workflow triggered only onmain. Re-tag and re-run after merging to ensure CI actually exercises your branch. - Cookie bypass was effectively unusable. Before v3 it required the
cookie's value to equal its name, which is undocumented and almost
certainly never worked for anyone in practice. After v3 the bypass uses a
32-byte random value generated at
mm:downtime. Operators who relied on cookie bypass will need to re-issue cookies after upgrading. - Secret bypass was timing-attackable (
===comparison). Now useshash_equals()with a non-empty guard. No action needed; this is a silent improvement. - File-backed storage could corrupt under concurrent writes. Now atomic
via
flock(). No action needed.
composer require daycry/maintenancemodenow also autoloads the globalmaintenance()helper. If you have a function calledmaintenance()in your project already, rename one of them.Config\Maintenancehas a new property?string $driver. Nothing breaks if you leave itnull, but you'll get a@deprecatednotice onuseCacheif PHPStan or Psalm runs over your config.mm:statusno longer issues an outbound HTTP request to detect your public IP unless you pass--show-public-ip. Old behaviour was: blocking call with no timeout, swallowed errors.
Sprint 3 (planned) brings JSON responses, scheduled windows, multi-tenant isolation, and a database driver. They're additive — v3.0 won't have them yet, v3.1+ will.
See git history. v2 introduced the cache driver and the legacy $useCache
flag. v3 deprecates that flag in favour of $driver.