Download the PHP package synolia/sylius-maintenance-plugin without Composer
On this page you can find all versions of the php package synolia/sylius-maintenance-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download synolia/sylius-maintenance-plugin
More information about synolia/sylius-maintenance-plugin
Files in synolia/sylius-maintenance-plugin
Package sylius-maintenance-plugin
Short Description Plugin for Sylius when your website is under maintenance
License EUPL-1.2
Informations about the package sylius-maintenance-plugin
Sylius Maintenance Plugin
Features
When your website is under maintenance, and you want to :
- Do not allow access to your website and display the message "the website is under maintenance" on the frontpage.
- Allow access to your website to some Ips addresses or secret token
- Activate and deactivate these behaviors by commands
- Activate and deactivate behaviors in your Sylius Back-office
- Custom your message in your Sylius Back-office
- Allow access to search bots to avoid negative impact on SEO
Requirements
Version | |
---|---|
PHP | ^8.0 |
Sylius | ^1.10 |
Installation
-
Add the bundle and dependencies in your composer.json :
-
Import required config in your
config/packages/_sylius.yaml
file: -
Import routing in your
config/routes.yaml
file: - Clear cache
Usage
- To turn your website under maintenance, please create a file maintenance.yaml at the root of your project.
- If you want to allow access for some Ips, please add these Ip into maintenance.yaml
For example :
You can turn your website under maintenance by console commands :
-
Enable the plugin
-
Enable the plugin and add one or multiple ips addresses separated with a space
-
Disable the plugin
-
Remove configuration file using CLI
By default, maintenance.yaml configuration file remains when running
maintenance:disable
or via admin panel using toggle disable Nevertheless passing option[-c|--clear]
to command line above will reset previous saved configuration
You can also turn your website under maintenance in Back Office :
- Enable/disable the plugin
- Allow access for one or multiple ips addresses (optional)
- Allow access for secret token (optional)
- Create your custom message (optional)
- Grant access to search bots during maintenance (optional)
If you want to put the maintenance.yaml in a directory, please add your directory in .env:
For example :
If you want to add cache on the maintenance.yaml:
And in project code (for exemple with redis)
Development
See How to contribute.
License
This library is under the EUPL-1.2 license.
Credits
Developed by Synolia.
All versions of sylius-maintenance-plugin with dependencies
jaybizzle/crawler-detect Version ^1.2
sylius/sylius Version ^1.10
webmozart/assert Version ^1.11