diff --git a/.gitattributes b/.gitattributes index 1e89265..3f1189b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -16,22 +16,22 @@ *.yml text # Ensure those won't be messed up with +*.phar binary *.png binary *.jpg binary *.gif binary *.ttf binary -# Ignore some meta files when creating an archive of this repository -/.github export-ignore -/.editorconfig export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore -/.phpunit-watcher.yml export-ignore -/.styleci.yml export-ignore -/infection.json.dist export-ignore -/phpunit.xml.dist export-ignore -/psalm.xml export-ignore -/docs export-ignore +# Exclude development and metadata files from distribution archive +* export-ignore +/src/ -export-ignore +/src/** -export-ignore +/tests/ -export-ignore +/tests/** -export-ignore +/composer.json -export-ignore +/README.md -export-ignore +/CHANGELOG.md -export-ignore +/LICENSE.md -export-ignore # Avoid merge conflicts in CHANGELOG # https://about.gitlab.com/2015/02/10/gitlab-reduced-merge-conflicts-by-90-percent-with-changelog-placeholders/ diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index c691b45..6677094 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -28,6 +28,6 @@ jobs: ['ubuntu-latest'] php: >- ['8.5'] - min-covered-msi: 100 + infection-args: "--ignore-msi-with-no-mutations --min-covered-msi=100" secrets: STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} diff --git a/.gitignore b/.gitignore index 8c3d8ad..f1fb048 100644 --- a/.gitignore +++ b/.gitignore @@ -22,12 +22,10 @@ Thumbs.db # composer itself is not needed composer.phar -# phpunit itself is not needed -phpunit.phar -# local phpunit config +# PhpUnit +/phpunit.phar /phpunit.xml -# phpunit cache -/.phpunit.cache/* +/.phpunit.cache # PHP CS Fixer /.php-cs-fixer.cache diff --git a/composer.json b/composer.json index e5ebb99..606bd9a 100644 --- a/composer.json +++ b/composer.json @@ -37,10 +37,10 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.3", - "friendsofphp/php-cs-fixer": "^3.89.2", + "friendsofphp/php-cs-fixer": "^3.91.3", "maglnet/composer-require-checker": "^4.7.1", - "phpunit/phpunit": "^10.5.52", - "rector/rector": "^2.2.8", + "phpunit/phpunit": "^10.5.60", + "rector/rector": "^2.2.14", "spatie/phpunit-watcher": "^1.24" }, "autoload": { diff --git a/rector.php b/rector.php index dd88e1b..54537c2 100644 --- a/rector.php +++ b/rector.php @@ -6,24 +6,19 @@ use Rector\Config\RectorConfig; use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector; use Rector\Php81\Rector\Property\ReadOnlyPropertyRector; -use Rector\Set\ValueObject\LevelSetList; +use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector; -return static function (RectorConfig $rectorConfig): void { - $rectorConfig->paths([ +return RectorConfig::configure() + ->withPaths([ __DIR__ . '/src', __DIR__ . '/tests', - ]); - - // register a single rule - $rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class); - - // define sets of rules - $rectorConfig->sets([ - LevelSetList::UP_TO_PHP_81, - ]); - - $rectorConfig->skip([ + ]) + ->withPhpSets(php81: true) + ->withRules([ + InlineConstructorDefaultToPropertyRector::class, + ]) + ->withSkip([ ClosureToArrowFunctionRector::class, ReadOnlyPropertyRector::class, + NullToStrictStringFuncCallArgRector::class, ]); -}; diff --git a/tools/infection/composer.json b/tools/infection/composer.json index 18be2ea..863d41f 100644 --- a/tools/infection/composer.json +++ b/tools/infection/composer.json @@ -1,6 +1,6 @@ { "require-dev": { - "infection/infection": "^0.26 || ^0.31.9" + "infection/infection": "^0.26.21 || ^0.31.9" }, "config": { "allow-plugins": { diff --git a/tools/psalm/composer.json b/tools/psalm/composer.json index cfbd3f4..b048ebf 100644 --- a/tools/psalm/composer.json +++ b/tools/psalm/composer.json @@ -1,5 +1,5 @@ { "require-dev": { - "vimeo/psalm": "^5.26.1 || ^6.10.3" + "vimeo/psalm": "^6.14.1" } }