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

Use PSR-11 Container Interface #37

Merged
merged 1 commit into from
Dec 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
},
"require": {
"php": "^5.6 || ^7.0",
"container-interop/container-interop": "^1.2",
"container-interop/container-interop": "^1.2.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need above line. We are not using this library here anymore.
We need of course conflict entry, as it is now below.

"psr/container": "^1.0",
"psr/http-message": "^1.0.1",
"zendframework/zend-expressive-helpers": "^1.4 || ^2.2 || ^3.0.1 || ^4.0",
"zendframework/zend-expressive-router": "^1.3.2 || ^2.1",
Expand All @@ -32,6 +33,9 @@
"phpunit/phpunit": "^6.0.8 || ^5.7.15",
"zendframework/zend-coding-standard": "~1.0.0"
},
"conflict": {
"container-interop/container-interop": "<1.2.0"
},
"autoload": {
"psr-4": {
"Zend\\Expressive\\ZendView\\": "src/"
Expand Down
52 changes: 26 additions & 26 deletions composer.lock

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

4 changes: 2 additions & 2 deletions src/Exception/MissingHelperException.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
namespace Zend\Expressive\ZendView\Exception;

use DomainException;
use Interop\Container\Exception\ContainerException;
use Psr\Container\ContainerExceptionInterface;

class MissingHelperException extends DomainException implements
ContainerException,
ContainerExceptionInterface,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it here BC Break? If somebody catch exception on ContainerException it will stop work.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If they were catching Interop\Container\Exception\ContainerException, however, and the container in use implements PSR-11 only, then there's breakage.

ExceptionInterface
{
}
2 changes: 1 addition & 1 deletion src/HelperPluginManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Zend\Expressive\ZendView;

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

Expand Down
2 changes: 1 addition & 1 deletion src/ZendViewRendererFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Zend\Expressive\ZendView;

use Interop\Container\ContainerInterface;
use Psr\Container\ContainerInterface;
use Zend\Expressive\Helper\ServerUrlHelper as BaseServerUrlHelper;
use Zend\Expressive\Helper\UrlHelper as BaseUrlHelper;
use Zend\View\HelperPluginManager;
Expand Down