Download the PHP package 2chain/pimcore-advanced-maintenance-mode without Composer

On this page you can find all versions of the php package 2chain/pimcore-advanced-maintenance-mode. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pimcore-advanced-maintenance-mode

Pimcore Advanced Maintenance Mode

Latest Stable Version CI Coverage

Pimcore bundle that extends Pimcore's built-in maintenance mode with rule-based exemptions (HTTP routes, CLI commands, IP/CIDR, PHP attributes), ergonomic improvements (Retry-After header, activation reason, admin-session bypass, debug command), and a full set of operational features: scheduled windows, TTL safety net, pre-announce countdown banner, post-maintenance health checks, selective scope, and a Pimcore admin dashboard.

Package 2chain/pimcore-advanced-maintenance-mode
PHP namespace TwoChain\PimcoreAdvancedMaintenanceModeBundle\
Bundle class TwoChain\PimcoreAdvancedMaintenanceModeBundle\PimcoreAdvancedMaintenanceModeBundle
Pimcore ^11.0 \|\| ^12.0
Symfony ^6.4 \|\| ^7.0
License GPL-3.0-or-later

Features

Feature Summary Doc
Core exemptions Rule-based bypass for HTTP routes, CLI commands, and IPs. PHP attribute, YAML, and env-var sources merge additively. Retry-After + reason headers. Admin-session bypass. debug command. docs/features/core-exemptions.md
Scheduled windows One-time and recurring cron-based windows enforced by a Pimcore maintenance task. Overlap detection, dry-run, queue on manual block. Public status endpoint. Self-test doctor command. docs/features/scheduled-windows.md
Heartbeat / TTL Attach a TTL to any manual activation — auto-deactivates on expiry. heartbeat command for deploy scripts. Pre-expiry WARNING log. docs/features/heartbeat-ttl.md
Pre-announce banner Live-countdown banner on every HTML page before maintenance starts. Colour-escalating, dismissible, zero template changes. Email and webhook notifications at every lifecycle event. docs/features/pre-announce-banner.md
Admin dashboard Pimcore admin panel (Tools menu): upcoming schedule grid, execution history, status strip, exemptions panel, create/clone/delete/end-now, start-page portlet. docs/features/admin-dashboard.md
Health checks Post-deactivation checks (HTTP GET, DB ping, console command). Retries up to 3×; re-enters maintenance automatically on exhaustion. docs/features/health-checks.md
Selective maintenance Scope maintenance to URL path prefixes and/or Pimcore site IDs. Out-of-scope requests pass through normally. docs/features/selective-maintenance.md

Why

Out of the box, Pimcore's maintenance mode is all-or-nothing: every CLI command needs --ignore-maintenance-mode, every HTTP request gets a 503 unless it comes from 127.0.0.1 or the activator's session. Cron jobs, partner webhooks, and health checks should keep running. This bundle lets you declare those exceptions once and forget about them.

Install

Enable the bundle in your host project (config/bundles.php):

No database migration. No Pimcore admin permissions. No assets to install.

Configure

config/packages/two_chain_advanced_maintenance_mode.yaml:

You can also exempt routes / commands by attribute:

Or via environment variables for incident-response overrides:

All three sources merge additively. Env can only add rules, never remove a YAML rule.

Use

Enable maintenance mode with a reason:

Disable:

Inspect / simulate (read-only):

Built-in defaults

Three rule groups are baked in (toggle via builtin_exemptions):

Group What Why
bundle_own_commands pimcore:advanced-maintenance:* The disable command must work while mode is on.
symfony_info_commands help, list, _complete, completion, about Read-only introspection — keep the CLI usable.
loopback 127.0.0.1 + ::1 Matches Pimcore's hardcoded IPv4 loopback, adds IPv6.

Observability

When an HTTP request bypasses maintenance mode:

When the 503 is served:

When a CLI command bypasses:

How it works

The bundle registers a high-priority kernel.request listener (priority 127, between SessionListener at 128 and Pimcore's MaintenancePageListener at 126). When maintenance mode is active and an exemption rule matches, the listener sets a request attribute _advanced_maintenance_match.

A second piece — RequestAwareMaintenanceModeHelper, a decorator over Pimcore's MaintenanceModeHelperInterface — checks for that attribute on every isActive() call. If present, it returns false, which causes Pimcore's own MaintenancePageListener to skip the 503. Downstream listeners (RouterListener, the firewall) then run as if maintenance mode were off, and the request reaches the controller normally.

A kernel.response listener attaches the X-Maintenance-Bypass / X-Maintenance-Reason / Retry-After headers based on the request attributes.

For CLI: ConsoleExemptionListener at priority 100 flips the --ignore-maintenance-mode input option when a command matches an exemption rule. Pimcore's existing CLI gate at priority 0 then sees the flag and passes the command through.

Limitations

Twig integration

For custom maintenance templates:

Further reading

Each feature has a dedicated doc under docs/features/ with full configuration reference, command examples, and integration notes.


All versions of pimcore-advanced-maintenance-mode with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
pimcore/pimcore Version ^11.0 || ^12.0
symfony/config Version ^6.4 || ^7.0
symfony/console Version ^6.4 || ^7.0
symfony/dependency-injection Version ^6.4 || ^7.0
symfony/event-dispatcher Version ^6.4 || ^7.0
symfony/http-foundation Version ^6.4 || ^7.0
symfony/http-kernel Version ^6.4 || ^7.0
symfony/routing Version ^6.4 || ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package 2chain/pimcore-advanced-maintenance-mode contains the following files

Loading the files please wait ...