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

Commit c800b99

Browse files
committed
Updated migration guide
1 parent 2eff858 commit c800b99

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

docs/book/migration-v4.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ Migration guide for Zend Service version 4.0.0.
66

77
[`container-interop/container-interop`](https://github.com/container-interop/container-interop)
88
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.
1418

1519
If your project typehints any `Interop\ContainerInterop\*` interfaces where any
1620
`Zend\ServiceManager\*` classes are expected, you _**must**_ update your code to
@@ -21,11 +25,14 @@ PSR-11 interfaces.
2125

2226
To do this, use your favorite find-and-replace tool to update the following:
2327
- `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;`
2530
- **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.
2936

3037
> ### Note
3138
>

0 commit comments

Comments
 (0)