diff --git a/.travis.yml b/.travis.yml index 96a6f02f..f03c39a6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,25 +2,28 @@ language: php dist: trusty group: edge +env: + global: + - XDEBUG_MODE=coverage + php: - - 7.1 - - 7.2 - 7.3 - 7.4 + - 8.0 before_script: - mkdir -p build/logs - mysql -e 'create database IF NOT EXISTS errorheromodule;' -uroot - mysql -u root errorheromodule < spec/Fixture/data/sql.sql - composer self-update - - COMPOSER_PROCESS_TIMEOUT=5000 composer install --prefer-dist --no-interaction + - COMPOSER_PROCESS_TIMEOUT=5000 composer install --prefer-dist --no-interaction --ignore-platform-reqs - composer dump-autoload -o script: - composer cs-check - - if [[ $TRAVIS_PHP_VERSION = 7.1 ]]; then bin/phpstan analyse src/ --level=max -c phpstan.neon; fi + - if [[ $TRAVIS_PHP_VERSION = 7.3 ]]; then bin/phpstan analyse src/ --level=max -c phpstan.neon; fi - bin/kahlan --coverage=4 --reporter=verbose --clover=build/logs/clover.xml - - if [[ $TRAVIS_PHP_VERSION = 7.1 ]]; then bin/php-coveralls -v --exclude-no-stmt; fi + - if [[ $TRAVIS_PHP_VERSION = 7.3 ]]; then bin/php-coveralls -v --exclude-no-stmt; fi notifications: email: false diff --git a/README.md b/README.md index 6edb70ca..e6999de8 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,14 @@ ErrorHeroModule =============== [![Latest Version](https://img.shields.io/github/release/samsonasik/ErrorHeroModule.svg?style=flat-square)](https://github.com/samsonasik/ErrorHeroModule/releases) -[![Build Status](https://travis-ci.org/samsonasik/ErrorHeroModule.svg?branch=master)](https://travis-ci.org/samsonasik/ErrorHeroModule) +[![Build Status](https://travis-ci.com/samsonasik/ErrorHeroModule.svg?branch=master)](https://travis-ci.com/samsonasik/ErrorHeroModule) [![Coverage Status](https://coveralls.io/repos/github/samsonasik/ErrorHeroModule/badge.svg?branch=master)](https://coveralls.io/github/samsonasik/ErrorHeroModule?branch=master) [![PHPStan](https://img.shields.io/badge/style-level%20max-brightgreen.svg?style=flat-square&label=phpstan)](https://github.com/phpstan/phpstan) [![Downloads](https://poser.pugx.org/samsonasik/error-hero-module/downloads)](https://packagist.org/packages/samsonasik/error-hero-module) -> This is README for version ^3.0 which only support Laminas Mvc version 3 and Mezzio version 3 with php ^7.1. +> This is README for version ^4.0 which only support Laminas Mvc version 3 and Mezzio version 3 with php ^7.3 || ^8.0. + +> For version ^3.0, you can read at [version 3 readme](https://github.com/samsonasik/ErrorHeroModule/tree/3.x.x) which only support which only support Laminas Mvc version 3 and Mezzio version 3 with php ^7.1. > For version ^2.0, you can read at [version 2 readme](https://github.com/samsonasik/ErrorHeroModule/tree/2.x.x) which only support ZF3 and ZF Expressive version 3 with php ^7.1. diff --git a/composer.json b/composer.json index 42270194..a9d2d451 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ } ], "require": { - "php": "^7.1", + "php": "^7.3 || ^8.0", "laminas/laminas-db": "^2.5", "laminas/laminas-diactoros": "^2.0", "laminas/laminas-log": "^2.10", @@ -51,18 +51,17 @@ "webmozart/assert": "^1.4" }, "conflict": { - "doctrine/doctrine-orm-module": "<2.1", - "elie29/zend-phpdi-config": "<4.0", + "doctrine/doctrine-orm-module": "<4.0", + "elie29/zend-phpdi-config": "*", "laminas/laminas-mvc": "<3.0 >=4.0", "laminas/laminas-servicemanager": "<3.3", "mezzio/mezzio": "<3.0 >=4.0" }, "require-dev": { "aura/di": "^3.4", - "doctrine/doctrine-orm-module": "^2.1", - "elie29/zend-phpdi-config": "^4.0", - "kahlan/kahlan": "^4.6.4", - "laminas/laminas-cache": "^2.9", + "doctrine/doctrine-orm-module": "^4.0", + "doctrine/doctrine-module": "^4.1.2", + "kahlan/kahlan": "^5.1", "laminas/laminas-coding-standard": "^2.0", "laminas/laminas-form": "^2.14", "laminas/laminas-mvc": "^3.0", diff --git a/spec/Middleware/MezzioFactorySpec.php b/spec/Middleware/MezzioFactorySpec.php index 869d6081..b62578a8 100644 --- a/spec/Middleware/MezzioFactorySpec.php +++ b/spec/Middleware/MezzioFactorySpec.php @@ -9,7 +9,6 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\Driver\PDOMySql\Driver; use Doctrine\ORM\EntityManager; -use Elie\PHPDI\Config\ContainerWrapper as PHPDIContainerWrapper; use ErrorHeroModule\Handler\Logging; use ErrorHeroModule\Middleware\Mezzio; use ErrorHeroModule\Middleware\MezzioFactory; @@ -35,7 +34,6 @@ SymfonyContainerBuilder::class => new SymfonyContainerBuilder(), AurynInjectorContainer::class => new AurynInjectorContainer(new AurynInjector()), Psr11PimpleContainer::class => new Psr11PimpleContainer(new PimpleContainer()), - PHPDIContainerWrapper::class => new PHPDIContainerWrapper(), ]; }); diff --git a/src/Middleware/MezzioFactory.php b/src/Middleware/MezzioFactory.php index 75a623d6..720be409 100644 --- a/src/Middleware/MezzioFactory.php +++ b/src/Middleware/MezzioFactory.php @@ -7,12 +7,10 @@ use ArrayObject; use Aura\Di\Container as AuraContainer; use Doctrine\ORM\EntityManager; -use Elie\PHPDI\Config\ContainerWrapper as PHPDIContainerWrapper; use ErrorHeroModule\Handler\Logging; use ErrorHeroModule\Transformer\AuraService; use ErrorHeroModule\Transformer\AurynService; use ErrorHeroModule\Transformer\Doctrine; -use ErrorHeroModule\Transformer\PHPDIService; use ErrorHeroModule\Transformer\PimpleService; use ErrorHeroModule\Transformer\SymfonyService; use Laminas\ServiceManager\ServiceManager; @@ -37,7 +35,6 @@ class MezzioFactory AuraContainer::class => AuraService::class, AurynInjectorContainer::class => AurynService::class, Psr11PimpleContainer::class => PimpleService::class, - PHPDIContainerWrapper::class => PHPDIService::class, ]; private function createMiddlewareInstance(ContainerInterface $container, array $configuration): Mezzio diff --git a/src/Transformer/PHPDIService.php b/src/Transformer/PHPDIService.php deleted file mode 100644 index 2321c61d..00000000 --- a/src/Transformer/PHPDIService.php +++ /dev/null @@ -1,24 +0,0 @@ -set('ErrorHeroModuleLogger', $logger); - - return $container; - } -}