From b0e22dcd3643f33ace1c7d42904ad8c48090c922 Mon Sep 17 00:00:00 2001 From: JiaJia Ji Date: Mon, 31 Jul 2023 13:54:59 +0200 Subject: [PATCH] [Task]: PhpStan bump July (#15593) * bump stan in composer * fix CommitOrderProcessor.php see https://github.com/pimcore/ecommerce-framework-bundle/blob/349de4cd1e7fe66b8ec7f1019372edcfa48b80d1/src/CheckoutManager/V7/CommitOrderProcessor.php#L357 * fix <0, max> change in baseline * fix wrong var * fix set children int 0 max * fix typo and ternary in tool requirement see also https://github.com/pimcore/pimcore/pull/14799/files?w=1#diff-995edee38ad4f8387e58ebd52c31bcc04c56cc2448d331b1cf5e0b35c57b9efaR343-R347 * Update composer.json * fix stan * fix tab/space --- bundles/CoreBundle/src/Command/Bundle/ListCommand.php | 4 +--- composer.json | 4 ++-- phpstan-baseline.neon | 4 ++++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bundles/CoreBundle/src/Command/Bundle/ListCommand.php b/bundles/CoreBundle/src/Command/Bundle/ListCommand.php index 48cf1d03f1f..32b1d83742a 100644 --- a/bundles/CoreBundle/src/Command/Bundle/ListCommand.php +++ b/bundles/CoreBundle/src/Command/Bundle/ListCommand.php @@ -99,9 +99,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int } if ($input->getOption('json')) { - $jsonData = array_map(static function ($row) use ($returnData) { - return array_combine($returnData['headers'], $row); - }, $returnData['rows']); + $jsonData = array_map(fn($row) => array_combine($returnData['headers'], $row), $returnData['rows']); $output->write(\json_encode($jsonData, \JSON_PRETTY_PRINT)); } else { $table = new Table($output); diff --git a/composer.json b/composer.json index 27e42848da4..9d83bdadc21 100644 --- a/composer.json +++ b/composer.json @@ -139,8 +139,8 @@ "codeception/codeception": "^5.0.3", "codeception/module-symfony": "^3.1.0", "codeception/phpunit-wrapper": "^9", - "phpstan/phpstan": "1.10.5", - "phpstan/phpstan-symfony": "^1.2.20", + "phpstan/phpstan": "1.10.26", + "phpstan/phpstan-symfony": "^1.3.2", "phpunit/phpunit": "^9.3", "gotenberg/gotenberg-php": "^1.1", "composer/composer": "*", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 9a752d304d0..e8f552f2315 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -113,6 +113,10 @@ parameters: message: "#^Call to an undefined method COM\\:\\:Run\\(\\)\\.$#" count: 1 path: lib/Tool/Console.php + - + message: "#^Ternary operator condition is always true\\.$#" + count: 1 + path: lib/Tool/Requirements.php - message: "#^Dead catch \\- Throwable is never thrown in the try block\\.$#"