Skip to content

Commit

Permalink
Use Expressive Skeleton installer with PHP-DI results in error? #25 (#29
Browse files Browse the repository at this point in the history
)
  • Loading branch information
elie29 authored Oct 31, 2018
1 parent 3ef88f6 commit 6a650d7
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file, in reverse

### Added

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

### Changed

Expand Down
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 6a650d7

Please sign in to comment.