From 7e21fb5905a03b5b0b608eb5861fb98f2b853e87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 26 Feb 2019 15:18:42 +0100 Subject: [PATCH 01/10] Upgrade PHPStan to v0.11 --- composer.json | 8 ++++---- phpstan.neon.dist | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index f68aa4b..3d3def6 100644 --- a/composer.json +++ b/composer.json @@ -23,10 +23,10 @@ "require-dev": { "doctrine/coding-standard": "^4.0", "infection/infection": "dev-master@dev", - "phpstan/phpdoc-parser": "^0.3@dev", - "phpstan/phpstan": "^0.10@dev", - "phpstan/phpstan-phpunit": "^0.10@dev", - "phpstan/phpstan-strict-rules": "^0.10@dev", + "phpstan/phpstan": "^0.11", + "phpstan/phpstan-deprecation-rules": "^0.11", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-strict-rules": "^0.11", "phpunit/phpunit": "^7.1", "squizlabs/php_codesniffer": "^3.2", "zendframework/zend-diactoros": "^1.7" diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 136c6b3..11ee2d3 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -2,6 +2,7 @@ includes: - vendor/phpstan/phpstan-phpunit/extension.neon - vendor/phpstan/phpstan-phpunit/rules.neon - vendor/phpstan/phpstan-strict-rules/rules.neon + - vendor/phpstan/phpstan-deprecation-rules/rules.neon parameters: level: 7 From 31d395ffb3859a5d712ec125fbaf148c05162f3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 26 Feb 2019 15:20:00 +0100 Subject: [PATCH 02/10] Use stable version of infection --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3d3def6..111dda7 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ }, "require-dev": { "doctrine/coding-standard": "^4.0", - "infection/infection": "dev-master@dev", + "infection/infection": "^0.12", "phpstan/phpstan": "^0.11", "phpstan/phpstan-deprecation-rules": "^0.11", "phpstan/phpstan-phpunit": "^0.11", From 568f7ce2860c181894168972f19cefded9c0ca86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 26 Feb 2019 15:21:28 +0100 Subject: [PATCH 03/10] Use lcobucci/coding-standard --- composer.json | 3 +-- phpcs.xml.dist | 20 +------------------- src/RouteParamsExtraction.php | 2 +- 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/composer.json b/composer.json index 111dda7..94a6ebe 100644 --- a/composer.json +++ b/composer.json @@ -21,14 +21,13 @@ "psr/http-server-middleware": "^1.0" }, "require-dev": { - "doctrine/coding-standard": "^4.0", "infection/infection": "^0.12", + "lcobucci/coding-standard": "^2.0", "phpstan/phpstan": "^0.11", "phpstan/phpstan-deprecation-rules": "^0.11", "phpstan/phpstan-phpunit": "^0.11", "phpstan/phpstan-strict-rules": "^0.11", "phpunit/phpunit": "^7.1", - "squizlabs/php_codesniffer": "^3.2", "zendframework/zend-diactoros": "^1.7" }, "autoload": { diff --git a/phpcs.xml.dist b/phpcs.xml.dist index f499bcc..66df720 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -13,23 +13,5 @@ src tests - - - - - - - - - - - - - - - - - - - + diff --git a/src/RouteParamsExtraction.php b/src/RouteParamsExtraction.php index 5076931..a0a2973 100644 --- a/src/RouteParamsExtraction.php +++ b/src/RouteParamsExtraction.php @@ -26,7 +26,7 @@ public function __construct(RouteParamsExtractor $extractor) public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { return $handler->handle( - $request->withAttribute(__CLASS__, $this->extractor->getParams($request)) + $request->withAttribute(self::class, $this->extractor->getParams($request)) ); } } From f8ef0b5498dac852b3ad0d9ac70a6feb04c87119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 26 Feb 2019 15:24:56 +0100 Subject: [PATCH 04/10] Upgrade PHPUnit to v8.0 --- .gitignore | 1 + composer.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8cddd1b..e11ba56 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /.phpcs.cache /composer.lock /infection-log.txt +/.phpunit.result.cache diff --git a/composer.json b/composer.json index 94a6ebe..9527a0f 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "phpstan/phpstan-deprecation-rules": "^0.11", "phpstan/phpstan-phpunit": "^0.11", "phpstan/phpstan-strict-rules": "^0.11", - "phpunit/phpunit": "^7.1", + "phpunit/phpunit": "^8.0", "zendframework/zend-diactoros": "^1.7" }, "autoload": { From 4fd3413a31abe6caedcf179df69c2355bf6dbd55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 26 Feb 2019 15:25:36 +0100 Subject: [PATCH 05/10] Upgrade Zend Diactoros to v2.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9527a0f..49a65f6 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "phpstan/phpstan-phpunit": "^0.11", "phpstan/phpstan-strict-rules": "^0.11", "phpunit/phpunit": "^8.0", - "zendframework/zend-diactoros": "^1.7" + "zendframework/zend-diactoros": "^2.0" }, "autoload": { "psr-4": { From 48519f86638158309242030618af41f139a566f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 26 Feb 2019 15:27:40 +0100 Subject: [PATCH 06/10] Allow builds on PHP 8 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 49a65f6..ce91f13 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "sort-packages": true }, "require": { - "php": "^7.2", + "php": "^7.2 || ^8.0", "chimera/foundation": "^0.1", "lcobucci/content-negotiation-middleware": "^1.0", "middlewares/negotiation": "^1.0", From 5f627b1b53f4ed237ab7951c4d9aab562a5acecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 26 Feb 2019 15:28:05 +0100 Subject: [PATCH 07/10] Run build using Ubuntu 16.04 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4449ba8..2eb5675 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -dist: trusty +dist: xenial sudo: false language: php From 6e7a67f2ea3f5700d428a19643e5f4184e987234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 26 Feb 2019 15:28:36 +0100 Subject: [PATCH 08/10] Disallow failures for QA tools --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2eb5675..6211eb9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,8 +22,6 @@ script: jobs: allow_failures: - php: nightly - - env: STATIC_ANALYSIS=1 - - env: MUTATION_TESTS=1 include: - stage: Code Quality From d9d218e78080f4f93fb43bf036a8c8006d2df8fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 26 Feb 2019 15:29:02 +0100 Subject: [PATCH 09/10] Add PHP 7.3 and 7.4 to the matrix --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6211eb9..35e2eb0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,8 @@ language: php php: - 7.2 + - 7.3 + - 7.4snapshot - nightly cache: @@ -21,6 +23,7 @@ script: jobs: allow_failures: + - php: 7.4snapshot - php: nightly include: From 8781ce2476bb14852bcb5cfdbdc1561e5ee84f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 26 Feb 2019 15:32:14 +0100 Subject: [PATCH 10/10] Require development version of Chimera packages --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ce91f13..39025cf 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ }, "require": { "php": "^7.2 || ^8.0", - "chimera/foundation": "^0.1", + "chimera/foundation": "^0.2@dev", "lcobucci/content-negotiation-middleware": "^1.0", "middlewares/negotiation": "^1.0", "psr/http-server-middleware": "^1.0"