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

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
geerteltink committed Jun 22, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 02d3134 + 7eff2c5 commit 9395c94
Showing 8 changed files with 69 additions and 1 deletion.
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,33 @@

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

## 3.1.0 - TBD

### Added

- [#255](https://github.com/zendframework/zend-expressive-skeleton/pull/255) adds
support for the PHP-DI container.

- [#256](https://github.com/zendframework/zend-expressive-skeleton/pull/256) adds
support for zend-expressive-swool config out of the box.

### Changed

- [#258](https://github.com/zendframework/zend-expressive-skeleton/pull/258) moves
security-advisories to require-dev section.

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

- Nothing.

## 3.0.7 - TBD

### Added
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -41,7 +41,6 @@
},
"require": {
"php": "^7.1",
"roave/security-advisories": "dev-master",
"zendframework/zend-component-installer": "^2.1.1",
"zendframework/zend-config-aggregator": "^1.0",
"zendframework/zend-diactoros": "^1.7.1",
@@ -51,13 +50,15 @@
},
"require-dev": {
"composer/composer": "^1.5",
"elie29/zend-phpdi-config": "^3.0",
"filp/whoops": "^2.1.12",
"jsoumelidis/zend-sf-di-config": "^0.3",
"mikey179/vfsstream": "^1.6.5",
"northwoods/container": "^3.0",
"phpstan/phpstan": "^0.9.2",
"phpstan/phpstan-strict-rules": "^0.9.0",
"phpunit/phpunit": "^7.0.1",
"roave/security-advisories": "dev-master",
"squizlabs/php_codesniffer": "^2.9.1",
"zendframework/zend-auradi-config": "^1.0",
"zendframework/zend-coding-standard": "~1.0.0",
5 changes: 5 additions & 0 deletions config/config.php
Original file line number Diff line number Diff line change
@@ -20,6 +20,11 @@
\Zend\Expressive\ConfigProvider::class,
\Zend\Expressive\Router\ConfigProvider::class,

// Swoole config to overwrite some services (if installed)
class_exists(\Zend\Expressive\Swoole\ConfigProvider::class)
? \Zend\Expressive\Swoole\ConfigProvider::class
: function(){ return[]; },

// Default App module config
App\ConfigProvider::class,

1 change: 1 addition & 0 deletions phpstan.installer.neon
Original file line number Diff line number Diff line change
@@ -12,3 +12,4 @@ parameters:
reportUnmatchedIgnoredErrors: true
ignoreErrors:
- '#Class App\\ConfigProvider not found#'
- '#Class Zend\\Expressive\\Swoole\\ConfigProvider not found#'
1 change: 1 addition & 0 deletions src/ExpressiveInstaller/OptionalPackages.php
Original file line number Diff line number Diff line change
@@ -103,6 +103,7 @@ class OptionalPackages
*/
private $devDependencies = [
'composer/composer',
'elie29/zend-phpdi-config',
'filp/whoops',
'jsoumelidis/zend-sf-di-config',
'mikey179/vfsstream',
11 changes: 11 additions & 0 deletions src/ExpressiveInstaller/Resources/config/container-php-di.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

declare(strict_types = 1);

use Zend\DI\Config\Config;
use Zend\DI\Config\ContainerFactory;

$config = require __DIR__ . '/config.php';
$factory = new ContainerFactory();

return $factory(new Config($config));
18 changes: 18 additions & 0 deletions src/ExpressiveInstaller/config.php
Original file line number Diff line number Diff line change
@@ -4,6 +4,9 @@

return [
'packages' => [
'elie29/zend-phpdi-config' => [
'version' => '^3.0',
],
'filp/whoops' => [
'version' => '^2.1.12',
],
@@ -163,6 +166,21 @@
'Resources/config/container-sf-di.php' => 'config/container.php',
],
],
6 => [
'name' => 'PHP-DI',
'packages' => [
'elie29/zend-phpdi-config',
],
'flat' => [
'Resources/config/container-php-di.php' => 'config/container.php',
],
'modular' => [
'Resources/config/container-php-di.php' => 'config/container.php',
],
'minimal' => [
'Resources/config/container-php-di.php' => 'config/container.php',
],
],
],
],

4 changes: 4 additions & 0 deletions test/ExpressiveInstallerTest/ContainersTest.php
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@
use Symfony\Component\DependencyInjection\ContainerBuilder as SfContainerBuilder;
use Zend\Expressive;
use Zend\ServiceManager\ServiceManager as ZendServiceManagerContainer;
use DI\Container as PhpDIContainer;

class ContainersTest extends OptionalPackagesTestCase
{
@@ -116,6 +117,9 @@ public function containerProvider() : array
'sf-di-minimal' => [OptionalPackages::INSTALL_MINIMAL, 5, 2, 'minimal-files', 404, SfContainerBuilder::class],
'sf-di-flat' => [OptionalPackages::INSTALL_FLAT, 5, 2, 'copy-files', 200, SfContainerBuilder::class],
'sf-di-modular' => [OptionalPackages::INSTALL_MODULAR, 5, 2, 'copy-files', 200, SfContainerBuilder::class],
'php-di-minimal' => [OptionalPackages::INSTALL_MINIMAL, 6, 2, 'minimal-files', 404, PhpDIContainer::class],
'php-di-flat' => [OptionalPackages::INSTALL_FLAT, 6, 2, 'copy-files', 200, PhpDIContainer::class],
'php-di-modular' => [OptionalPackages::INSTALL_MODULAR, 6, 2, 'copy-files', 200, PhpDIContainer::class],
];
// @codingStandardsIgnoreEnd
}

0 comments on commit 9395c94

Please sign in to comment.