From 76a2490b2bd6df4c04fdcd73ec004240abd2fc06 Mon Sep 17 00:00:00 2001 From: Kamil Madejski Date: Wed, 18 Nov 2020 13:29:17 +0100 Subject: [PATCH] Ibexa DXP compatibility --- README.md | 16 +++++++--------- composer.json | 13 +++++++++---- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 16f4dc5..661066b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# eZ Platform Maintenance Mode Bundle -This eZ Platform v2.5+ bundle provides a simple way to switch the whole site or selected SiteAccess to maintenance mode. +# Ibexa DXP Maintenance Mode Bundle +This Ibexa DXP v3.x+ bundle provides a simple way to switch the whole site or selected SiteAccess to maintenance mode. In this mode the site (or particular SiteAccess) will not be available for the end-users. Selected template is displayed instead. @@ -10,12 +10,10 @@ In this mode the site (or particular SiteAccess) will not be available for the e composer require kmadejski/ezplatform-maintenance-mode ``` -- Enable the bundle in your `app/AppKernel.php` file: +- If you do not use Symfony Flex, you have to enable the bundle manually in your `config/bundles.php` file: ```php - $bundles = [ - ... - new EzSystems\EzPlatformMaintenanceModeBundle\EzSystemsEzPlatformMaintenanceModeBundle(), - ]; + ... + EzSystems\EzPlatformMaintenanceModeBundle\EzSystemsEzPlatformMaintenanceModeBundle::class => ['all' => true] ``` - Clear application cache: @@ -27,7 +25,7 @@ php bin/console cache:clear --env=prod Bundles configuratiton is SiteAccess-aware, therefore all options are configurable in `ezplatform.yml` under `default` SiteAccess configuration key (if you want to switch the whole site into maintenance mode) or under selected SiteAccess: ```yaml -ezpublish: +ezplatform: system: default: maintenance_mode: @@ -36,7 +34,7 @@ ezpublish: By default `503` HTTP response code is returned and a default template `@EzSystemsEzPlatformMaintenanceMode/maintenance.html.twig` is rendered. No IP addresses are allowed to visit the page. To modify this behaviour you can add an additional configuration as following example presents: ```yaml -ezpublish: +ezplatformgs: system: default: maintenance_mode: diff --git a/composer.json b/composer.json index bdc55e9..7183552 100644 --- a/composer.json +++ b/composer.json @@ -1,19 +1,24 @@ { "name": "kmadejski/ezplatform-maintenance-mode", - "description": "Maintenance mode bundle for eZ Platform v2.5+", + "description": "Maintenance mode bundle for Ibexa DXP v2.5+", "license": "GPL-2.0-only", "type": "ezplatform-bundle", "homepage": "https://github.com/kmadejski/ezplatform-maintenance-mode", "authors": [ { - "name": "eZ Systems | Kamil Madejski", + "name": "Kamil Madejski", "email": "kamil.madejski@ez.no" } ], "prefer-stable": true, "require": { - "php": "^7.1", - "ezsystems/ezpublish-kernel": "^7.5" + "php": "^7.3", + "ezsystems/ezplatform-kernel": "^1.2", + "symfony/dependency-injection": "^5.1", + "symfony/config": "^5.1", + "symfony/event-dispatcher": "^5.1", + "symfony/http-foundation": "^5.1", + "symfony/http-kernel": "^5.1" }, "require-dev": { "phpunit/phpunit": "^7.2.5",