Download the PHP package jontsa/maintenance-bundle without Composer
On this page you can find all versions of the php package jontsa/maintenance-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jontsa/maintenance-bundle
More information about jontsa/maintenance-bundle
Files in jontsa/maintenance-bundle
Package maintenance-bundle
Short Description Symfony bundle to put your site in to maintenance mode.
License MIT
Informations about the package maintenance-bundle
Symfony maintenance mode bundle
A small bundle for Symfony 4/5 which provides commands to put your application in maintenance break during which
all requests receive HTTP 503 response. This is done by throwing ServiceUnavailableHttpException
and clients
will receive either default Symfony error page or JSON message with correct HTTP status code.
Features
- Put your site to maintenance mode with single command
- Responds with HTTP 503 to requests during maintenance
- Optional IP-address whitelist. For example to allow access for load balancer health checks during maintenance.
- Lightweight bundle
- Recipes for Deployer
Requirements
- Symfony 5+
- PHP 7.4+
- composer
Installation
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
Open a command console, enter your project directory and execute:
Applications not using Symfony Flex
When not using Symfony Flex, you need to enable the bundle by adding it
to the list of registered bundles in the config/bundles.php
file of your project:
Usage
To put your site under maintenance mode
To disable maintenance mode
Configuration
To change default settings, create a configuration file.
ip
is an array of IP-addresses or networks which are allowed to access applications even during maintenancelock_path
is the file path which is created during maintenance
Custom error page
If you want to customize the error page, check out Symfony documentation.
All versions of maintenance-bundle with dependencies
symfony/http-kernel Version ^6.0|^7.0
symfony/console Version ^6.0|^7.0
symfony/config Version ^6.0|^7.0
symfony/dependency-injection Version ^6.0|^7.0