From 739020f2d34c38b280abc46e73e85af615db7558 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Wed, 21 Oct 2020 15:36:51 +0200 Subject: [PATCH 1/4] Travis > Test on PHP 7.4 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index cbb484d..170ca9d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ php: - 7.1 - 7.2 - 7.3 + - 7.4 env: - dependencies=lowest - dependencies=highest From f05e8e998036a6ed5b832a77690a0dd7f43aeec9 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Wed, 21 Oct 2020 15:37:06 +0200 Subject: [PATCH 2/4] Replace jakub-onderka/php-parallel-lint --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index fa2e1ee..702b798 100644 --- a/composer.json +++ b/composer.json @@ -13,8 +13,8 @@ "consistence/coding-standard": "^3.7", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "ergebnis/composer-normalize": "^2.0.2", - "jakub-onderka/php-parallel-lint": "^1.0", "phing/phing": "^2.16.0", + "php-parallel-lint/php-parallel-lint": "^1.0", "phpstan/phpstan-phpunit": "^0.12.6", "phpstan/phpstan-strict-rules": "^0.12.1", "phpunit/phpunit": "^7.5.18", From 52f242a4d064bd12cbf76951adf09c36a03bc04c Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Wed, 21 Oct 2020 15:37:14 +0200 Subject: [PATCH 3/4] Updated coding standard that can run on PHP 7.4 --- composer.json | 4 ++-- phpcs.xml | 16 ++++++++++++++-- .../AssertTypeSpecifyingExtension.php | 8 ++++++-- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 702b798..f2dd15e 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "phpstan/phpstan": "^0.12.40" }, "require-dev": { - "consistence/coding-standard": "^3.7", + "consistence/coding-standard": "^3.10", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "ergebnis/composer-normalize": "^2.0.2", "phing/phing": "^2.16.0", @@ -18,7 +18,7 @@ "phpstan/phpstan-phpunit": "^0.12.6", "phpstan/phpstan-strict-rules": "^0.12.1", "phpunit/phpunit": "^7.5.18", - "slevomat/coding-standard": "^4.5.2", + "slevomat/coding-standard": "^6.4", "webmozart/assert": "^1.7.0" }, "config": { diff --git a/phpcs.xml b/phpcs.xml index aac1218..54b22d4 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -17,7 +17,7 @@ - + + + + + + + + + + + + + - + diff --git a/src/Type/WebMozartAssert/AssertTypeSpecifyingExtension.php b/src/Type/WebMozartAssert/AssertTypeSpecifyingExtension.php index ee0feca..abd5da9 100644 --- a/src/Type/WebMozartAssert/AssertTypeSpecifyingExtension.php +++ b/src/Type/WebMozartAssert/AssertTypeSpecifyingExtension.php @@ -403,7 +403,9 @@ function (Type $type): Type { return TypeCombinator::removeNull($type); } ); - } elseif ($methodName === 'allNotInstanceOf') { + } + + if ($methodName === 'allNotInstanceOf') { $classType = $scope->getType($node->args[1]->value); if (!$classType instanceof ConstantStringType) { return new SpecifiedTypes([], []); @@ -417,7 +419,9 @@ function (Type $type) use ($objectType): Type { return TypeCombinator::remove($type, $objectType); } ); - } elseif ($methodName === 'allNotSame') { + } + + if ($methodName === 'allNotSame') { $valueType = $scope->getType($node->args[1]->value); return $this->arrayOrIterable( $scope, From fe8ce3f2f25d79b68ec6317a3474a1509175351c Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Wed, 21 Oct 2020 15:58:23 +0200 Subject: [PATCH 4/4] Bump minimum versions to prevent deprecations while running in lowest mode --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index f2dd15e..03b8696 100644 --- a/composer.json +++ b/composer.json @@ -13,8 +13,8 @@ "consistence/coding-standard": "^3.10", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "ergebnis/composer-normalize": "^2.0.2", - "phing/phing": "^2.16.0", - "php-parallel-lint/php-parallel-lint": "^1.0", + "phing/phing": "^2.16.2", + "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/phpstan-phpunit": "^0.12.6", "phpstan/phpstan-strict-rules": "^0.12.1", "phpunit/phpunit": "^7.5.18",