From c07c42b7964da868fa413abe948ec890b27bfc9c Mon Sep 17 00:00:00 2001 From: Daniel Leech Date: Sat, 16 Mar 2024 11:44:54 +0000 Subject: [PATCH 1/5] Upgradfe php-cs-fxier --- .gitignore | 2 +- .php-cs-fixer.dist.php | 26 ++++++++++++++++++++++++++ composer.json | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .php-cs-fixer.dist.php diff --git a/.gitignore b/.gitignore index 27d8726..89238c5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ /vendor /bin/fink.phar -/.php_cs.cache +/.php-cs-fixer.cache /composer.lock /tests/Workspace /.phpactor.yml diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000..b4fdbfa --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,26 @@ +in('lib') + ->in('tests') +; + +return (new Config()) + ->setRiskyAllowed(true) + ->setRules([ + '@PSR2' => true, + 'array_syntax' => ['syntax' => 'short'], + 'no_unused_imports' => true, + 'visibility_required' => [ + 'elements' => [ + 'const', + 'method', + 'property', + ], + ], + ]) + ->setFinder($finder) +; + diff --git a/composer.json b/composer.json index a2fcb6b..509c7a7 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ }, "require-dev": { "amphp/phpunit-util": "^1.3", - "friendsofphp/php-cs-fixer": "^2.14", + "friendsofphp/php-cs-fixer": "^3.0", "phpactor/test-utils": "^1.0", "phpspec/prophecy-phpunit": "^2.0", "phpstan/phpstan": "^0.12.0", From bed525e68cfbc170f11f9bd3f61fcd4c98ffd6d3 Mon Sep 17 00:00:00 2001 From: Daniel Leech Date: Sat, 16 Mar 2024 11:53:12 +0000 Subject: [PATCH 2/5] Update phpstan and run 8.1/2 in CI --- .github/workflows/ci.yml | 2 + .php_cs.dist | 22 ---- composer.json | 2 +- lib/Model/ImmutableReportStore.php | 3 + lib/Model/Store/CircularReportStore.php | 2 +- lib/Model/Store/NullReportStore.php | 7 +- lib/Model/Urls.php | 5 +- phpstan-baseline.neon | 165 +++++++++--------------- 8 files changed, 76 insertions(+), 132 deletions(-) delete mode 100644 .php_cs.dist diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ead74cd..36376db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,6 +89,8 @@ jobs: - '7.3' - '7.4' - '8.0' + - '8.1' + - '8.2' steps: - diff --git a/.php_cs.dist b/.php_cs.dist deleted file mode 100644 index 0a31b78..0000000 --- a/.php_cs.dist +++ /dev/null @@ -1,22 +0,0 @@ -in('lib') - ->in('tests') -; - -return PhpCsFixer\Config::create() - ->setRules([ - '@PSR2' => true, - 'array_syntax' => ['syntax' => 'short'], - 'no_unused_imports' => true, - 'visibility_required' => [ - 'elements' => [ - 'const', - 'method', - 'property', - ], - ], - ]) - ->setFinder($finder) -; diff --git a/composer.json b/composer.json index 509c7a7..23238a1 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "friendsofphp/php-cs-fixer": "^3.0", "phpactor/test-utils": "^1.0", "phpspec/prophecy-phpunit": "^2.0", - "phpstan/phpstan": "^0.12.0", + "phpstan/phpstan": "^1.0", "phpunit/phpunit": "^9.0" }, "autoload": { diff --git a/lib/Model/ImmutableReportStore.php b/lib/Model/ImmutableReportStore.php index 486397c..546a2fd 100644 --- a/lib/Model/ImmutableReportStore.php +++ b/lib/Model/ImmutableReportStore.php @@ -5,6 +5,9 @@ use Countable; use IteratorAggregate; +/** + * @extends IteratorAggregate + */ interface ImmutableReportStore extends Countable, IteratorAggregate { } diff --git a/lib/Model/Store/CircularReportStore.php b/lib/Model/Store/CircularReportStore.php index 99b24b7..f6053be 100644 --- a/lib/Model/Store/CircularReportStore.php +++ b/lib/Model/Store/CircularReportStore.php @@ -36,7 +36,7 @@ public function add(Report $report): void /** * {@inheritDoc} */ - public function count() + public function count(): int { return count($this->reports); } diff --git a/lib/Model/Store/NullReportStore.php b/lib/Model/Store/NullReportStore.php index 0b46e9c..afd5568 100644 --- a/lib/Model/Store/NullReportStore.php +++ b/lib/Model/Store/NullReportStore.php @@ -5,21 +5,22 @@ use ArrayIterator; use DTL\Extension\Fink\Model\Report; use DTL\Extension\Fink\Model\ReportStore; +use Traversable; class NullReportStore implements ReportStore { /** * {@inheritDoc} */ - public function count() + public function count(): int { return 0; } /** - * {@inheritDoc} + * @return Traversable */ - public function getIterator() + public function getIterator(): Traversable { return new ArrayIterator(); } diff --git a/lib/Model/Urls.php b/lib/Model/Urls.php index d762898..989ed85 100644 --- a/lib/Model/Urls.php +++ b/lib/Model/Urls.php @@ -4,6 +4,7 @@ use ArrayIterator; use IteratorAggregate; +use Traversable; class Urls implements IteratorAggregate { @@ -32,9 +33,9 @@ private function add(Url $url) } /** - * {@inheritDoc} + * @return Traversable */ - public function getIterator() + public function getIterator(): Traversable { return new ArrayIterator($this->urls); } diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index b1a60a9..81e84ca 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -6,47 +6,47 @@ parameters: path: lib/Adapter/Artax/ImmutableCookieJar.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Adapter\\\\Artax\\\\NetscapeCookieFileJar\\:\\:store\\(\\) return type with generic interface Amp\\\\Promise does not specify its types\\: TValue$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Adapter\\\\Artax\\\\NetscapeCookieFileJar\\:\\:getAll\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 path: lib/Adapter/Artax/NetscapeCookieFileJar.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Adapter\\\\Artax\\\\NetscapeCookieFileJar\\:\\:getAll\\(\\) return type has no value type specified in iterable type array\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Adapter\\\\Artax\\\\NetscapeCookieFileJar\\:\\:store\\(\\) return type with generic interface Amp\\\\Promise does not specify its types\\: TValue$#" count: 1 path: lib/Adapter/Artax/NetscapeCookieFileJar.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\Command\\\\CrawlCommand\\:\\:configure\\(\\) has no return typehint specified\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\Command\\\\CrawlCommand\\:\\:castToArray\\(\\) has parameter \\$value with no type specified\\.$#" count: 1 path: lib/Console/Command/CrawlCommand.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\Command\\\\CrawlCommand\\:\\:castToInt\\(\\) has parameter \\$value with no typehint specified\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\Command\\\\CrawlCommand\\:\\:castToArray\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 path: lib/Console/Command/CrawlCommand.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\Command\\\\CrawlCommand\\:\\:castToString\\(\\) has parameter \\$value with no typehint specified\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\Command\\\\CrawlCommand\\:\\:castToBool\\(\\) has parameter \\$value with no type specified\\.$#" count: 1 path: lib/Console/Command/CrawlCommand.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\Command\\\\CrawlCommand\\:\\:castToBool\\(\\) has parameter \\$value with no typehint specified\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\Command\\\\CrawlCommand\\:\\:castToFloat\\(\\) has parameter \\$value with no type specified\\.$#" count: 1 path: lib/Console/Command/CrawlCommand.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\Command\\\\CrawlCommand\\:\\:castToArray\\(\\) has parameter \\$value with no typehint specified\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\Command\\\\CrawlCommand\\:\\:castToInt\\(\\) has parameter \\$value with no type specified\\.$#" count: 1 path: lib/Console/Command/CrawlCommand.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\Command\\\\CrawlCommand\\:\\:castToArray\\(\\) return type has no value type specified in iterable type array\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\Command\\\\CrawlCommand\\:\\:castToString\\(\\) has parameter \\$value with no type specified\\.$#" count: 1 path: lib/Console/Command/CrawlCommand.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\Command\\\\CrawlCommand\\:\\:castToFloat\\(\\) has parameter \\$value with no typehint specified\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\Command\\\\CrawlCommand\\:\\:configure\\(\\) has no return type specified\\.$#" count: 1 path: lib/Console/Command/CrawlCommand.php @@ -56,39 +56,34 @@ parameters: path: lib/Console/Display/ConcatenatingDisplay.php - - message: "#^Property DTL\\\\Extension\\\\Fink\\\\Console\\\\Display\\\\RateDisplay\\:\\:\\$lastRequestCount has no typehint specified\\.$#" - count: 1 - path: lib/Console/Display/RateDisplay.php - - - - message: "#^Property DTL\\\\Extension\\\\Fink\\\\Console\\\\Display\\\\RateDisplay\\:\\:\\$requestCounts has no typehint specified\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\Display\\\\RateDisplay\\:\\:averageRequestTime\\(\\) has no return type specified\\.$#" count: 1 path: lib/Console/Display/RateDisplay.php - - message: "#^Property DTL\\\\Extension\\\\Fink\\\\Console\\\\Display\\\\RateDisplay\\:\\:\\$initialTime has no typehint specified\\.$#" + message: "#^Property DTL\\\\Extension\\\\Fink\\\\Console\\\\Display\\\\RateDisplay\\:\\:\\$initialTime has no type specified\\.$#" count: 1 path: lib/Console/Display/RateDisplay.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\Display\\\\RateDisplay\\:\\:averageRequestTime\\(\\) has no return typehint specified\\.$#" + message: "#^Property DTL\\\\Extension\\\\Fink\\\\Console\\\\Display\\\\RateDisplay\\:\\:\\$lastRequestCount has no type specified\\.$#" count: 1 path: lib/Console/Display/RateDisplay.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\Display\\\\RateDisplay\\:\\:averageRequestTime\\(\\) has parameter \\$reportStore with no value type specified in iterable type DTL\\\\Extension\\\\Fink\\\\Model\\\\Store\\\\ImmutableReportStore\\.$#" + message: "#^Property DTL\\\\Extension\\\\Fink\\\\Console\\\\Display\\\\RateDisplay\\:\\:\\$requestCounts has no type specified\\.$#" count: 1 path: lib/Console/Display/RateDisplay.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\Display\\\\ReportListDisplay\\:\\:resolveFormat\\(\\) has no return typehint specified\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\Display\\\\ReportListDisplay\\:\\:resolveFormat\\(\\) has no return type specified\\.$#" count: 1 path: lib/Console/Display/ReportListDisplay.php - - message: "#^Property DTL\\\\Extension\\\\Fink\\\\Console\\\\DisplayBuilder\\:\\:\\$default type has no value type specified in iterable type array\\.$#" + message: "#^Property DTL\\\\Extension\\\\Fink\\\\Console\\\\Display\\\\UptimeDisplay\\:\\:\\$windowSize is unused\\.$#" count: 1 - path: lib/Console/DisplayBuilder.php + path: lib/Console/Display/UptimeDisplay.php - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\DisplayBuilder\\:\\:__construct\\(\\) has parameter \\$defaut with no value type specified in iterable type array\\.$#" @@ -116,9 +111,9 @@ parameters: path: lib/Console/DisplayBuilder.php - - message: "#^Property DTL\\\\Extension\\\\Fink\\\\Console\\\\DisplayRegistry\\:\\:\\$displays type has no value type specified in iterable type array\\.$#" + message: "#^Property DTL\\\\Extension\\\\Fink\\\\Console\\\\DisplayBuilder\\:\\:\\$default type has no value type specified in iterable type array\\.$#" count: 1 - path: lib/Console/DisplayRegistry.php + path: lib/Console/DisplayBuilder.php - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\DisplayRegistry\\:\\:__construct\\(\\) has parameter \\$displays with no value type specified in iterable type array\\.$#" @@ -126,42 +121,42 @@ parameters: path: lib/Console/DisplayRegistry.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\DisplayRegistry\\:\\:get\\(\\) has no return typehint specified\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\DisplayRegistry\\:\\:add\\(\\) has no return type specified\\.$#" count: 1 path: lib/Console/DisplayRegistry.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\DisplayRegistry\\:\\:add\\(\\) has no return typehint specified\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\DisplayRegistry\\:\\:get\\(\\) has no return type specified\\.$#" count: 1 path: lib/Console/DisplayRegistry.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\HeaderParser\\:\\:parseHeaders\\(\\) has no return typehint specified\\.$#" + message: "#^Property DTL\\\\Extension\\\\Fink\\\\Console\\\\DisplayRegistry\\:\\:\\$displays type has no value type specified in iterable type array\\.$#" count: 1 - path: lib/Console/HeaderParser.php + path: lib/Console/DisplayRegistry.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\HeaderParser\\:\\:parseHeaders\\(\\) has parameter \\$rawHeaders with no value type specified in iterable type array\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\HeaderParser\\:\\:parseHeaders\\(\\) has no return type specified\\.$#" count: 1 path: lib/Console/HeaderParser.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\DispatcherBuilder\\:\\:create\\(\\) has parameter \\$urls with no value type specified in iterable type array\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Console\\\\HeaderParser\\:\\:parseHeaders\\(\\) has parameter \\$rawHeaders with no value type specified in iterable type array\\.$#" count: 1 - path: lib/DispatcherBuilder.php + path: lib/Console/HeaderParser.php - - message: "#^Property DTL\\\\Extension\\\\Fink\\\\DispatcherBuilder\\:\\:\\$excludeUrlPatterns type has no value type specified in iterable type array\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\DispatcherBuilder\\:\\:buildPublishStream\\(\\) has no return type specified\\.$#" count: 1 path: lib/DispatcherBuilder.php - - message: "#^Property DTL\\\\Extension\\\\Fink\\\\DispatcherBuilder\\:\\:\\$headers type has no value type specified in iterable type array\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\DispatcherBuilder\\:\\:buildPublisher\\(\\) has no return type specified\\.$#" count: 1 path: lib/DispatcherBuilder.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\DispatcherBuilder\\:\\:__construct\\(\\) has parameter \\$baseUrls with no value type specified in iterable type DTL\\\\Extension\\\\Fink\\\\Model\\\\Urls\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\DispatcherBuilder\\:\\:create\\(\\) has parameter \\$urls with no value type specified in iterable type array\\.$#" count: 1 path: lib/DispatcherBuilder.php @@ -171,64 +166,64 @@ parameters: path: lib/DispatcherBuilder.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\DispatcherBuilder\\:\\:publishResource\\(\\) has parameter \\$resource with no typehint specified\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\DispatcherBuilder\\:\\:headers\\(\\) has parameter \\$headers with no value type specified in iterable type array\\.$#" count: 1 path: lib/DispatcherBuilder.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\DispatcherBuilder\\:\\:headers\\(\\) has parameter \\$headers with no value type specified in iterable type array\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\DispatcherBuilder\\:\\:includeLinks\\(\\) has parameter \\$includeLinks with no value type specified in iterable type array\\.$#" count: 1 path: lib/DispatcherBuilder.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\DispatcherBuilder\\:\\:includeLinks\\(\\) has parameter \\$includeLinks with no value type specified in iterable type array\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\DispatcherBuilder\\:\\:publishResource\\(\\) has parameter \\$resource with no type specified\\.$#" count: 1 path: lib/DispatcherBuilder.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\DispatcherBuilder\\:\\:buildPublisher\\(\\) has no return typehint specified\\.$#" + message: "#^Property DTL\\\\Extension\\\\Fink\\\\DispatcherBuilder\\:\\:\\$excludeUrlPatterns type has no value type specified in iterable type array\\.$#" count: 1 path: lib/DispatcherBuilder.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\DispatcherBuilder\\:\\:buildPublishStream\\(\\) has no return typehint specified\\.$#" + message: "#^Property DTL\\\\Extension\\\\Fink\\\\DispatcherBuilder\\:\\:\\$headers type has no value type specified in iterable type array\\.$#" count: 1 path: lib/DispatcherBuilder.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Crawler\\:\\:crawl\\(\\) return type has no value type specified in iterable type Generator\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\FinkExtension\\:\\:configure\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 - path: lib/Model/Crawler.php + path: lib/FinkExtension.php - - message: "#^Argument of an invalid type DOMNodeList\\|false supplied for foreach, only iterables are supported\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\FinkExtension\\:\\:configure\\(\\) should return array but return statement is missing\\.$#" count: 1 - path: lib/Model/Crawler.php + path: lib/FinkExtension.php - - message: "#^Property DTL\\\\Extension\\\\Fink\\\\Model\\\\Dispatcher\\:\\:\\$store type has no value type specified in iterable type DTL\\\\Extension\\\\Fink\\\\Model\\\\ReportStore\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\FinkExtension\\:\\:load\\(\\) has no return type specified\\.$#" count: 1 - path: lib/Model/Dispatcher.php + path: lib/FinkExtension.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Dispatcher\\:\\:__construct\\(\\) has parameter \\$store with no value type specified in iterable type DTL\\\\Extension\\\\Fink\\\\Model\\\\ReportStore\\.$#" + message: "#^Argument of an invalid type DOMNodeList\\\\|false supplied for foreach, only iterables are supported\\.$#" count: 1 - path: lib/Model/Dispatcher.php + path: lib/Model/Crawler.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Dispatcher\\:\\:dispatch\\(\\) has no return typehint specified\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Dispatcher\\:\\:dispatch\\(\\) has no return type specified\\.$#" count: 1 path: lib/Model/Dispatcher.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\DispatcherBuilderFactory\\:\\:createForUrls\\(\\) has parameter \\$urls with no typehint specified\\.$#" + message: "#^Property DTL\\\\Extension\\\\Fink\\\\Model\\\\Dispatcher\\:\\:\\$maxDistance is unused\\.$#" count: 1 - path: lib/Model/DispatcherBuilderFactory.php + path: lib/Model/Dispatcher.php - - message: "#^Interface DTL\\\\Extension\\\\Fink\\\\Model\\\\ImmutableReportStore extends generic interface IteratorAggregate but does not specify its types\\: TKey, TValue$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\DispatcherBuilderFactory\\:\\:createForUrls\\(\\) has parameter \\$urls with no type specified\\.$#" count: 1 - path: lib/Model/ImmutableReportStore.php + path: lib/Model/DispatcherBuilderFactory.php - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Limiter\\\\ChainLimiter\\:\\:__construct\\(\\) has parameter \\$limiters with no value type specified in iterable type array\\.$#" @@ -236,52 +231,52 @@ parameters: path: lib/Model/Limiter/ChainLimiter.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Limiter\\\\ChainLimiter\\:\\:add\\(\\) has no return typehint specified\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Limiter\\\\ChainLimiter\\:\\:add\\(\\) has no return type specified\\.$#" count: 1 path: lib/Model/Limiter/ChainLimiter.php - - message: "#^Property DTL\\\\Extension\\\\Fink\\\\Model\\\\Limiter\\\\RateLimiter\\:\\:\\$lastRequest has no typehint specified\\.$#" + message: "#^Property DTL\\\\Extension\\\\Fink\\\\Model\\\\Limiter\\\\RateLimiter\\:\\:\\$lastRequest has no type specified\\.$#" count: 1 path: lib/Model/Limiter/RateLimiter.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Publisher\\\\CsvStreamPublisher\\:\\:__construct\\(\\) has parameter \\$stream with no typehint specified\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Publisher\\\\CsvStreamPublisher\\:\\:__construct\\(\\) has parameter \\$stream with no type specified\\.$#" count: 1 path: lib/Model/Publisher/CsvStreamPublisher.php - - message: "#^Property DTL\\\\Extension\\\\Fink\\\\Model\\\\Queue\\\\DedupeQueue\\:\\:\\$seen has no typehint specified\\.$#" + message: "#^Property DTL\\\\Extension\\\\Fink\\\\Model\\\\Queue\\\\DedupeQueue\\:\\:\\$seen has no type specified\\.$#" count: 1 path: lib/Model/Queue/DedupeQueue.php - - message: "#^Property DTL\\\\Extension\\\\Fink\\\\Model\\\\Queue\\\\ExcludingQueue\\:\\:\\$patterns type has no value type specified in iterable type array\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Queue\\\\ExcludingQueue\\:\\:__construct\\(\\) has parameter \\$patterns with no value type specified in iterable type array\\.$#" count: 1 path: lib/Model/Queue/ExcludingQueue.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Queue\\\\ExcludingQueue\\:\\:__construct\\(\\) has parameter \\$patterns with no value type specified in iterable type array\\.$#" + message: "#^Property DTL\\\\Extension\\\\Fink\\\\Model\\\\Queue\\\\ExcludingQueue\\:\\:\\$patterns type has no value type specified in iterable type array\\.$#" count: 1 path: lib/Model/Queue/ExcludingQueue.php - - message: "#^Property DTL\\\\Extension\\\\Fink\\\\Model\\\\Queue\\\\RealUrlQueue\\:\\:\\$urls has no typehint specified\\.$#" + message: "#^Property DTL\\\\Extension\\\\Fink\\\\Model\\\\Queue\\\\RealUrlQueue\\:\\:\\$urls has no type specified\\.$#" count: 1 path: lib/Model/Queue/RealUrlQueue.php - - message: "#^Property DTL\\\\Extension\\\\Fink\\\\Model\\\\ReferringElement\\:\\:\\$xpath has no typehint specified\\.$#" + message: "#^Property DTL\\\\Extension\\\\Fink\\\\Model\\\\ReferringElement\\:\\:\\$baseUri has no type specified\\.$#" count: 1 path: lib/Model/ReferringElement.php - - message: "#^Property DTL\\\\Extension\\\\Fink\\\\Model\\\\ReferringElement\\:\\:\\$title has no typehint specified\\.$#" + message: "#^Property DTL\\\\Extension\\\\Fink\\\\Model\\\\ReferringElement\\:\\:\\$title has no type specified\\.$#" count: 1 path: lib/Model/ReferringElement.php - - message: "#^Property DTL\\\\Extension\\\\Fink\\\\Model\\\\ReferringElement\\:\\:\\$baseUri has no typehint specified\\.$#" + message: "#^Property DTL\\\\Extension\\\\Fink\\\\Model\\\\ReferringElement\\:\\:\\$xpath has no type specified\\.$#" count: 1 path: lib/Model/ReferringElement.php @@ -291,44 +286,14 @@ parameters: path: lib/Model/Report.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\ReportBuilder\\:\\:withTimestamp\\(\\) has no return typehint specified\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\ReportBuilder\\:\\:withTimestamp\\(\\) has no return type specified\\.$#" count: 1 path: lib/Model/ReportBuilder.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Status\\:\\:__construct\\(\\) has parameter \\$reportStore with no value type specified in iterable type DTL\\\\Extension\\\\Fink\\\\Model\\\\Store\\\\ImmutableReportStore\\.$#" - count: 1 - path: lib/Model/Status.php - - - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Status\\:\\:reportStore\\(\\) return type has no value type specified in iterable type DTL\\\\Extension\\\\Fink\\\\Model\\\\Store\\\\ImmutableReportStore\\.$#" - count: 1 - path: lib/Model/Status.php - - - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Store\\\\CircularReportStore\\:\\:getIterator\\(\\) return type has no value type specified in iterable type Iterator\\.$#" - count: 1 - path: lib/Model/Store/CircularReportStore.php - - - - message: "#^Property DTL\\\\Extension\\\\Fink\\\\Model\\\\Store\\\\ImmutableReportStore\\:\\:\\$innerStore type has no value type specified in iterable type DTL\\\\Extension\\\\Fink\\\\Model\\\\ReportStore\\.$#" + message: "#^Property DTL\\\\Extension\\\\Fink\\\\Model\\\\ReportBuilder\\:\\:\\$referringUrl is never read, only written\\.$#" count: 1 - path: lib/Model/Store/ImmutableReportStore.php - - - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Store\\\\ImmutableReportStore\\:\\:__construct\\(\\) has parameter \\$innerStore with no value type specified in iterable type DTL\\\\Extension\\\\Fink\\\\Model\\\\ReportStore\\.$#" - count: 1 - path: lib/Model/Store/ImmutableReportStore.php - - - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Store\\\\ImmutableReportStore\\:\\:getIterator\\(\\) return type has no value type specified in iterable type Traversable\\\\.$#" - count: 1 - path: lib/Model/Store/ImmutableReportStore.php - - - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Store\\\\NullReportStore\\:\\:getIterator\\(\\) return type has no value type specified in iterable type Traversable\\\\.$#" - count: 1 - path: lib/Model/Store/NullReportStore.php + path: lib/Model/ReportBuilder.php - message: "#^Class DTL\\\\Extension\\\\Fink\\\\Model\\\\Urls implements generic interface IteratorAggregate but does not specify its types\\: TKey, TValue$#" @@ -341,22 +306,16 @@ parameters: path: lib/Model/Urls.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Urls\\:\\:fromUrls\\(\\) has no return typehint specified\\.$#" - count: 1 - path: lib/Model/Urls.php - - - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Urls\\:\\:fromUrls\\(\\) has parameter \\$urls with no value type specified in iterable type array\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Urls\\:\\:add\\(\\) has no return type specified\\.$#" count: 1 path: lib/Model/Urls.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Urls\\:\\:add\\(\\) has no return typehint specified\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Urls\\:\\:fromUrls\\(\\) has no return type specified\\.$#" count: 1 path: lib/Model/Urls.php - - message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Urls\\:\\:getIterator\\(\\) return type has no value type specified in iterable type Traversable\\\\.$#" + message: "#^Method DTL\\\\Extension\\\\Fink\\\\Model\\\\Urls\\:\\:fromUrls\\(\\) has parameter \\$urls with no value type specified in iterable type array\\.$#" count: 1 path: lib/Model/Urls.php - From 53488b8f6092fb0135c4894eefb19d4b7138aacf Mon Sep 17 00:00:00 2001 From: Daniel Leech Date: Sat, 16 Mar 2024 11:55:12 +0000 Subject: [PATCH 3/5] Bummp min version to 8.0 --- .github/workflows/ci.yml | 6 ++---- composer.json | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36376db..da81458 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: php-version: - - '7.3' + - '8.0' steps: - @@ -53,7 +53,7 @@ jobs: strategy: matrix: php-version: - - '7.3' + - '8.0' steps: - @@ -86,8 +86,6 @@ jobs: strategy: matrix: php-version: - - '7.3' - - '7.4' - '8.0' - '8.1' - '8.2' diff --git a/composer.json b/composer.json index 23238a1..8bea826 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": "^7.3||^8.0", + "php": "^8.0", "amphp/dns": "^v1.2.2", "amphp/file": "^1", "amphp/http-client": "^4.1.0", From f69c6fda903c78403f223bd69385345dd9322dc3 Mon Sep 17 00:00:00 2001 From: Daniel Leech Date: Sat, 16 Mar 2024 11:56:34 +0000 Subject: [PATCH 4/5] Bump changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b65a68..ceda93f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## [0.11.0] 2024-03-16 + +- Bump minimum version to PHP 8.0 +- Include `.dat` files @M-arcus + ## [0.10.2] 2021-01-28 - Consider `base` element when resolving URLs (#109) - @eHtmlu From 51d8871f24f2972aca3201c10d0d82ffec6a378b Mon Sep 17 00:00:00 2001 From: Daniel Leech Date: Sat, 16 Mar 2024 11:57:28 +0000 Subject: [PATCH 5/5] Release 8.0 --- .github/workflows/release-phar.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-phar.yml b/.github/workflows/release-phar.yml index da58e57..4e0874f 100644 --- a/.github/workflows/release-phar.yml +++ b/.github/workflows/release-phar.yml @@ -13,10 +13,10 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Set PHP 7.3 + - name: Set PHP 8.0 uses: shivammathur/setup-php@v2 with: - php-version: '7.3' + php-version: '8.0' - name: Compile fink.phar run: |