From f3089c676df39e1645d08aff6f56c1d3207790a4 Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Tue, 11 Jun 2024 12:52:30 +0200 Subject: [PATCH 01/19] Add phpstan --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 465b54bc..7e4b8e13 100644 --- a/composer.json +++ b/composer.json @@ -58,6 +58,7 @@ "php-http/cache-plugin": "^1.7", "php-http/mock-client": "^1.2", "php-http/promise": "^1.0", + "phpstan/phpstan": "^1.11", "symfony/browser-kit": "^5.4 || ^6.0 || ^7.0", "symfony/cache": "^5.4 || ^6.0 || ^7.0", "symfony/dom-crawler": "^5.4 || ^6.0 || ^7.0", From 4839695b4f19509e0af39b1ad9376c43e6c39128 Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Tue, 11 Jun 2024 12:52:55 +0200 Subject: [PATCH 02/19] Remove duplicate --- composer.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 7e4b8e13..b5500924 100644 --- a/composer.json +++ b/composer.json @@ -43,12 +43,11 @@ }, "conflict": { "php-http/guzzle6-adapter": "<1.1", - "php-http/cache-plugin": "<1.7.0", + "php-http/cache-plugin": "<1.7", "php-http/curl-client": "<2.0", "php-http/socket-client": "<2.0", "kriswallsmith/buzz": "<0.17", - "php-http/react-adapter": "<3.0", - "php-http/cache-plugin": "<1.7" + "php-http/react-adapter": "<3.0" }, "require-dev": { "guzzlehttp/psr7": "^1.7 || ^2.0", From 4586a3cdacf070f0c92117261407f8503cb6b7fd Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Tue, 11 Jun 2024 13:07:24 +0200 Subject: [PATCH 03/19] Remove not needed anymore exclusion --- composer.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/composer.json b/composer.json index b5500924..8e7aa64d 100644 --- a/composer.json +++ b/composer.json @@ -84,10 +84,7 @@ "autoload": { "psr-4": { "Http\\HttplugBundle\\": "src/" - }, - "exclude-from-classmap": [ - "/Tests/Resources/MyPsr18TestClient.php" - ] + } }, "autoload-dev": { "psr-4": { From 1937753434813c979226ca465faa07e457033f80 Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Tue, 11 Jun 2024 13:42:27 +0200 Subject: [PATCH 04/19] Add PHPStan config and ci --- .github/workflows/continuous-integration.yml | 3 + .gitignore | 1 + phpstan-baseline.neon | 516 +++++++++++++++++++ phpstan.neon.dist | 9 + 4 files changed, 529 insertions(+) create mode 100644 phpstan-baseline.neon create mode 100644 phpstan.neon.dist diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 88e0a071..21dd8da0 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -104,5 +104,8 @@ jobs: dependency-versions: "${{ matrix.dependency-versions }}" composer-options: "${{ matrix.composer-options }}" + - name: "Run PHPStan" + run: "vendor/bin/phpstan analyse --no-progress" + - name: "Run PHPUnit" run: "composer test" diff --git a/.gitignore b/.gitignore index 70efea11..3a9ff611 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,6 @@ /build/ /composer.lock /phpspec.yml +/phpstan.neon /phpunit.xml /vendor/ diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 00000000..6ea77878 --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,516 @@ +parameters: + ignoreErrors: + - + message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\AutoDiscoveryFactory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/ClientFactory/AutoDiscoveryFactory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\BuzzFactory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/ClientFactory/BuzzFactory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\BuzzFactory\\:\\:createClient\\(\\) should return Psr\\\\Http\\\\Client\\\\ClientInterface but returns Buzz\\\\Client\\\\FileGetContents\\.$#" + count: 1 + path: src/ClientFactory/BuzzFactory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\BuzzFactory\\:\\:getOptions\\(\\) has no return type specified\\.$#" + count: 1 + path: src/ClientFactory/BuzzFactory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\BuzzFactory\\:\\:getOptions\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/ClientFactory/BuzzFactory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\ClientFactory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/ClientFactory/ClientFactory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\CurlFactory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/ClientFactory/CurlFactory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\CurlFactory\\:\\:createClient\\(\\) should return Psr\\\\Http\\\\Client\\\\ClientInterface but returns Http\\\\Client\\\\Curl\\\\Client\\.$#" + count: 1 + path: src/ClientFactory/CurlFactory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\Guzzle6Factory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/ClientFactory/Guzzle6Factory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\Guzzle7Factory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/ClientFactory/Guzzle7Factory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\MockFactory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/ClientFactory/MockFactory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\MockFactory\\:\\:setClient\\(\\) has no return type specified\\.$#" + count: 1 + path: src/ClientFactory/MockFactory.php + + - + message: "#^Negated boolean expression is always false\\.$#" + count: 1 + path: src/ClientFactory/MockFactory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\PluginClientFactory\\:\\:createPluginClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/ClientFactory/PluginClientFactory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\PluginClientFactory\\:\\:createPluginClient\\(\\) has parameter \\$pluginClientOptions with no value type specified in iterable type array\\.$#" + count: 1 + path: src/ClientFactory/PluginClientFactory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\ReactFactory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/ClientFactory/ReactFactory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\ReactFactory\\:\\:createClient\\(\\) should return Psr\\\\Http\\\\Client\\\\ClientInterface but returns Http\\\\Adapter\\\\React\\\\Client\\.$#" + count: 1 + path: src/ClientFactory/ReactFactory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\SocketFactory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/ClientFactory/SocketFactory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\SocketFactory\\:\\:createClient\\(\\) should return Psr\\\\Http\\\\Client\\\\ClientInterface but returns Http\\\\Client\\\\Socket\\\\Client\\.$#" + count: 1 + path: src/ClientFactory/SocketFactory.php + + - + message: "#^Call to static method create\\(\\) on an unknown class Symfony\\\\Component\\\\HttpClient\\\\HttpClient\\.$#" + count: 1 + path: src/ClientFactory/SymfonyFactory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\SymfonyFactory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/ClientFactory/SymfonyFactory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\SymfonyFactory\\:\\:createClient\\(\\) should return Psr\\\\Http\\\\Client\\\\ClientInterface but returns Symfony\\\\Component\\\\HttpClient\\\\HttplugClient\\.$#" + count: 1 + path: src/ClientFactory/SymfonyFactory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Collector\\:\\:activateStack\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Collector.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Collector\\:\\:addStack\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Collector.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Collector\\:\\:collect\\(\\) has parameter \\$exception with no type specified\\.$#" + count: 1 + path: src/Collector/Collector.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Collector\\:\\:countClientMessages\\(\\) has parameter \\$client with no type specified\\.$#" + count: 1 + path: src/Collector/Collector.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Collector\\:\\:deactivateStack\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Collector.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Collector\\:\\:getClientRootStacks\\(\\) has parameter \\$client with no type specified\\.$#" + count: 1 + path: src/Collector/Collector.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Collector\\:\\:getClients\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Collector/Collector.php + + - + message: "#^Strict comparison using \\=\\=\\= between null and Http\\\\HttplugBundle\\\\Collector\\\\Stack will always evaluate to false\\.$#" + count: 1 + path: src/Collector/Collector.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Formatter\\:\\:formatResponseForRequest\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Formatter.php + + - + message: "#^Property Http\\\\HttplugBundle\\\\Collector\\\\Formatter\\:\\:\\$curlFormatter \\(Http\\\\Message\\\\Formatter\\\\CurlCommandFormatter\\) does not accept Http\\\\Message\\\\Formatter\\.$#" + count: 1 + path: src/Collector/Formatter.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\PluginClientFactory\\:\\:createClient\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Collector/PluginClientFactory.php + + - + message: "#^PHPDoc tag @var above a method has no effect\\.$#" + count: 1 + path: src/Collector/PluginClientFactory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\PluginClientFactoryListener\\:\\:onEvent\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/PluginClientFactoryListener.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Profile\\:\\:setFailed\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Profile.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Profile\\:\\:setRequest\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Profile.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Profile\\:\\:setResponse\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Profile.php + + - + message: "#^Call to an undefined method Http\\\\Client\\\\HttpAsyncClient\\|Psr\\\\Http\\\\Client\\\\ClientInterface\\:\\:sendAsyncRequest\\(\\)\\.$#" + count: 1 + path: src/Collector/ProfileClient.php + + - + message: "#^Call to an undefined method Http\\\\Client\\\\HttpAsyncClient\\|Psr\\\\Http\\\\Client\\\\ClientInterface\\:\\:sendRequest\\(\\)\\.$#" + count: 1 + path: src/Collector/ProfileClient.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\ProfileClient\\:\\:doSendRequest\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/ProfileClient.php + + - + message: "#^Parameter \\#1 \\$duration of method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setDuration\\(\\) expects int, float\\|int given\\.$#" + count: 2 + path: src/Collector/ProfileClient.php + + - + message: "#^Property Http\\\\HttplugBundle\\\\Collector\\\\ProfileClient\\:\\:\\$eventNames type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Collector/ProfileClient.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\ProfileClientFactory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Collector/ProfileClientFactory.php + + - + message: "#^Result of && is always false\\.$#" + count: 1 + path: src/Collector/ProfileClientFactory.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\ProfilePlugin\\:\\:doHandleRequest\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/ProfilePlugin.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:addProfile\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Stack.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:getClientSlug\\(\\) should return string but returns string\\|null\\.$#" + count: 1 + path: src/Collector/Stack.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setClientException\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Stack.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setClientRequest\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Stack.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setClientResponse\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Stack.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setCurlCommand\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Stack.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setDuration\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Stack.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setFailed\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Stack.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setParent\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Stack.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setRequestHost\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Stack.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setRequestMethod\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Stack.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setRequestPort\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Stack.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setRequestScheme\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Stack.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setRequestTarget\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Stack.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setResponse\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Stack.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setResponseCode\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Stack.php + + - + message: "#^Property Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:\\$clientResponse \\(string\\) does not accept mixed\\.$#" + count: 1 + path: src/Collector/Stack.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\StackPlugin\\:\\:doHandleRequest\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/StackPlugin.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Twig\\\\HttpMessageMarkupExtension\\:\\:getFilters\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Collector/Twig/HttpMessageMarkupExtension.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Twig\\\\HttpMessageMarkupExtension\\:\\:getName\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Twig/HttpMessageMarkupExtension.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Twig\\\\HttpMessageMarkupExtension\\:\\:markup\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Collector/Twig/HttpMessageMarkupExtension.php + + - + message: "#^Property Http\\\\HttplugBundle\\\\Collector\\\\Twig\\\\HttpMessageMarkupExtension\\:\\:\\$dumper \\(Symfony\\\\Component\\\\VarDumper\\\\Dumper\\\\HtmlDumper\\) does not accept Symfony\\\\Component\\\\VarDumper\\\\Dumper\\\\DataDumperInterface\\.$#" + count: 1 + path: src/Collector/Twig/HttpMessageMarkupExtension.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:canBeEnabled\\(\\)\\.$#" + count: 1 + path: src/DependencyInjection/Configuration.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:fixXmlConfig\\(\\)\\.$#" + count: 3 + path: src/DependencyInjection/Configuration.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:prototype\\(\\)\\.$#" + count: 1 + path: src/DependencyInjection/Configuration.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:useAttributeAsKey\\(\\)\\.$#" + count: 1 + path: src/DependencyInjection/Configuration.php + + - + message: "#^Cannot call method end\\(\\) on Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeParentInterface\\|null\\.$#" + count: 7 + path: src/DependencyInjection/Configuration.php + + - + message: "#^Cannot call method scalarNode\\(\\) on Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeParentInterface\\|null\\.$#" + count: 2 + path: src/DependencyInjection/Configuration.php + + - + message: "#^Class Http\\\\Client\\\\Plugin\\\\Vcr\\\\NamingStrategy\\\\NamingStrategyInterface not found\\.$#" + count: 1 + path: src/DependencyInjection/Configuration.php + + - + message: "#^Class Http\\\\Client\\\\Plugin\\\\Vcr\\\\Recorder\\\\PlayerInterface not found\\.$#" + count: 1 + path: src/DependencyInjection/Configuration.php + + - + message: "#^Class Http\\\\Client\\\\Plugin\\\\Vcr\\\\Recorder\\\\RecorderInterface not found\\.$#" + count: 1 + path: src/DependencyInjection/Configuration.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\Configuration\\:\\:createClientPluginNode\\(\\) should return Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\ArrayNodeDefinition but returns Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\.$#" + count: 1 + path: src/DependencyInjection/Configuration.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\Configuration\\:\\:validateAuthenticationType\\(\\) has parameter \\$actual with no value type specified in iterable type array\\.$#" + count: 1 + path: src/DependencyInjection/Configuration.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\Configuration\\:\\:validateAuthenticationType\\(\\) has parameter \\$expected with no value type specified in iterable type array\\.$#" + count: 1 + path: src/DependencyInjection/Configuration.php + + - + message: "#^Parameter \\#1 \\$root of method Http\\\\HttplugBundle\\\\DependencyInjection\\\\Configuration\\:\\:configureClients\\(\\) expects Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\ArrayNodeDefinition, Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition given\\.$#" + count: 1 + path: src/DependencyInjection/Configuration.php + + - + message: "#^Parameter \\#1 \\$root of method Http\\\\HttplugBundle\\\\DependencyInjection\\\\Configuration\\:\\:configureSharedPlugins\\(\\) expects Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\ArrayNodeDefinition, Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition given\\.$#" + count: 1 + path: src/DependencyInjection/Configuration.php + + - + message: "#^Class Http\\\\Client\\\\Plugin\\\\Vcr\\\\RecordPlugin not found\\.$#" + count: 1 + path: src/DependencyInjection/HttplugExtension.php + + - + message: "#^Class Http\\\\Client\\\\Plugin\\\\Vcr\\\\ReplayPlugin not found\\.$#" + count: 1 + path: src/DependencyInjection/HttplugExtension.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configureAuthentication\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/DependencyInjection/HttplugExtension.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configureAuthentication\\(\\) has parameter \\$servicePrefix with no type specified\\.$#" + count: 1 + path: src/DependencyInjection/HttplugExtension.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configureAutoDiscoveryClients\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/DependencyInjection/HttplugExtension.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configureClient\\(\\) has parameter \\$arguments with no value type specified in iterable type array\\.$#" + count: 1 + path: src/DependencyInjection/HttplugExtension.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configureClients\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/DependencyInjection/HttplugExtension.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configurePlugin\\(\\) has parameter \\$pluginConfig with no value type specified in iterable type array\\.$#" + count: 1 + path: src/DependencyInjection/HttplugExtension.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configurePluginByName\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/DependencyInjection/HttplugExtension.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configurePlugins\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/DependencyInjection/HttplugExtension.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configureVcrPlugin\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/DependencyInjection/HttplugExtension.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configureVcrPlugin\\(\\) has parameter \\$prefix with no type specified\\.$#" + count: 1 + path: src/DependencyInjection/HttplugExtension.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configureVcrPlugin\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/DependencyInjection/HttplugExtension.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:getConfiguration\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/DependencyInjection/HttplugExtension.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/DependencyInjection/HttplugExtension.php + + - + message: "#^Parameter \\#1 \\$configuration of method Symfony\\\\Component\\\\DependencyInjection\\\\Extension\\\\Extension\\:\\:processConfiguration\\(\\) expects Symfony\\\\Component\\\\Config\\\\Definition\\\\ConfigurationInterface, Symfony\\\\Component\\\\Config\\\\Definition\\\\ConfigurationInterface\\|null given\\.$#" + count: 1 + path: src/DependencyInjection/HttplugExtension.php + + - + message: "#^Parameter \\#1 \\$debug of class Http\\\\HttplugBundle\\\\DependencyInjection\\\\Configuration constructor expects bool, array\\|bool\\|float\\|int\\|string\\|UnitEnum\\|null given\\.$#" + count: 1 + path: src/DependencyInjection/HttplugExtension.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Discovery\\\\ConfiguredClientsStrategy\\:\\:getCandidates\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Discovery/ConfiguredClientsStrategy.php + + - + message: "#^Static property Http\\\\HttplugBundle\\\\Discovery\\\\ConfiguredClientsStrategy\\:\\:\\$asyncClient \\(Http\\\\Client\\\\HttpAsyncClient\\) does not accept Http\\\\Client\\\\HttpAsyncClient\\|null\\.$#" + count: 1 + path: src/Discovery/ConfiguredClientsStrategy.php + + - + message: "#^Static property Http\\\\HttplugBundle\\\\Discovery\\\\ConfiguredClientsStrategy\\:\\:\\$client \\(Psr\\\\Http\\\\Client\\\\ClientInterface\\) does not accept Psr\\\\Http\\\\Client\\\\ClientInterface\\|null\\.$#" + count: 1 + path: src/Discovery/ConfiguredClientsStrategy.php + + - + message: "#^Method Http\\\\HttplugBundle\\\\Discovery\\\\ConfiguredClientsStrategyListener\\:\\:onEvent\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Discovery/ConfiguredClientsStrategyListener.php diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 00000000..2e5e9ef4 --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,9 @@ +includes: + - phpstan-baseline.neon + +parameters: + reportUnmatchedIgnoredErrors: false + + level: max + paths: + - src From 1e23c10db8daabd589e0b4827e0cc216085945ef Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Tue, 11 Jun 2024 14:22:11 +0200 Subject: [PATCH 05/19] Switch to static analysis and add phpstan symfony req --- .github/workflows/continuous-integration.yml | 3 --- .github/workflows/static-analysis.yml | 6 ++++++ composer.json | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 21dd8da0..88e0a071 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -104,8 +104,5 @@ jobs: dependency-versions: "${{ matrix.dependency-versions }}" composer-options: "${{ matrix.composer-options }}" - - name: "Run PHPStan" - run: "vendor/bin/phpstan analyse --no-progress" - - name: "Run PHPUnit" run: "composer test" diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 9703d7de..ec2a3444 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -16,6 +16,12 @@ jobs: steps: - name: "Checkout" uses: "actions/checkout@v3" + - name: PHPStan + uses: "docker://oskarstark/phpstan-ga" + env: + REQUIRE_DEV: true + with: + args: analyze --no-progress - name: "PHP-CS-Fixer" uses: "docker://oskarstark/php-cs-fixer-ga:2.19.0" with: diff --git a/composer.json b/composer.json index 8e7aa64d..b0f9a4d3 100644 --- a/composer.json +++ b/composer.json @@ -57,7 +57,7 @@ "php-http/cache-plugin": "^1.7", "php-http/mock-client": "^1.2", "php-http/promise": "^1.0", - "phpstan/phpstan": "^1.11", + "phpstan/phpstan-symfony": "^1.2", "symfony/browser-kit": "^5.4 || ^6.0 || ^7.0", "symfony/cache": "^5.4 || ^6.0 || ^7.0", "symfony/dom-crawler": "^5.4 || ^6.0 || ^7.0", From 6d986f9518cb3a2b761d2cfc7e5c082b3b617d9c Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Tue, 11 Jun 2024 14:23:08 +0200 Subject: [PATCH 06/19] Level set to 1 and baseline regenerated --- phpstan-baseline.neon | 485 ------------------------------------------ phpstan.neon.dist | 2 +- 2 files changed, 1 insertion(+), 486 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 6ea77878..bb0c7052 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,375 +1,10 @@ parameters: ignoreErrors: - - - message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\AutoDiscoveryFactory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/ClientFactory/AutoDiscoveryFactory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\BuzzFactory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/ClientFactory/BuzzFactory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\BuzzFactory\\:\\:createClient\\(\\) should return Psr\\\\Http\\\\Client\\\\ClientInterface but returns Buzz\\\\Client\\\\FileGetContents\\.$#" - count: 1 - path: src/ClientFactory/BuzzFactory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\BuzzFactory\\:\\:getOptions\\(\\) has no return type specified\\.$#" - count: 1 - path: src/ClientFactory/BuzzFactory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\BuzzFactory\\:\\:getOptions\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/ClientFactory/BuzzFactory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\ClientFactory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/ClientFactory/ClientFactory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\CurlFactory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/ClientFactory/CurlFactory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\CurlFactory\\:\\:createClient\\(\\) should return Psr\\\\Http\\\\Client\\\\ClientInterface but returns Http\\\\Client\\\\Curl\\\\Client\\.$#" - count: 1 - path: src/ClientFactory/CurlFactory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\Guzzle6Factory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/ClientFactory/Guzzle6Factory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\Guzzle7Factory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/ClientFactory/Guzzle7Factory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\MockFactory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/ClientFactory/MockFactory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\MockFactory\\:\\:setClient\\(\\) has no return type specified\\.$#" - count: 1 - path: src/ClientFactory/MockFactory.php - - - - message: "#^Negated boolean expression is always false\\.$#" - count: 1 - path: src/ClientFactory/MockFactory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\PluginClientFactory\\:\\:createPluginClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/ClientFactory/PluginClientFactory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\PluginClientFactory\\:\\:createPluginClient\\(\\) has parameter \\$pluginClientOptions with no value type specified in iterable type array\\.$#" - count: 1 - path: src/ClientFactory/PluginClientFactory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\ReactFactory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/ClientFactory/ReactFactory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\ReactFactory\\:\\:createClient\\(\\) should return Psr\\\\Http\\\\Client\\\\ClientInterface but returns Http\\\\Adapter\\\\React\\\\Client\\.$#" - count: 1 - path: src/ClientFactory/ReactFactory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\SocketFactory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/ClientFactory/SocketFactory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\SocketFactory\\:\\:createClient\\(\\) should return Psr\\\\Http\\\\Client\\\\ClientInterface but returns Http\\\\Client\\\\Socket\\\\Client\\.$#" - count: 1 - path: src/ClientFactory/SocketFactory.php - - message: "#^Call to static method create\\(\\) on an unknown class Symfony\\\\Component\\\\HttpClient\\\\HttpClient\\.$#" count: 1 path: src/ClientFactory/SymfonyFactory.php - - - message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\SymfonyFactory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/ClientFactory/SymfonyFactory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\ClientFactory\\\\SymfonyFactory\\:\\:createClient\\(\\) should return Psr\\\\Http\\\\Client\\\\ClientInterface but returns Symfony\\\\Component\\\\HttpClient\\\\HttplugClient\\.$#" - count: 1 - path: src/ClientFactory/SymfonyFactory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Collector\\:\\:activateStack\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Collector.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Collector\\:\\:addStack\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Collector.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Collector\\:\\:collect\\(\\) has parameter \\$exception with no type specified\\.$#" - count: 1 - path: src/Collector/Collector.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Collector\\:\\:countClientMessages\\(\\) has parameter \\$client with no type specified\\.$#" - count: 1 - path: src/Collector/Collector.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Collector\\:\\:deactivateStack\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Collector.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Collector\\:\\:getClientRootStacks\\(\\) has parameter \\$client with no type specified\\.$#" - count: 1 - path: src/Collector/Collector.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Collector\\:\\:getClients\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Collector/Collector.php - - - - message: "#^Strict comparison using \\=\\=\\= between null and Http\\\\HttplugBundle\\\\Collector\\\\Stack will always evaluate to false\\.$#" - count: 1 - path: src/Collector/Collector.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Formatter\\:\\:formatResponseForRequest\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Formatter.php - - - - message: "#^Property Http\\\\HttplugBundle\\\\Collector\\\\Formatter\\:\\:\\$curlFormatter \\(Http\\\\Message\\\\Formatter\\\\CurlCommandFormatter\\) does not accept Http\\\\Message\\\\Formatter\\.$#" - count: 1 - path: src/Collector/Formatter.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\PluginClientFactory\\:\\:createClient\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Collector/PluginClientFactory.php - - - - message: "#^PHPDoc tag @var above a method has no effect\\.$#" - count: 1 - path: src/Collector/PluginClientFactory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\PluginClientFactoryListener\\:\\:onEvent\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/PluginClientFactoryListener.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Profile\\:\\:setFailed\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Profile.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Profile\\:\\:setRequest\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Profile.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Profile\\:\\:setResponse\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Profile.php - - - - message: "#^Call to an undefined method Http\\\\Client\\\\HttpAsyncClient\\|Psr\\\\Http\\\\Client\\\\ClientInterface\\:\\:sendAsyncRequest\\(\\)\\.$#" - count: 1 - path: src/Collector/ProfileClient.php - - - - message: "#^Call to an undefined method Http\\\\Client\\\\HttpAsyncClient\\|Psr\\\\Http\\\\Client\\\\ClientInterface\\:\\:sendRequest\\(\\)\\.$#" - count: 1 - path: src/Collector/ProfileClient.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\ProfileClient\\:\\:doSendRequest\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/ProfileClient.php - - - - message: "#^Parameter \\#1 \\$duration of method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setDuration\\(\\) expects int, float\\|int given\\.$#" - count: 2 - path: src/Collector/ProfileClient.php - - - - message: "#^Property Http\\\\HttplugBundle\\\\Collector\\\\ProfileClient\\:\\:\\$eventNames type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Collector/ProfileClient.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\ProfileClientFactory\\:\\:createClient\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Collector/ProfileClientFactory.php - - - - message: "#^Result of && is always false\\.$#" - count: 1 - path: src/Collector/ProfileClientFactory.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\ProfilePlugin\\:\\:doHandleRequest\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/ProfilePlugin.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:addProfile\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Stack.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:getClientSlug\\(\\) should return string but returns string\\|null\\.$#" - count: 1 - path: src/Collector/Stack.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setClientException\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Stack.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setClientRequest\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Stack.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setClientResponse\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Stack.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setCurlCommand\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Stack.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setDuration\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Stack.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setFailed\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Stack.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setParent\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Stack.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setRequestHost\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Stack.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setRequestMethod\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Stack.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setRequestPort\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Stack.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setRequestScheme\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Stack.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setRequestTarget\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Stack.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setResponse\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Stack.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:setResponseCode\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Stack.php - - - - message: "#^Property Http\\\\HttplugBundle\\\\Collector\\\\Stack\\:\\:\\$clientResponse \\(string\\) does not accept mixed\\.$#" - count: 1 - path: src/Collector/Stack.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\StackPlugin\\:\\:doHandleRequest\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/StackPlugin.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Twig\\\\HttpMessageMarkupExtension\\:\\:getFilters\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Collector/Twig/HttpMessageMarkupExtension.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Twig\\\\HttpMessageMarkupExtension\\:\\:getName\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Twig/HttpMessageMarkupExtension.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Collector\\\\Twig\\\\HttpMessageMarkupExtension\\:\\:markup\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Collector/Twig/HttpMessageMarkupExtension.php - - - - message: "#^Property Http\\\\HttplugBundle\\\\Collector\\\\Twig\\\\HttpMessageMarkupExtension\\:\\:\\$dumper \\(Symfony\\\\Component\\\\VarDumper\\\\Dumper\\\\HtmlDumper\\) does not accept Symfony\\\\Component\\\\VarDumper\\\\Dumper\\\\DataDumperInterface\\.$#" - count: 1 - path: src/Collector/Twig/HttpMessageMarkupExtension.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:canBeEnabled\\(\\)\\.$#" - count: 1 - path: src/DependencyInjection/Configuration.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:fixXmlConfig\\(\\)\\.$#" - count: 3 - path: src/DependencyInjection/Configuration.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:prototype\\(\\)\\.$#" - count: 1 - path: src/DependencyInjection/Configuration.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:useAttributeAsKey\\(\\)\\.$#" - count: 1 - path: src/DependencyInjection/Configuration.php - - - - message: "#^Cannot call method end\\(\\) on Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeParentInterface\\|null\\.$#" - count: 7 - path: src/DependencyInjection/Configuration.php - - - - message: "#^Cannot call method scalarNode\\(\\) on Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeParentInterface\\|null\\.$#" - count: 2 - path: src/DependencyInjection/Configuration.php - - message: "#^Class Http\\\\Client\\\\Plugin\\\\Vcr\\\\NamingStrategy\\\\NamingStrategyInterface not found\\.$#" count: 1 @@ -385,31 +20,6 @@ parameters: count: 1 path: src/DependencyInjection/Configuration.php - - - message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\Configuration\\:\\:createClientPluginNode\\(\\) should return Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\ArrayNodeDefinition but returns Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\.$#" - count: 1 - path: src/DependencyInjection/Configuration.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\Configuration\\:\\:validateAuthenticationType\\(\\) has parameter \\$actual with no value type specified in iterable type array\\.$#" - count: 1 - path: src/DependencyInjection/Configuration.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\Configuration\\:\\:validateAuthenticationType\\(\\) has parameter \\$expected with no value type specified in iterable type array\\.$#" - count: 1 - path: src/DependencyInjection/Configuration.php - - - - message: "#^Parameter \\#1 \\$root of method Http\\\\HttplugBundle\\\\DependencyInjection\\\\Configuration\\:\\:configureClients\\(\\) expects Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\ArrayNodeDefinition, Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition given\\.$#" - count: 1 - path: src/DependencyInjection/Configuration.php - - - - message: "#^Parameter \\#1 \\$root of method Http\\\\HttplugBundle\\\\DependencyInjection\\\\Configuration\\:\\:configureSharedPlugins\\(\\) expects Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\ArrayNodeDefinition, Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition given\\.$#" - count: 1 - path: src/DependencyInjection/Configuration.php - - message: "#^Class Http\\\\Client\\\\Plugin\\\\Vcr\\\\RecordPlugin not found\\.$#" count: 1 @@ -419,98 +29,3 @@ parameters: message: "#^Class Http\\\\Client\\\\Plugin\\\\Vcr\\\\ReplayPlugin not found\\.$#" count: 1 path: src/DependencyInjection/HttplugExtension.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configureAuthentication\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/DependencyInjection/HttplugExtension.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configureAuthentication\\(\\) has parameter \\$servicePrefix with no type specified\\.$#" - count: 1 - path: src/DependencyInjection/HttplugExtension.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configureAutoDiscoveryClients\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/DependencyInjection/HttplugExtension.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configureClient\\(\\) has parameter \\$arguments with no value type specified in iterable type array\\.$#" - count: 1 - path: src/DependencyInjection/HttplugExtension.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configureClients\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/DependencyInjection/HttplugExtension.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configurePlugin\\(\\) has parameter \\$pluginConfig with no value type specified in iterable type array\\.$#" - count: 1 - path: src/DependencyInjection/HttplugExtension.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configurePluginByName\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/DependencyInjection/HttplugExtension.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configurePlugins\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/DependencyInjection/HttplugExtension.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configureVcrPlugin\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/DependencyInjection/HttplugExtension.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configureVcrPlugin\\(\\) has parameter \\$prefix with no type specified\\.$#" - count: 1 - path: src/DependencyInjection/HttplugExtension.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:configureVcrPlugin\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/DependencyInjection/HttplugExtension.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:getConfiguration\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/DependencyInjection/HttplugExtension.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\DependencyInjection\\\\HttplugExtension\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/DependencyInjection/HttplugExtension.php - - - - message: "#^Parameter \\#1 \\$configuration of method Symfony\\\\Component\\\\DependencyInjection\\\\Extension\\\\Extension\\:\\:processConfiguration\\(\\) expects Symfony\\\\Component\\\\Config\\\\Definition\\\\ConfigurationInterface, Symfony\\\\Component\\\\Config\\\\Definition\\\\ConfigurationInterface\\|null given\\.$#" - count: 1 - path: src/DependencyInjection/HttplugExtension.php - - - - message: "#^Parameter \\#1 \\$debug of class Http\\\\HttplugBundle\\\\DependencyInjection\\\\Configuration constructor expects bool, array\\|bool\\|float\\|int\\|string\\|UnitEnum\\|null given\\.$#" - count: 1 - path: src/DependencyInjection/HttplugExtension.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Discovery\\\\ConfiguredClientsStrategy\\:\\:getCandidates\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Discovery/ConfiguredClientsStrategy.php - - - - message: "#^Static property Http\\\\HttplugBundle\\\\Discovery\\\\ConfiguredClientsStrategy\\:\\:\\$asyncClient \\(Http\\\\Client\\\\HttpAsyncClient\\) does not accept Http\\\\Client\\\\HttpAsyncClient\\|null\\.$#" - count: 1 - path: src/Discovery/ConfiguredClientsStrategy.php - - - - message: "#^Static property Http\\\\HttplugBundle\\\\Discovery\\\\ConfiguredClientsStrategy\\:\\:\\$client \\(Psr\\\\Http\\\\Client\\\\ClientInterface\\) does not accept Psr\\\\Http\\\\Client\\\\ClientInterface\\|null\\.$#" - count: 1 - path: src/Discovery/ConfiguredClientsStrategy.php - - - - message: "#^Method Http\\\\HttplugBundle\\\\Discovery\\\\ConfiguredClientsStrategyListener\\:\\:onEvent\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Discovery/ConfiguredClientsStrategyListener.php diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 2e5e9ef4..3f2af6d9 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -4,6 +4,6 @@ includes: parameters: reportUnmatchedIgnoredErrors: false - level: max + level: 1 paths: - src From e73d20e05aef7884a071b216b651d7d522bf2b57 Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Tue, 11 Jun 2024 14:44:13 +0200 Subject: [PATCH 07/19] Split tests --- ...atic-analysis.yml => coding-standards.yml} | 4 ---- .github/workflows/php-cs-fixer.yml | 22 +++++++++++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) rename .github/workflows/{static-analysis.yml => coding-standards.yml} (77%) create mode 100644 .github/workflows/php-cs-fixer.yml diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/coding-standards.yml similarity index 77% rename from .github/workflows/static-analysis.yml rename to .github/workflows/coding-standards.yml index ec2a3444..09e3fcd2 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/coding-standards.yml @@ -22,7 +22,3 @@ jobs: REQUIRE_DEV: true with: args: analyze --no-progress - - name: "PHP-CS-Fixer" - uses: "docker://oskarstark/php-cs-fixer-ga:2.19.0" - with: - args: --diff --dry-run diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml new file mode 100644 index 00000000..aa40ec5b --- /dev/null +++ b/.github/workflows/php-cs-fixer.yml @@ -0,0 +1,22 @@ +name: "Static analysis" + +on: + push: + branches: + - '[0-9]+.x' + - '[0-9]+.[0-9]+' + - '[0-9]+.[0-9]+.x' + pull_request: + +jobs: + php-cs-fixer: + name: "PHP-CS-Fixer" + runs-on: "ubuntu-latest" + + steps: + - name: "Checkout" + uses: "actions/checkout@v3" + - name: "PHP-CS-Fixer" + uses: "docker://oskarstark/php-cs-fixer-ga:2.19.0" + with: + args: --diff --dry-run From eb40e72db844405447f4bfa75cb899e37cb4bea0 Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Tue, 11 Jun 2024 14:48:08 +0200 Subject: [PATCH 08/19] Remove reportUnmatchedIgnoredErrors (not needed here) --- phpstan.neon.dist | 1 - 1 file changed, 1 deletion(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 3f2af6d9..5df8f874 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -2,7 +2,6 @@ includes: - phpstan-baseline.neon parameters: - reportUnmatchedIgnoredErrors: false level: 1 paths: From cfc3ae433307a31d018700527b519e8665f987b1 Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Tue, 11 Jun 2024 14:49:53 +0200 Subject: [PATCH 09/19] Rename action name --- .github/workflows/php-cs-fixer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml index aa40ec5b..d4c0b0be 100644 --- a/.github/workflows/php-cs-fixer.yml +++ b/.github/workflows/php-cs-fixer.yml @@ -1,4 +1,4 @@ -name: "Static analysis" +name: "PHP-CS-Fixer" on: push: From f9c37406a349b66c91e10a072d01fdeaf02be6ba Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Tue, 11 Jun 2024 15:06:17 +0200 Subject: [PATCH 10/19] Add phpstan-symfony config --- phpstan.neon.dist | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 5df8f874..5f5ebe18 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,7 +1,11 @@ includes: - phpstan-baseline.neon + - vendor/phpstan/phpstan-symfony/extension.neon + - vendor/phpstan/phpstan-symfony/rules.neon parameters: + scanFiles: + - vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php level: 1 paths: From f0381b958f7571ea868e03056fd4f9d0ef1a58c8 Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Tue, 11 Jun 2024 15:07:18 +0200 Subject: [PATCH 11/19] Update .github/workflows/coding-standards.yml Co-authored-by: David Buchmann --- .github/workflows/coding-standards.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 09e3fcd2..726e9131 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -9,7 +9,7 @@ on: pull_request: jobs: - coding-standards: + phpstan: name: "Coding Standards" runs-on: "ubuntu-latest" From c76b1a321c6bc6fe555502eefefdf95fb257ec5c Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Tue, 11 Jun 2024 15:07:40 +0200 Subject: [PATCH 12/19] Update .github/workflows/coding-standards.yml Co-authored-by: David Buchmann --- .github/workflows/coding-standards.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 726e9131..564da8b4 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -10,7 +10,7 @@ on: jobs: phpstan: - name: "Coding Standards" + name: "PHPStan" runs-on: "ubuntu-latest" steps: From 89d3c7b35768c52a1202b31db68e628274695408 Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Tue, 11 Jun 2024 15:13:14 +0200 Subject: [PATCH 13/19] Remove unecessary plugin --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index b0f9a4d3..bab75c8f 100644 --- a/composer.json +++ b/composer.json @@ -57,7 +57,6 @@ "php-http/cache-plugin": "^1.7", "php-http/mock-client": "^1.2", "php-http/promise": "^1.0", - "phpstan/phpstan-symfony": "^1.2", "symfony/browser-kit": "^5.4 || ^6.0 || ^7.0", "symfony/cache": "^5.4 || ^6.0 || ^7.0", "symfony/dom-crawler": "^5.4 || ^6.0 || ^7.0", From 7492cbe428ed90bf4a477eb37560c241daf8f58a Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Tue, 11 Jun 2024 15:20:48 +0200 Subject: [PATCH 14/19] Remove not accessible file imports --- phpstan.neon.dist | 2 -- 1 file changed, 2 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 5f5ebe18..0c70268b 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,7 +1,5 @@ includes: - phpstan-baseline.neon - - vendor/phpstan/phpstan-symfony/extension.neon - - vendor/phpstan/phpstan-symfony/rules.neon parameters: scanFiles: From d850dac33bca362fe80a0e46cd7dd3d3f1236346 Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Tue, 11 Jun 2024 16:02:06 +0200 Subject: [PATCH 15/19] Use PHPStan var to include baselines from plugins --- phpstan.neon.dist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 0c70268b..3609e43a 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,5 +1,7 @@ includes: - phpstan-baseline.neon + - %rootDir%/../phpstan-symfony/extension.neon + - %rootDir%/../phpstan-symfony/rules.neon parameters: scanFiles: From 5f0363570b52130f693a8aa7619d34a3b1182928 Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Tue, 11 Jun 2024 16:05:44 +0200 Subject: [PATCH 16/19] Increase PHPStan level to 2 --- phpstan.neon.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 3609e43a..8843f528 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -7,6 +7,6 @@ parameters: scanFiles: - vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php - level: 1 + level: 2 paths: - src From 9e3be0543870f4700a69f0b31f4a106b8f66bc25 Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Tue, 11 Jun 2024 16:07:04 +0200 Subject: [PATCH 17/19] Fix PHPDoc @var to @type --- src/Collector/PluginClientFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Collector/PluginClientFactory.php b/src/Collector/PluginClientFactory.php index 17d8198c..4054073c 100644 --- a/src/Collector/PluginClientFactory.php +++ b/src/Collector/PluginClientFactory.php @@ -47,7 +47,7 @@ public function __construct(Collector $collector, Formatter $formatter, Stopwatc * @param Plugin[] $plugins * @param array $options { * - * @var string $client_name to give client a name which may be used when displaying client information like in + * @type string $client_name to give client a name which may be used when displaying client information like in * the HTTPlugBundle profiler. * } * From c1e4e35ac294deddbf17d715c8fb8026e3edb6b7 Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Tue, 11 Jun 2024 16:25:47 +0200 Subject: [PATCH 18/19] Use array key typing instead of @var notation --- src/Collector/PluginClientFactory.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Collector/PluginClientFactory.php b/src/Collector/PluginClientFactory.php index 4054073c..db00e208 100644 --- a/src/Collector/PluginClientFactory.php +++ b/src/Collector/PluginClientFactory.php @@ -45,11 +45,10 @@ public function __construct(Collector $collector, Formatter $formatter, Stopwatc /** * @param ClientInterface|HttpAsyncClient $client * @param Plugin[] $plugins - * @param array $options { + * @param array{client_name?: string} $options * - * @type string $client_name to give client a name which may be used when displaying client information like in + * - client_name: to give client a name which may be used when displaying client information like in * the HTTPlugBundle profiler. - * } * * @see PluginClient constructor for PluginClient specific $options. * @@ -61,7 +60,7 @@ public function createClient($client, array $plugins = [], array $options = []) return new ProfilePlugin($plugin, $this->collector, $this->formatter); }, $plugins); - $clientName = isset($options['client_name']) ? $options['client_name'] : 'Default'; + $clientName = $options['client_name'] ?? 'Default'; array_unshift($plugins, new StackPlugin($this->collector, $this->formatter, $clientName)); unset($options['client_name']); From 3eeb7f1cd105a213bb07cf9a30457c5ade6493e8 Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Tue, 11 Jun 2024 16:28:01 +0200 Subject: [PATCH 19/19] Fix spaces --- src/Collector/PluginClientFactory.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Collector/PluginClientFactory.php b/src/Collector/PluginClientFactory.php index db00e208..d519d00d 100644 --- a/src/Collector/PluginClientFactory.php +++ b/src/Collector/PluginClientFactory.php @@ -45,10 +45,10 @@ public function __construct(Collector $collector, Formatter $formatter, Stopwatc /** * @param ClientInterface|HttpAsyncClient $client * @param Plugin[] $plugins - * @param array{client_name?: string} $options + * @param array{client_name?: string} $options * * - client_name: to give client a name which may be used when displaying client information like in - * the HTTPlugBundle profiler. + * the HTTPlugBundle profiler * * @see PluginClient constructor for PluginClient specific $options. *