From 3029c25038a1c725d95049711f97bd069563d002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Sun, 3 May 2020 22:02:58 +0200 Subject: [PATCH 1/6] Require PHP 7.4+ --- .scrutinizer.yml | 2 +- .travis.yml | 3 +-- composer.json | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index c04a129..a661960 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -8,7 +8,7 @@ build: rabbitmq: false mongodb: false php: - version: 7.3 + version: 7.4 cache: disabled: false directories: diff --git a/.travis.yml b/.travis.yml index 8081bf7..7a789cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,7 @@ sudo: false language: php php: - - 7.3 - - 7.4snapshot + - 7.4 - nightly cache: diff --git a/composer.json b/composer.json index bf03016..3d89828 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "sort-packages": true }, "require": { - "php": "^7.3 || ^8.0", + "php": "^7.4 || ^8.0", "chimera/routing": "^0.3", "zendframework/zend-diactoros": "^2.2", "zendframework/zend-expressive": "^3.2", From 6768dd30e7721d4e9e1575f604563702e6fb1c9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Sun, 3 May 2020 22:05:44 +0200 Subject: [PATCH 2/6] Require Infection v0.16.* --- .travis.yml | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7a789cc..961a8e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,4 +51,4 @@ jobs: - mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,} - if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for mutation tests"; exit 1; fi script: - - ./vendor/bin/infection --threads=$(nproc) --min-msi=66 --min-covered-msi=100 + - ./vendor/bin/infection --threads=$(nproc) --min-msi=71 --min-covered-msi=100 diff --git a/composer.json b/composer.json index 3d89828..22450b3 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "zendframework/zend-expressive-helpers": "^5.3" }, "require-dev": { - "infection/infection": "^0.16.2", + "infection/infection": "^0.16", "lcobucci/coding-standard": "^3.1", "phpstan/phpstan": "^0.11", "phpstan/phpstan-deprecation-rules": "^0.11", From e78c07dd1c64280dca0d10fe3f3c16d6e51b5fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Sun, 3 May 2020 22:07:34 +0200 Subject: [PATCH 3/6] Upgrade PHPStan --- composer.json | 9 +++++---- phpstan.neon.dist | 8 +------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index 22450b3..8d1ac1a 100644 --- a/composer.json +++ b/composer.json @@ -24,10 +24,11 @@ "require-dev": { "infection/infection": "^0.16", "lcobucci/coding-standard": "^3.1", - "phpstan/phpstan": "^0.11", - "phpstan/phpstan-deprecation-rules": "^0.11", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-strict-rules": "^0.11", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-deprecation-rules": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", "phpunit/phpunit": "^9.1" }, "autoload": { diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 11ee2d3..1494f51 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,11 +1,5 @@ -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 + level: max paths: - src - tests From c6dc22a4d0bf506cadb827422258515a21ed24e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Sun, 3 May 2020 22:19:51 +0200 Subject: [PATCH 4/6] Update coding standard --- composer.json | 2 +- src/Application.php | 5 +---- src/UriGenerator.php | 5 +---- tests/ApplicationTest.php | 9 +++------ 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/composer.json b/composer.json index 8d1ac1a..b5e4c36 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ }, "require-dev": { "infection/infection": "^0.16", - "lcobucci/coding-standard": "^3.1", + "lcobucci/coding-standard": "^4.0", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^0.12", "phpstan/phpstan-deprecation-rules": "^0.12", diff --git a/src/Application.php b/src/Application.php index 7dbfb3c..7d4c2e0 100644 --- a/src/Application.php +++ b/src/Application.php @@ -10,10 +10,7 @@ final class Application implements ApplicationInterface { - /** - * @var Expressive - */ - private $application; + private Expressive $application; public function __construct(Expressive $application) { diff --git a/src/UriGenerator.php b/src/UriGenerator.php index 5228461..bef9338 100644 --- a/src/UriGenerator.php +++ b/src/UriGenerator.php @@ -13,10 +13,7 @@ final class UriGenerator implements UriGeneratorInterface { - /** - * @var RouterInterface - */ - private $router; + private RouterInterface $router; public function __construct(RouterInterface $router) { diff --git a/tests/ApplicationTest.php b/tests/ApplicationTest.php index 763ca99..d4f3b41 100644 --- a/tests/ApplicationTest.php +++ b/tests/ApplicationTest.php @@ -26,20 +26,17 @@ */ final class ApplicationTest extends TestCase { - /** - * @var Expressive - */ - private $expressive; + private Expressive $expressive; /** * @var EmitterInterface&MockObject */ - private $emitter; + private EmitterInterface $emitter; /** * @var MiddlewarePipeInterface&MockObject */ - private $pipeline; + private MiddlewarePipeInterface $pipeline; /** * @before From d598f1185e1079dfaceda8895a61291c9ac60d88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Sun, 3 May 2020 22:30:40 +0200 Subject: [PATCH 5/6] Upgrade chimera packages --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b5e4c36..53bf1eb 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,8 @@ }, "require": { "php": "^7.4 || ^8.0", - "chimera/routing": "^0.3", + "chimera/foundation": "^0.4@dev", + "chimera/routing": "^0.4@dev", "zendframework/zend-diactoros": "^2.2", "zendframework/zend-expressive": "^3.2", "zendframework/zend-expressive-fastroute": "^3.0", From bf3e751dd5787da9444df9ab5c874440de243c51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Sun, 3 May 2020 22:33:46 +0200 Subject: [PATCH 6/6] Add virtual package for routing implementation Allowing us to require that on other packages. --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index 53bf1eb..69c70dd 100644 --- a/composer.json +++ b/composer.json @@ -32,6 +32,9 @@ "phpstan/phpstan-strict-rules": "^0.12", "phpunit/phpunit": "^9.1" }, + "provide": { + "chimera/routing-implementation": "0.4.0" + }, "autoload": { "psr-4": { "Chimera\\Routing\\Expressive\\": "src"