diff --git a/composer.json b/composer.json index 72955489..c623e523 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "require-dev": { "ergebnis/composer-normalize": "^2.29.0", "ergebnis/data-provider": "^1.3.0", - "ergebnis/php-cs-fixer-config": "^5.2.0", + "ergebnis/php-cs-fixer-config": "^5.3.1", "fakerphp/faker": "^1.21.0", "infection/infection": "~0.26.19", "phpunit/phpunit": "^9.6.3", diff --git a/composer.lock b/composer.lock index db2bcb53..73276721 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "38523c63bfa52dcb581a20b451fe42f3", + "content-hash": "c36fb06873a3cc0aed671da2b4aa3b5a", "packages": [], "packages-dev": [ { @@ -594,30 +594,30 @@ }, { "name": "doctrine/annotations", - "version": "1.14.2", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "ad785217c1e9555a7d6c6c8c9f406395a5e2882b" + "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/ad785217c1e9555a7d6c6c8c9f406395a5e2882b", - "reference": "ad785217c1e9555a7d6c6c8c9f406395a5e2882b", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", + "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", "shasum": "" }, "require": { - "doctrine/lexer": "^1 || ^2", + "doctrine/lexer": "^2 || ^3", "ext-tokenizer": "*", - "php": "^7.1 || ^8.0", + "php": "^7.2 || ^8.0", "psr/cache": "^1 || ^2 || ^3" }, "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "~1.4.10 || ^1.8.0", + "doctrine/cache": "^2.0", + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.8.0", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^4.4 || ^5.4 || ^6", + "symfony/cache": "^5.4 || ^6", "vimeo/psalm": "^4.10" }, "suggest": { @@ -664,9 +664,9 @@ ], "support": { "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.14.2" + "source": "https://github.com/doctrine/annotations/tree/2.0.1" }, - "time": "2022-12-15T06:48:22+00:00" + "time": "2023-02-02T22:02:53+00:00" }, { "name": "doctrine/deprecations", @@ -1183,34 +1183,34 @@ }, { "name": "ergebnis/php-cs-fixer-config", - "version": "5.2.0", + "version": "5.3.1", "source": { "type": "git", "url": "https://github.com/ergebnis/php-cs-fixer-config.git", - "reference": "54745143749e09c0a6ba7554b640524ab04e98bf" + "reference": "1f9b13fe75ebe08396f07dc6baa2f66f4856efc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/php-cs-fixer-config/zipball/54745143749e09c0a6ba7554b640524ab04e98bf", - "reference": "54745143749e09c0a6ba7554b640524ab04e98bf", + "url": "https://api.github.com/repos/ergebnis/php-cs-fixer-config/zipball/1f9b13fe75ebe08396f07dc6baa2f66f4856efc6", + "reference": "1f9b13fe75ebe08396f07dc6baa2f66f4856efc6", "shasum": "" }, "require": { "ext-filter": "*", - "friendsofphp/php-cs-fixer": "~3.13.2", + "friendsofphp/php-cs-fixer": "~3.14.4", "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "require-dev": { "ergebnis/composer-normalize": "^2.29.0", "ergebnis/license": "^2.1.0", "fakerphp/faker": "^1.21.0", - "infection/infection": "~0.26.6", - "phpunit/phpunit": "^9.5.27", + "infection/infection": "~0.26.19", + "phpunit/phpunit": "^9.6.3", "psalm/plugin-phpunit": "~0.18.4", - "rector/rector": "~0.15.2", + "rector/rector": "~0.15.13", "symfony/filesystem": "^5.0.0 || ^6.0.0", "symfony/process": "^5.0.0 || ^6.0.0", - "vimeo/psalm": "^5.4.0" + "vimeo/psalm": "^5.6.0" }, "type": "library", "extra": { @@ -1240,7 +1240,7 @@ "issues": "https://github.com/ergebnis/php-cs-fixer-config/issues", "source": "https://github.com/ergebnis/php-cs-fixer-config" }, - "time": "2023-01-05T19:42:35+00:00" + "time": "2023-02-09T21:58:44+00:00" }, { "name": "fakerphp/faker", @@ -1474,51 +1474,52 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.13.2", + "version": "v3.14.4", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "3952f08a81bd3b1b15e11c3de0b6bf037faa8496" + "reference": "1b3d9dba63d93b8a202c31e824748218781eae6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/3952f08a81bd3b1b15e11c3de0b6bf037faa8496", - "reference": "3952f08a81bd3b1b15e11c3de0b6bf037faa8496", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/1b3d9dba63d93b8a202c31e824748218781eae6b", + "reference": "1b3d9dba63d93b8a202c31e824748218781eae6b", "shasum": "" }, "require": { - "composer/semver": "^3.2", + "composer/semver": "^3.3", "composer/xdebug-handler": "^3.0.3", - "doctrine/annotations": "^1.13", + "doctrine/annotations": "^2", + "doctrine/lexer": "^2 || ^3", "ext-json": "*", "ext-tokenizer": "*", "php": "^7.4 || ^8.0", - "sebastian/diff": "^4.0", + "sebastian/diff": "^4.0 || ^5.0", "symfony/console": "^5.4 || ^6.0", "symfony/event-dispatcher": "^5.4 || ^6.0", "symfony/filesystem": "^5.4 || ^6.0", "symfony/finder": "^5.4 || ^6.0", "symfony/options-resolver": "^5.4 || ^6.0", - "symfony/polyfill-mbstring": "^1.23", - "symfony/polyfill-php80": "^1.25", - "symfony/polyfill-php81": "^1.25", + "symfony/polyfill-mbstring": "^1.27", + "symfony/polyfill-php80": "^1.27", + "symfony/polyfill-php81": "^1.27", "symfony/process": "^5.4 || ^6.0", "symfony/stopwatch": "^5.4 || ^6.0" }, "require-dev": { "justinrainbow/json-schema": "^5.2", "keradus/cli-executor": "^2.0", - "mikey179/vfsstream": "^1.6.10", - "php-coveralls/php-coveralls": "^2.5.2", + "mikey179/vfsstream": "^1.6.11", + "php-coveralls/php-coveralls": "^2.5.3", "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy": "^1.15", + "phpspec/prophecy": "^1.16", "phpspec/prophecy-phpunit": "^2.0", "phpunit/phpunit": "^9.5", "phpunitgoodpractices/polyfill": "^1.6", "phpunitgoodpractices/traits": "^1.9.2", - "symfony/phpunit-bridge": "^6.0", + "symfony/phpunit-bridge": "^6.2.3", "symfony/yaml": "^5.4 || ^6.0" }, "suggest": { @@ -1551,7 +1552,7 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.13.2" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.14.4" }, "funding": [ { @@ -1559,7 +1560,7 @@ "type": "github" } ], - "time": "2023-01-02T23:53:50+00:00" + "time": "2023-02-09T21:49:13+00:00" }, { "name": "infection/abstract-testframework-adapter", @@ -4513,16 +4514,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v6.0.17", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "42b3985aa07837c9df36013ec5b965e9f2d480bc" + "reference": "2eaf8e63bc5b8cefabd4a800157f0d0c094f677a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/42b3985aa07837c9df36013ec5b965e9f2d480bc", - "reference": "42b3985aa07837c9df36013ec5b965e9f2d480bc", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2eaf8e63bc5b8cefabd4a800157f0d0c094f677a", + "reference": "2eaf8e63bc5b8cefabd4a800157f0d0c094f677a", "shasum": "" }, "require": { @@ -4576,7 +4577,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.17" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.19" }, "funding": [ { @@ -4592,7 +4593,7 @@ "type": "tidelift" } ], - "time": "2022-12-14T15:52:41+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -4799,16 +4800,16 @@ }, { "name": "symfony/options-resolver", - "version": "v6.0.3", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "51f7006670febe4cbcbae177cbffe93ff833250d" + "reference": "6a180d1c45e0d9797470ca9eb46215692de00fa3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/51f7006670febe4cbcbae177cbffe93ff833250d", - "reference": "51f7006670febe4cbcbae177cbffe93ff833250d", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/6a180d1c45e0d9797470ca9eb46215692de00fa3", + "reference": "6a180d1c45e0d9797470ca9eb46215692de00fa3", "shasum": "" }, "require": { @@ -4846,7 +4847,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v6.0.3" + "source": "https://github.com/symfony/options-resolver/tree/v6.0.19" }, "funding": [ { @@ -4862,7 +4863,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/polyfill-ctype", @@ -5501,16 +5502,16 @@ }, { "name": "symfony/stopwatch", - "version": "v6.0.13", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "7554fde6848af5ef1178f8ccbdbdb8ae1092c70a" + "reference": "011e781839dd1d2eb8119f65ac516a530f60226d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/7554fde6848af5ef1178f8ccbdbdb8ae1092c70a", - "reference": "7554fde6848af5ef1178f8ccbdbdb8ae1092c70a", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/011e781839dd1d2eb8119f65ac516a530f60226d", + "reference": "011e781839dd1d2eb8119f65ac516a530f60226d", "shasum": "" }, "require": { @@ -5543,7 +5544,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.0.13" + "source": "https://github.com/symfony/stopwatch/tree/v6.0.19" }, "funding": [ { @@ -5559,7 +5560,7 @@ "type": "tidelift" } ], - "time": "2022-09-28T15:52:47+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/string", diff --git a/psalm-baseline.xml b/psalm-baseline.xml index c9aa73f5..c8a6a1b1 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,63 +1,67 @@ - + - + return !\is_string($key); return !\is_string($value); - + $faker->fileExtension() $faker->fileExtension() - + $value - + $value $value - + \Generator \Generator \Generator - + \Generator - - + + [ + $value => 'foo', + ] + + $replacements $replacements - + \Generator \Generator - + $value - + $value $value - + \Generator \Generator \Generator - + \Generator \Generator diff --git a/test/Unit/HolderTest.php b/test/Unit/HolderTest.php index 42ecfbbb..4ea4aa83 100644 --- a/test/Unit/HolderTest.php +++ b/test/Unit/HolderTest.php @@ -50,7 +50,7 @@ public function testFromStringRejectsMultilineValue(string $value): void Holder::fromString($value); } - public function provideMultilineValue(): \Generator + public static function provideMultilineValue(): \Generator { $newLineCharacters = [ "\n", @@ -90,7 +90,7 @@ public function testFromStringReturnsHolder(string $value): void self::assertSame($value, $holder->toString()); } - public function provideValidValue(): \Generator + public static function provideValidValue(): \Generator { foreach (self::validValues() as $key => $value) { yield $key => [ @@ -109,7 +109,7 @@ public function testFromStringReturnsHolderWithTrimmedValue(string $value): void self::assertSame(\trim($value), $holder->toString()); } - public function provideUntrimmedValue(): \Generator + public static function provideUntrimmedValue(): \Generator { foreach (self::validValues() as $key => $value) { yield $key => [ diff --git a/test/Unit/RangeTest.php b/test/Unit/RangeTest.php index 9641e133..b51b59a6 100644 --- a/test/Unit/RangeTest.php +++ b/test/Unit/RangeTest.php @@ -150,7 +150,7 @@ public function testSinceReturnsRangeWhenStartYearIsLessThanCurrentYear(\DateTim self::assertSame($expected, $range->toString()); } - public function provideTimeZone(): \Generator + public static function provideTimeZone(): \Generator { $values = [ 'America/New_York', diff --git a/test/Unit/TemplateTest.php b/test/Unit/TemplateTest.php index 7ed344d5..c0dba122 100644 --- a/test/Unit/TemplateTest.php +++ b/test/Unit/TemplateTest.php @@ -124,7 +124,7 @@ public function testToStringRejectsReplacementsWithInvalidKeys(array $replacemen $template->toString($replacements); } - public function provideReplacementsWithInvalidKeys(): \Generator + public static function provideReplacementsWithInvalidKeys(): \Generator { $faker = self::faker(); @@ -154,7 +154,7 @@ public function testToStringRejectsReplacementsWithInvalidValues(array $replacem $template->toString($replacements); } - public function provideReplacementsWithInvalidValues(): \Generator + public static function provideReplacementsWithInvalidValues(): \Generator { $faker = self::faker(); diff --git a/test/Unit/UrlTest.php b/test/Unit/UrlTest.php index 2ca522f5..75c0e577 100644 --- a/test/Unit/UrlTest.php +++ b/test/Unit/UrlTest.php @@ -39,7 +39,7 @@ public function testFromStringRejectsInvalidValue(string $value): void Url::fromString($value); } - public function provideInvalidValue(): \Generator + public static function provideInvalidValue(): \Generator { $values = [ 'string-arbitrary' => self::faker()->sentence(), @@ -64,7 +64,7 @@ public function testFromStringReturnsUrl(string $value): void self::assertSame($value, $url->toString()); } - public function provideValidValue(): \Generator + public static function provideValidValue(): \Generator { foreach (self::validValues() as $key => $value) { yield $key => [ @@ -83,7 +83,7 @@ public function testFromStringReturnsUrlWithTrimmedValue(string $value): void self::assertSame(\trim($value), $url->toString()); } - public function provideUntrimmedValue(): \Generator + public static function provideUntrimmedValue(): \Generator { foreach (self::validValues() as $key => $value) { yield $key => [ diff --git a/test/Unit/YearTest.php b/test/Unit/YearTest.php index 4bac6222..b4dc47a0 100644 --- a/test/Unit/YearTest.php +++ b/test/Unit/YearTest.php @@ -39,7 +39,7 @@ public function testFromStringRejectsInvalidValue(string $value): void Year::fromString($value); } - public function provideInvalidValue(): \Generator + public static function provideInvalidValue(): \Generator { $faker = self::faker(); @@ -72,7 +72,7 @@ public function testFromStringReturnsYear(string $value): void self::assertSame($value, $year->toString()); } - public function provideValidValue(): \Generator + public static function provideValidValue(): \Generator { $values = [ 'string-end' => '0000',