Skip to content

Commit

Permalink
Update the CakePHP requirement to a more stable one and update the RE…
Browse files Browse the repository at this point in the history
…ADME
  • Loading branch information
HavokInspiration committed Sep 25, 2016
1 parent 26b6ce1 commit 9746eb5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ use Wrench\Middleware\MaintenanceMiddleware;

public function middleware($middleware)
{
$middleware->push(new MaintenanceMiddleware());
$middleware->add(new MaintenanceMiddleware());

// Other middleware configuration

Expand Down Expand Up @@ -96,7 +96,7 @@ You can configure it to use specific modes when adding the Middleware to the Mid
The will result in a call looking like this :

```php
$middleware->push(new MaintenanceMiddleware([
$middleware->add(new MaintenanceMiddleware([
'mode' => [
'className' => 'Full\Namespace\To\Mode',
'config' => [
Expand All @@ -109,7 +109,7 @@ $middleware->push(new MaintenanceMiddleware([
If you need it, you can directly pass an instance of a ``Mode`` to the ``mode`` array key of the filter's config:

```php
$middleware->push(new MaintenanceMiddleware([
$middleware->add(new MaintenanceMiddleware([
'mode' => new \Wrench\Mode\Redirect([
'url' => 'http://example.com/maintenance'
])
Expand All @@ -130,7 +130,7 @@ page.
You can customize all those parameters :

```php
$middleware->push(new MaintenanceMiddleware([
$middleware->add(new MaintenanceMiddleware([
'mode' => [
'className' => 'Wrench\Mode\Redirect',
'config' => [
Expand All @@ -152,7 +152,7 @@ It accepts multiple parameters :
You can customize all those parameters :

```php
$middleware->push(new MaintenanceMiddleware([
$middleware->add(new MaintenanceMiddleware([
'mode' => [
'className' => 'Wrench\Mode\Output',
'config' => [
Expand All @@ -177,7 +177,7 @@ The callable is expected to return a ``\Psr\Http\Message\ResponseInterface`` if
stopped.

```php
$middleware->push(new MaintenanceMiddleware([
$middleware->add(new MaintenanceMiddleware([
'mode' => [
'className' => 'Wrench\Mode\Callback',
'config' => [
Expand Down Expand Up @@ -215,7 +215,7 @@ It accepts multiple parameters :
```php
// Will load a template ``src/Template/Maintenance/maintenance.ctp``
// in a layout ``src/Template/Layout/Maintenance/maintenance.ctp``
$middleware->push(new MaintenanceMiddleware([
$middleware->add(new MaintenanceMiddleware([
'mode' => [
'className' => 'Wrench\Mode\View',
'config' => [
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"require": {
"php": ">=5.5.9",
"cakephp/cakephp": "dev-3.next as 3.3.0-dev"
"cakephp/cakephp": "~3.3"
},
"require-dev": {
"phpunit/phpunit": "*",
Expand Down

0 comments on commit 9746eb5

Please sign in to comment.