From 3e3c9aa0fe4e190bb8af89c989831eb3f5d0d4e6 Mon Sep 17 00:00:00 2001 From: Michael Telgmann Date: Mon, 6 Nov 2023 13:31:51 +0100 Subject: [PATCH] chore: Update PHPStan and its plugins --- composer.json | 10 +-- composer.lock | 83 ++++++++++--------- .../Components/Cart/TaxAggregator.php | 2 +- .../Shopware/Controllers/Backend/Address.php | 2 +- 4 files changed, 49 insertions(+), 48 deletions(-) diff --git a/composer.json b/composer.json index b74b2d87ed4..9f265ae4d9d 100644 --- a/composer.json +++ b/composer.json @@ -113,13 +113,13 @@ "php-parallel-lint/php-var-dump-check": "^0.5", "phpspec/prophecy-phpunit": "^2.0", "phpstan/extension-installer": "1.3.1", - "phpstan/phpstan": "1.10.35", - "phpstan/phpstan-doctrine": "1.3.43", - "phpstan/phpstan-phpunit": "1.3.14", - "phpstan/phpstan-symfony": "1.3.2", + "phpstan/phpstan": "1.10.41", + "phpstan/phpstan-doctrine": "1.3.45", + "phpstan/phpstan-phpunit": "1.3.15", + "phpstan/phpstan-symfony": "1.3.5", "phpunit/phpunit": "^9.6", "sensiolabs/behat-page-object-extension": "2.3.7", - "staabm/phpstan-dba": "0.2.75", + "staabm/phpstan-dba": "0.2.79", "symfony/browser-kit": "~4.4.27", "symfony/dom-crawler": "~4.4.30" }, diff --git a/composer.lock b/composer.lock index a52ea90677a..11fd710c353 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": "585abaed0bfbf4b96f20661ae9826b4a", + "content-hash": "4eadb407fa6a8bd1a0a2477d9455dca6", "packages": [ { "name": "aws/aws-crt-php", @@ -8598,16 +8598,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.24.1", + "version": "1.24.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01" + "reference": "bcad8d995980440892759db0c32acae7c8e79442" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01", - "reference": "9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bcad8d995980440892759db0c32acae7c8e79442", + "reference": "bcad8d995980440892759db0c32acae7c8e79442", "shasum": "" }, "require": { @@ -8639,22 +8639,22 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.2" }, - "time": "2023-09-18T12:18:02+00:00" + "time": "2023-09-26T12:28:12+00:00" }, { "name": "phpstan/phpstan", - "version": "1.10.35", + "version": "1.10.41", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "e730e5facb75ffe09dfb229795e8c01a459f26c3" + "reference": "c6174523c2a69231df55bdc65b61655e72876d76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e730e5facb75ffe09dfb229795e8c01a459f26c3", - "reference": "e730e5facb75ffe09dfb229795e8c01a459f26c3", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c6174523c2a69231df55bdc65b61655e72876d76", + "reference": "c6174523c2a69231df55bdc65b61655e72876d76", "shasum": "" }, "require": { @@ -8703,20 +8703,20 @@ "type": "tidelift" } ], - "time": "2023-09-19T15:27:56+00:00" + "time": "2023-11-05T12:57:57+00:00" }, { "name": "phpstan/phpstan-doctrine", - "version": "1.3.43", + "version": "1.3.45", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-doctrine.git", - "reference": "c5015035755ad2d5013bd6bf98ff423ca6150822" + "reference": "90e60ba9dbea4b29c7b87026a29e91ac0a02674e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-doctrine/zipball/c5015035755ad2d5013bd6bf98ff423ca6150822", - "reference": "c5015035755ad2d5013bd6bf98ff423ca6150822", + "url": "https://api.github.com/repos/phpstan/phpstan-doctrine/zipball/90e60ba9dbea4b29c7b87026a29e91ac0a02674e", + "reference": "90e60ba9dbea4b29c7b87026a29e91ac0a02674e", "shasum": "" }, "require": { @@ -8771,22 +8771,22 @@ "description": "Doctrine extensions for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-doctrine/issues", - "source": "https://github.com/phpstan/phpstan-doctrine/tree/1.3.43" + "source": "https://github.com/phpstan/phpstan-doctrine/tree/1.3.45" }, - "time": "2023-09-01T15:01:13+00:00" + "time": "2023-10-29T08:18:22+00:00" }, { "name": "phpstan/phpstan-phpunit", - "version": "1.3.14", + "version": "1.3.15", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "614acc10c522e319639bf38b0698a4a566665f04" + "reference": "70ecacc64fe8090d8d2a33db5a51fe8e88acd93a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/614acc10c522e319639bf38b0698a4a566665f04", - "reference": "614acc10c522e319639bf38b0698a4a566665f04", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/70ecacc64fe8090d8d2a33db5a51fe8e88acd93a", + "reference": "70ecacc64fe8090d8d2a33db5a51fe8e88acd93a", "shasum": "" }, "require": { @@ -8823,28 +8823,28 @@ "description": "PHPUnit extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-phpunit/issues", - "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.14" + "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.15" }, - "time": "2023-08-25T09:46:39+00:00" + "time": "2023-10-09T18:58:39+00:00" }, { "name": "phpstan/phpstan-symfony", - "version": "1.3.2", + "version": "1.3.5", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-symfony.git", - "reference": "7332b90dfc291ac5b4b83fbca2081936faa1e3f9" + "reference": "27ff6339f83796a7e0dd963cf445cd3c456fc620" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/7332b90dfc291ac5b4b83fbca2081936faa1e3f9", - "reference": "7332b90dfc291ac5b4b83fbca2081936faa1e3f9", + "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/27ff6339f83796a7e0dd963cf445cd3c456fc620", + "reference": "27ff6339f83796a7e0dd963cf445cd3c456fc620", "shasum": "" }, "require": { "ext-simplexml": "*", "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.9.18" + "phpstan/phpstan": "^1.10.36" }, "conflict": { "symfony/framework-bundle": "<3.0" @@ -8852,8 +8852,8 @@ "require-dev": { "nikic/php-parser": "^4.13.0", "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-phpunit": "^1.0", - "phpstan/phpstan-strict-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.3.11", + "phpstan/phpstan-strict-rules": "^1.5.1", "phpunit/phpunit": "^8.5.29 || ^9.5", "psr/container": "1.0 || 1.1.1", "symfony/config": "^5.4 || ^6.1", @@ -8864,7 +8864,8 @@ "symfony/http-foundation": "^5.4 || ^6.1", "symfony/messenger": "^5.4", "symfony/polyfill-php80": "^1.24", - "symfony/serializer": "^5.4" + "symfony/serializer": "^5.4", + "symfony/service-contracts": "^2.2.0" }, "type": "phpstan-extension", "extra": { @@ -8894,9 +8895,9 @@ "description": "Symfony Framework extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-symfony/issues", - "source": "https://github.com/phpstan/phpstan-symfony/tree/1.3.2" + "source": "https://github.com/phpstan/phpstan-symfony/tree/1.3.5" }, - "time": "2023-05-16T12:46:15+00:00" + "time": "2023-10-30T14:52:15+00:00" }, { "name": "phpunit/php-code-coverage", @@ -10362,16 +10363,16 @@ }, { "name": "staabm/phpstan-dba", - "version": "0.2.75", + "version": "0.2.79", "source": { "type": "git", "url": "https://github.com/staabm/phpstan-dba.git", - "reference": "812b436d601c007e07cba93985a4bc87eccf6be0" + "reference": "14d9afd28413e9964a9a33d30bafa1683d044542" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/staabm/phpstan-dba/zipball/812b436d601c007e07cba93985a4bc87eccf6be0", - "reference": "812b436d601c007e07cba93985a4bc87eccf6be0", + "url": "https://api.github.com/repos/staabm/phpstan-dba/zipball/14d9afd28413e9964a9a33d30bafa1683d044542", + "reference": "14d9afd28413e9964a9a33d30bafa1683d044542", "shasum": "" }, "require": { @@ -10395,7 +10396,7 @@ "phpstan/phpstan-strict-rules": "^1.1", "phpunit/phpunit": "^8.5|^9.5", "symplify/easy-coding-standard": "^11.4", - "tomasvotruba/unused-public": "^0.2.0", + "tomasvotruba/unused-public": "^0.3", "vlucas/phpdotenv": "^5.4" }, "type": "phpstan-extension", @@ -10425,9 +10426,9 @@ ], "support": { "issues": "https://github.com/staabm/phpstan-dba/issues", - "source": "https://github.com/staabm/phpstan-dba/tree/0.2.75" + "source": "https://github.com/staabm/phpstan-dba/tree/0.2.79" }, - "time": "2023-07-30T09:15:23+00:00" + "time": "2023-10-12T07:23:58+00:00" }, { "name": "symfony/browser-kit", diff --git a/engine/Shopware/Components/Cart/TaxAggregator.php b/engine/Shopware/Components/Cart/TaxAggregator.php index b3cdcbd8269..7d1ba486255 100644 --- a/engine/Shopware/Components/Cart/TaxAggregator.php +++ b/engine/Shopware/Components/Cart/TaxAggregator.php @@ -82,7 +82,7 @@ public function positionsTaxSum(array $cart, float $maximumTaxRate): ?array continue; } - /** @var numeric-string $taxRateString */ + /** @var numeric-string&non-empty-string $taxRateString */ $taxRateString = number_format($taxRate, 2); if (!\array_key_exists($taxRateString, $result)) { diff --git a/engine/Shopware/Controllers/Backend/Address.php b/engine/Shopware/Controllers/Backend/Address.php index ea08fcccd97..3b45eb3eb45 100644 --- a/engine/Shopware/Controllers/Backend/Address.php +++ b/engine/Shopware/Controllers/Backend/Address.php @@ -176,7 +176,7 @@ protected function getListQuery() */ protected function getQueryPaginator(QueryBuilder $builder, $hydrationMode = AbstractQuery::HYDRATE_ARRAY) { - /** @var Query $query */ + /** @var Query> $query */ $query = $builder->getQuery(); $query->setHydrationMode($hydrationMode); $query->setHint(Query::HINT_INCLUDE_META_COLUMNS, true);