From bef49b4475ecdc132f42043090c18a87f29904ee Mon Sep 17 00:00:00 2001 From: Gustavo Freze Date: Tue, 10 Dec 2024 14:50:15 -0300 Subject: [PATCH] Release/1.4.1 (#12) * fix: Fixes collections lib version and test execution. --- .github/workflows/ci.yml | 1 - composer.json | 6 ++--- infection.json.dist | 22 ++++++++++--------- phpunit.xml | 6 +++-- .../PointOfInterest/Search/Dtos/Response.php | 2 +- 5 files changed, 20 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a98d091..7e0d42f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,6 @@ name: CI on: - push: pull_request: permissions: diff --git a/composer.json b/composer.json index 556ad05..be39d2d 100644 --- a/composer.json +++ b/composer.json @@ -53,11 +53,11 @@ "squizlabs/php_codesniffer": "^3.11" }, "scripts": { + "test": "phpunit --configuration phpunit.xml tests", "phpcs": "phpcs --standard=PSR12 --extensions=php ./src", "phpmd": "phpmd ./src text phpmd.xml --suffixes php --exclude --ignore-violations-on-exit", "phpstan": "phpstan analyse -c phpstan.neon.dist --quiet --no-progress", - "test": "phpunit --log-junit=report/coverage/junit.xml --coverage-xml=report/coverage/coverage-xml --coverage-html=report/coverage/coverage-html tests", - "test-mutation": "infection --only-covered --logger-html=report/coverage/mutation-report.html --coverage=report/coverage --min-msi=100 --min-covered-msi=100 --threads=4", + "mutation-test": "infection --only-covered --threads=max --logger-html=report/coverage/mutation-report.html --coverage=report/coverage", "review": [ "@phpcs", "@phpmd", @@ -65,7 +65,7 @@ ], "tests": [ "@test", - "@test-mutation" + "@mutation-test" ] } } diff --git a/infection.json.dist b/infection.json.dist index fd432c8..87d1549 100644 --- a/infection.json.dist +++ b/infection.json.dist @@ -1,15 +1,19 @@ { - "timeout": 10, - "testFramework": "phpunit", + "logs": { + "text": "report/infection/logs/infection-text.log", + "summary": "report/infection/logs/infection-summary.log" + }, "tmpDir": "report/infection/", + "minMsi": 100, + "timeout": 90, "source": { "directories": [ "src" ] }, - "logs": { - "text": "report/infection/logs/infection-text.log", - "summary": "report/infection/logs/infection-summary.log" + "phpUnit": { + "configDir": "", + "customPath": "./vendor/bin/phpunit" }, "mutators": { "@default": true, @@ -20,8 +24,6 @@ "MethodCallRemoval": false, "LessThanNegotiation": false }, - "phpUnit": { - "configDir": "", - "customPath": "./vendor/bin/phpunit" - } -} \ No newline at end of file + "minCoveredMsi": 100, + "testFramework": "phpunit" +} diff --git a/phpunit.xml b/phpunit.xml index 6242715..6af60b0 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -5,6 +5,7 @@ bootstrap="vendor/autoload.php" failOnRisky="true" failOnWarning="true" + executionOrder="random" cacheDirectory=".phpunit.cache" beStrictAboutOutputDuringTests="true"> @@ -25,14 +26,15 @@ + + - - + diff --git a/src/Driver/Http/Endpoints/PointOfInterest/Search/Dtos/Response.php b/src/Driver/Http/Endpoints/PointOfInterest/Search/Dtos/Response.php index 7b67132..15173da 100644 --- a/src/Driver/Http/Endpoints/PointOfInterest/Search/Dtos/Response.php +++ b/src/Driver/Http/Endpoints/PointOfInterest/Search/Dtos/Response.php @@ -6,7 +6,7 @@ use PointsOfInterest\Domain\Models\PointOfInterest; use PointsOfInterest\Domain\Models\PointsOfInterest; -use TinyBlocks\Collection\Internal\Operations\Transform\PreserveKeys; +use TinyBlocks\Collection\PreserveKeys; final readonly class Response {