Skip to content

Commit

Permalink
3.x (#30)
Browse files Browse the repository at this point in the history
* Use Expressive Skeleton installer with PHP-DI results in error? #25 (#29)

* Released date

* Bumped version
  • Loading branch information
elie29 authored Nov 2, 2018
1 parent 3ef88f6 commit 68b4a12
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 3 deletions.
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,36 @@ Changelog

All notable changes to this project will be documented in this file, in reverse chronological order by release.

## V3.0.9 - TBD
## V3.0.10 - TBD

### Added

- Nothing.

### Changed

- Nothing.

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

- Nothing.

## V3.0.9 - 2018-10-31

### Added

- [#25](https://github.com/elie29/zend-di-config/issues/25) Use Expressive Skeleton installer with PHP-DI results in error.

### Changed

- [#26](https://github.com/elie29/zend-di-config/issues/26) Indicate visibility of constants.

### Deprecated
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,6 @@ class Mailer
To switch back to another container is very easy:
1. Create your factories with `__invoke` function
2. Replace `autowires` key in ConfigProvider by `factories` key, then for each class name attach its correspondent factory.

## PSR 11 and Interop\Container\ContainerInterface
V3.x supports as well Interop\Container\ContainerInterface because zend view is still using this interface.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
},
"require": {
"php": "^7.1",
"container-interop/container-interop": "^1.2",
"php-di/php-di": "^6.0",
"zendframework/zend-stdlib": "^3.2"
},
Expand Down
33 changes: 32 additions & 1 deletion 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 src/ContainerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ContainerFactory

public function __invoke(ConfigInterface $config): ContainerInterface
{
$builder = new ContainerBuilder();
$builder = new ContainerBuilder(ContainerWrapper::class);
$config->configureContainer($builder);

return $builder->build();
Expand Down
17 changes: 17 additions & 0 deletions src/ContainerWrapper.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

declare(strict_types = 1);

namespace Zend\DI\Config;

use DI\Container as DIContainer;
use Interop\Container\ContainerInterface as InteropContainer;

/**
* Zend View is still using Interop\Container\ContainerInterface.
* So this wrapper is to support this issue until zend service manger 4 is released.
* @see https://github.com/elie29/zend-di-config/issues/25
*/
class ContainerWrapper extends DIContainer implements InteropContainer
{
}

0 comments on commit 68b4a12

Please sign in to comment.