Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'feature/450' into develop
Browse files Browse the repository at this point in the history
Clsoe #450
weierophinney committed Feb 15, 2017

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 1531e4d + 7a6bc09 commit 2534c1a
Showing 53 changed files with 261 additions and 161 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -6,6 +6,10 @@ All notable changes to this project will be documented in this file, in reverse

### Added

- [#450](https://github.com/zendframework/zend-expressive/pull/450) adds support
for [PSR-11](http://www.php-fig.org/psr/psr-11/); Expressive is now a PSR-11
consumer.

- [#428](https://github.com/zendframework/zend-expressive/pull/428) updates the
zend-stratigility dependency to require `^2.0`; this allows usage of both
the new middleare-based error handling system introduced in zend-stratigility
@@ -131,6 +135,27 @@ All notable changes to this project will be documented in this file, in reverse
`Interop\Http\ServerMiddleware\DelegateInterface` with the name
`$defaultDelegate`.

- [#450](https://github.com/zendframework/zend-expressive/pull/450) modifies the
signatures in several classes to typehint against [PSR-11](http://www.php-fig.org/psr/psr-11/)
instead of [container-interop](https://github.com/container-interop/container-interop);
these include:

- `Zend\Expressive\AppFactory::create()`
- `Zend\Expressive\Application::__construct()`
- `Zend\Expressive\Container\ApplicationFactory::__invoke()`
- `Zend\Expressive\Container\ErrorHandlerFactory::__invoke()`
- `Zend\Expressive\Container\ErrorResponseGeneratorFactory::__invoke()`
- `Zend\Expressive\Container\NotFoundDelegateFactory::__invoke()`
- `Zend\Expressive\Container\NotFoundHandlerFactory::__invoke()`
- `Zend\Expressive\Container\WhoopsErrorResponseGeneratorFactory::__invoke()`
- `Zend\Expressive\Container\WhoopsFactory::__invoke()`
- `Zend\Expressive\Container\WhoopsPageHandlerFactory::__invoke()`

- [#450](https://github.com/zendframework/zend-expressive/pull/450) changes the
interface inheritance of `Zend\Expressive\Container\Exception\InvalidServiceException`
to extend `Psr\Container\ContainerExceptionInterface` instead of
`Interop\Container\Exception\ContainerException`.

### Deprecated

- Nothing.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ features:
- [Aura.Router](https://github.com/auraphp/Aura.Router)
- [FastRoute](https://github.com/nikic/FastRoute)
- [zend-router](https://github.com/zendframework/zend-expressive-router)
- DI Containers, via [container-interop](https://github.com/container-interop/container-interop).
- DI Containers, via [PSR-11 Container](https://github.com/php-fig/container).
Middleware matched via routing is retrieved from the composed container.
- Optionally, templating. We support:
- [Plates](http://platesphp.com/)
@@ -68,7 +68,7 @@ We currently support and provide the following routing integrations:
`composer require zendframework/zend-expressive-zendrouter`

We recommend using a dependency injection container, and typehint against
[container-interop](https://github.com/container-interop/container-interop). We
[PSR-11 Container](https://github.com/php-fig/container). We
can recommend the following implementations:

- [zend-servicemanager](https://github.com/zendframework/zend-servicemanager):
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
},
"require": {
"php": "^5.6 || ^7.0",
"container-interop/container-interop": "^1.1",
"psr/container": "^1.0",
"psr/http-message": "^1.0",
"zendframework/zend-diactoros": "^1.1",
"zendframework/zend-expressive-router": "^2.1",
@@ -36,6 +36,9 @@
"zendframework/zend-expressive-zendrouter": "^2.0",
"zendframework/zend-servicemanager": "^2.6 || ^3.1.1"
},
"conflict": {
"container-interop/container-interop": "<1.2.0"
},
"autoload": {
"psr-4": {
"Zend\\Expressive\\": "src/"
170 changes: 88 additions & 82 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion doc/book/cookbook/autowiring-routes-and-pipelines.md
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ the following contents:
namespace App\Factory;

use App\Action;
use Interop\Container\ContainerInterface;
use Psr\Container\ContainerInterface;
use Zend\Expressive\Application;
use Zend\Expressive\Helper\ServerUrlMiddleware;
use Zend\Expressive\Helper\UrlHelperMiddleware;
4 changes: 2 additions & 2 deletions doc/book/cookbook/route-specific-pipeline.md
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ You can do this programmatically within a container factory, assuming you are
using a container that supports factories.

```php
use Interop\Container\ContainerInterface;
use Psr\Container\ContainerInterface;
use Zend\Stratigility\MiddlewarePipe;

class ApiResourcePipelineFactory
@@ -58,7 +58,7 @@ middleware in order to change the instance or return an alternate instance. In
this case, we'd do the latter. The following is an example:

```php
use Interop\Container\ContainerInterface;
use Psr\Container\ContainerInterface;
use Zend\ServiceManager\DelegatorFactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Zend\Stratigility\MiddlewarePipe;
4 changes: 2 additions & 2 deletions doc/book/cookbook/setting-locale-without-routing-parameter.md
Original file line number Diff line number Diff line change
@@ -73,7 +73,7 @@ Then you will need a factory for the `SetLocaleMiddleware` to inject the
<?php
namespace Application\I18n;

use Interop\Container\ContainerInterface;
use Psr\Container\ContainerInterface;
use Zend\Expressive\Helper\UrlHelper;

class SetLocaleMiddlewareFactory
@@ -217,7 +217,7 @@ following would work for the above middleware:
```php
namespace Application\Action;

use Interop\Container\ContainerInterface;
use Psr\Container\ContainerInterface;
use Zend\Expressive\Helper\UrlHelper;

class RedirectActionFactory
4 changes: 2 additions & 2 deletions doc/book/cookbook/using-zend-form-view-helpers.md
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ zend-form component (or whichever other components you wish to use).
```php
namespace Your\Application;

use Interop\Container\ContainerInterface;
use Psr\Container\ContainerInterface;
use Zend\ServiceManager\Config;
use Zend\View\HelperPluginManager;

@@ -96,7 +96,7 @@ You'll first need to create a delegator factory:
```php
namespace Your\Application;

use Interop\Container\ContainerInterface;
use Psr\Container\ContainerInterface;
use Zend\ServiceManager\Config;
use Zend\ServiceManager\DelegatorFactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
Loading

0 comments on commit 2534c1a

Please sign in to comment.