From f433bdbdeaa1770df8ff7869ac2e9e5d40c494cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 26 Feb 2019 16:32:19 +0100 Subject: [PATCH 1/8] Upgrade PHPStan to v0.11 --- .travis.yml | 1 - composer.json | 8 ++++---- phpstan.neon.dist | 1 + 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4449ba8..a61bbcf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,6 @@ script: jobs: allow_failures: - php: nightly - - env: STATIC_ANALYSIS=1 - env: MUTATION_TESTS=1 include: diff --git a/composer.json b/composer.json index b157ef0..1bd9b0e 100644 --- a/composer.json +++ b/composer.json @@ -22,10 +22,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" }, 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 771d2b565126675c72d997d41c38de55ee0e8665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 26 Feb 2019 16:34:29 +0100 Subject: [PATCH 2/8] Upgrade Infection to v0.12 --- .travis.yml | 3 +-- composer.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a61bbcf..9b9250d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,6 @@ script: jobs: allow_failures: - php: nightly - - env: MUTATION_TESTS=1 include: - stage: Code Quality @@ -52,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=4 --min-msi=100 --min-covered-msi=100 + - ./vendor/bin/infection --threads=$(nproc) diff --git a/composer.json b/composer.json index 1bd9b0e..fbe9ae9 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,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 39bf2ff70709f650a5155584af5d435ec14cc242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 26 Feb 2019 16:35:35 +0100 Subject: [PATCH 3/8] Use lcobucci/coding-standard --- composer.json | 5 ++--- phpcs.xml.dist | 20 +------------------- tests/ReadModelConversionMiddlewareTest.php | 2 +- 3 files changed, 4 insertions(+), 23 deletions(-) diff --git a/composer.json b/composer.json index fbe9ae9..b5c5c1a 100644 --- a/composer.json +++ b/composer.json @@ -20,14 +20,13 @@ "league/tactician-container": "^2.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" + "phpunit/phpunit": "^7.1" }, "autoload": { "psr-4": { 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/tests/ReadModelConversionMiddlewareTest.php b/tests/ReadModelConversionMiddlewareTest.php index 60dcaae..11b317a 100644 --- a/tests/ReadModelConversionMiddlewareTest.php +++ b/tests/ReadModelConversionMiddlewareTest.php @@ -23,7 +23,7 @@ public function executeShouldProcessNextMiddlewareAndUseTheConverterToModifyTheR $query = new FetchById(1); $converter = $this->createMock(ReadModelConverter::class); - $callback = function (): string { + $callback = static function (): string { return 'a'; }; From 705edf0fcb81daa6f01db9b20d69b12693905d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 26 Feb 2019 16:36:05 +0100 Subject: [PATCH 4/8] 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 b5c5c1a..7d47dc1 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,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" }, "autoload": { "psr-4": { From 1e68f29166be0f2e64df149b4659d43bc2a60a5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 26 Feb 2019 16:42:01 +0100 Subject: [PATCH 5/8] 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 7d47dc1..bc0735c 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ }, "require": { "php": "^7.2", - "chimera/foundation": "^0.1", + "chimera/foundation": "^0.2@dev", "league/tactician": "^1.0", "league/tactician-container": "^2.0" }, From de4eede8bca6f991e3faa06dea9cedd2535623a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 26 Feb 2019 16:42:41 +0100 Subject: [PATCH 6/8] Allow builds on PHP 8 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index bc0735c..e3e5501 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.2@dev", "league/tactician": "^1.0", "league/tactician-container": "^2.0" From a08e860eadc0d46f0377409f758d1fc93ec2910a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 26 Feb 2019 16:43:16 +0100 Subject: [PATCH 7/8] 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 9b9250d..8ba182f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -dist: trusty +dist: xenial sudo: false language: php From 2088d0b89ba4c1f45498449b0158f10d23eea86b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 26 Feb 2019 16:43:29 +0100 Subject: [PATCH 8/8] Add PHP 7.3 and 7.4 to the matrix --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 8ba182f..7a67a4f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,11 @@ language: php php: - 7.2 + - 7.3 + - 7.4snapshot - nightly + cache: directories: - $HOME/.composer/cache @@ -21,6 +24,7 @@ script: jobs: allow_failures: + - php: 7.4snapshot - php: nightly include: