@@ -6,11 +6,15 @@ Migration guide for Zend Service version 4.0.0.
6
6
7
7
[ ` container-interop/container-interop ` ] ( https://github.com/container-interop/container-interop )
8
8
was officially deprecated in favor of [ PSR-11] ( https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-11-container.md )
9
- on February 13, 2017. As such, all uses of the ` Interop\Container\* ` interfaces
10
- have been replaced with ` Psr\Container\ContainerInterface ` . Further, installs of
11
- ` container-interop/container-interop ` below version ` 1.2.0 ` is prohibited via
12
- Composer's ` conflicts ` configuration. Version ` 1.2.0 ` _ does_ extend the PSR-11
13
- interfaces, and is thus still usable.
9
+ on February 13, 2017. As such, all uses of the interop-container interfaces
10
+ have been replaced with PSR-11 containers interfaces as follows:
11
+ - ` Interop\Container\ContainerInterface ` to ` Psr\Container\ContainerInterface ` ,
12
+ - ` Interop\Container\Exception\ContainerException ` to ` Psr\Container\ContainerExceptionInterface ` ,
13
+ - ` Interop\Container\Exception\NotFoundException ` to ` Psr\Container\NotFoundExceptionInterface ` .
14
+
15
+ Further, installs of ` container-interop/container-interop ` below version ` 1.2.0 `
16
+ is prohibited via Composer's ` conflicts ` configuration. Version ` 1.2.0 ` _ does_
17
+ extend the PSR-11 interfaces, and is thus still usable.
14
18
15
19
If your project typehints any ` Interop\ContainerInterop\* ` interfaces where any
16
20
` Zend\ServiceManager\* ` classes are expected, you _ ** must** _ update your code to
@@ -21,11 +25,14 @@ PSR-11 interfaces.
21
25
22
26
To do this, use your favorite find-and-replace tool to update the following:
23
27
- ` use Interop\Container\ContainerInterface; ` -> ` use Psr\Container\ContainerInterface; `
24
- - ` use Interop\Container\ContainerException; ` -> ` use Psr\Container\ContainerExceptionInterface; `
28
+ - ` use Interop\Container\Exception\ContainerException; ` -> ` use Psr\Container\ContainerExceptionInterface; `
29
+ - ` use Interop\Container\Exception\NotFoundException; ` -> ` use Psr\Container\NotFoundExceptionInterface; `
25
30
- ** Note:** You will also need to replace ` ContainerException ` with ` ContainerExceptionInterface `
26
- where it is used throughout your code. If you _ don't_ want to do that, you can include
27
- ` as ContainerException ` in the find-and-replace, and any existing use of ` ContainerException `
28
- will continue to work.
31
+ and ` NotFoundException ` with ` NotFoundExceptionInterface ` where it is used
32
+ throughout your code. If you _ don't_ want to do that, you can include
33
+ ` as ContainerException ` /` as NotFoundException ` in the find-and-replace,
34
+ and any existing use of ` ContainerException ` /` NotFoundException ` will
35
+ continue to work.
29
36
30
37
> ### Note
31
38
>
0 commit comments