in-sys / symfony-maintenance-bundle
This bundle allows you to place your website in maintenance mode by calling two commands from your console. Symfony 6.4 / 7
Package info
github.com/in-sys/symfony-maintenance-bundle
Type:symfony-bundle
pkg:composer/in-sys/symfony-maintenance-bundle
Requires
- php: ^8.1
- symfony/console: ^6.4||^7.0
- symfony/framework-bundle: ^6.4||^7.0
- symfony/translation: ^6.4||^7.0
- symfony/translation-contracts: ^3.0
Requires (Dev)
- doctrine/dbal: ^3.6||^4.0
- doctrine/orm: ^2.14||^3.0
- phpstan/phpstan: ^2.0
- phpstan/phpstan-symfony: ^2.0
- phpunit/phpunit: ^10.0||^11.0
README
This bundle allows you to place your website in maintenance mode by calling two commands in your console. A page with status code 503 appears to users, it is possible to authorize certain ips addresses stored in your configuration
Several choices of maintenance mode are possible: a simple test of an existing file, or memcache, or in a database.
Documentation
For installation and how to use the bundle refer to Resources/doc/index.md
Local testing
This repository includes a Docker-based local environment for running Composer, PHPUnit, and PHPStan without installing PHP on your host.
Build the image:
make docker-build
Install dependencies for the default Symfony constraint (6.4.*):
make composer-install
Update dependencies explicitly when you want to refresh the resolved versions:
make composer-update
Run the test suite:
make test
Run PHPStan:
make phpstan
Switch Symfony or PHP version when needed:
SYMFONY_REQUIRE=7.4.* make test
PHP_VERSION=8.5 make docker-build