From 5c8fb000bb0cb00b19287db3e236918b97682b11 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Mon, 20 May 2019 19:15:54 +0200 Subject: [PATCH 1/2] Removed mutants caused by useless/no-op code, raising min-msi threshold --- .travis.yml | 2 +- src/Composer/PackageAutoload.php | 4 ++-- src/Psalm/Configuration.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 24b1523..7e86c39 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,5 +27,5 @@ script: - vendor/bin/phpunit --coverage-text --coverage-xml=coverage/coverage-xml --log-junit=coverage/phpunit.junit.xml - vendor/bin/psalm - vendor/bin/phpcs - - vendor/bin/infection --min-msi=77 --min-covered-msi=100 --coverage=coverage --log-verbosity=none -s + - vendor/bin/infection --min-msi=84 --min-covered-msi=100 --coverage=coverage --log-verbosity=none -s - cd example && ./run-example.sh diff --git a/src/Composer/PackageAutoload.php b/src/Composer/PackageAutoload.php index bb5c6b3..d3d724b 100644 --- a/src/Composer/PackageAutoload.php +++ b/src/Composer/PackageAutoload.php @@ -68,7 +68,7 @@ public static function fromAutoloadDefinition(array $autoloadDefinition, string * @return array */ static function ($paths) use ($prefixWithCurrentDir) : array { - return array_map($prefixWithCurrentDir, array_map('strval', (array) $paths)); + return array_map($prefixWithCurrentDir, (array) $paths); }, $autoloadDefinition['psr-4'] ?? [] ), @@ -79,7 +79,7 @@ static function ($paths) use ($prefixWithCurrentDir) : array { * @return array */ static function ($paths) use ($prefixWithCurrentDir) : array { - return array_map($prefixWithCurrentDir, array_map('strval', (array) $paths)); + return array_map($prefixWithCurrentDir, (array) $paths); }, $autoloadDefinition['psr-0'] ?? [] ), diff --git a/src/Psalm/Configuration.php b/src/Psalm/Configuration.php index a171830..60c67e1 100644 --- a/src/Psalm/Configuration.php +++ b/src/Psalm/Configuration.php @@ -20,7 +20,7 @@ final class Configuration extends PsalmConfig /** @var string[] */ private $checkedNamespaces; - protected function __construct(ProjectFileFilter $files, string ...$checkedNamespaces) + private function __construct(ProjectFileFilter $files, string ...$checkedNamespaces) { parent::__construct(); From dceebd14c4d5ed87e5666654f166c3b0b037ecd5 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Mon, 20 May 2019 19:16:16 +0200 Subject: [PATCH 2/2] Upgraded phpunit, psalm, infection to their latest releases --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 7e3fbf8..1c5bb6f 100644 --- a/composer.json +++ b/composer.json @@ -14,14 +14,14 @@ "ext-json": "*", "composer-plugin-api": "^1.0.0", "ocramius/package-versions": "^1.4.0", - "vimeo/psalm": "dev-master" + "vimeo/psalm": "^3.2.12" }, "require-dev": { "composer/composer": "^1.8.5", "doctrine/coding-standard": "^6.0.0", - "infection/infection": "^0.12.2", - "phpunit/phpunit": "^8.0.0", - "psalm/plugin-phpunit": "^0.5.5", + "infection/infection": "^0.13.0", + "phpunit/phpunit": "^8.1.5", + "psalm/plugin-phpunit": "^0.5.8", "symfony/process": "^4.2.8" }, "autoload": {