Skip to content

Commit

Permalink
Merge pull request #2 from kmadejski/v3-compatibility
Browse files Browse the repository at this point in the history
Ibexa DXP compatibility
  • Loading branch information
kmadejski authored Nov 18, 2020
2 parents 3d3efa1 + 76a2490 commit d315491
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
13 changes: 9 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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": "[email protected]"
}
],
"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",
Expand Down

0 comments on commit d315491

Please sign in to comment.