From 1a32af11e9db39a17af4d8c726140c7cf67c0a32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 19 Jan 2024 13:22:39 +0100 Subject: [PATCH 01/13] bump: all the things --- phpstan.baseline.neon | 20 ------------------ psalm.baseline.xml | 30 +-------------------------- resources/PHP/common.mk | 2 +- tests/functional/MakefileTestCase.php | 17 +++++++++++++-- tests/functional/PHP/PhpTrait.php | 2 +- 5 files changed, 18 insertions(+), 53 deletions(-) diff --git a/phpstan.baseline.neon b/phpstan.baseline.neon index b61515a..1d6fb4a 100644 --- a/phpstan.baseline.neon +++ b/phpstan.baseline.neon @@ -15,26 +15,6 @@ parameters: count: 1 path: tests/functional/MakefileTestCase.php - - - message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:generateHelpExecutionPath\\(\\) has parameter \\$additionalFiles with no value type specified in iterable type array\\.$#" - count: 1 - path: tests/functional/MakefileTestCase.php - - - - message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:generateHelpExecutionPath\\(\\) has parameter \\$files with no value type specified in iterable type array\\.$#" - count: 1 - path: tests/functional/MakefileTestCase.php - - - - message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:generateHelpList\\(\\) has parameter \\$commands with no value type specified in iterable type array\\.$#" - count: 1 - path: tests/functional/MakefileTestCase.php - - - - message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:generatePermissionsExecutionPath\\(\\) has parameter \\$dirs with no value type specified in iterable type array\\.$#" - count: 1 - path: tests/functional/MakefileTestCase.php - - message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:generatePermissionsExecutionPath\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 diff --git a/psalm.baseline.xml b/psalm.baseline.xml index 4c39daa..b94cff6 100644 --- a/psalm.baseline.xml +++ b/psalm.baseline.xml @@ -1,34 +1,6 @@ - + - - $command - $dir - $dir - $dir - $dir - $dir - $dir - $dir - $dir - $dir - $files - - - $files - $files - - - - $command - $dir - array_values diff --git a/resources/PHP/common.mk b/resources/PHP/common.mk index ae2136a..a1433d5 100644 --- a/resources/PHP/common.mk +++ b/resources/PHP/common.mk @@ -8,7 +8,7 @@ PHP_VERSION=8.3 endif ifndef PHPQA_DOCKER_IMAGE -PHPQA_DOCKER_IMAGE=jakzal/phpqa:1.93.0-php${PHP_VERSION}-alpine +PHPQA_DOCKER_IMAGE=jakzal/phpqa:1.95.1-php${PHP_VERSION}-alpine endif ifndef PHPQA_DOCKER_COMMAND diff --git a/tests/functional/MakefileTestCase.php b/tests/functional/MakefileTestCase.php index 267b4ca..1c3da34 100644 --- a/tests/functional/MakefileTestCase.php +++ b/tests/functional/MakefileTestCase.php @@ -131,17 +131,24 @@ protected function getExpectedHelp(): string return $this->generateHelpList(array_keys(static::getExpectedHelpCommandsExecutionPath([]))); } + /** + * @param list $commands + */ protected function generateHelpList(array $commands): string { $help = []; sort($commands); foreach ($commands as $command) { - $help[] = sprintf('%1$s[45m%2$s%1$s[0m %3$s', "\e", str_pad($command, 20), $this->helpOverride[$command] ?? $this->help[$command] ?? ''); + $help[] = sprintf('%1$s[45m%2$s%1$s[0m %3$s', "\e", mb_str_pad($command, 20), $this->helpOverride[$command] ?? $this->help[$command] ?? ''); } return implode("\n", $help)."\n"; } + /** + * @param list $files + * @param list $additionalFiles + */ protected static function generateHelpExecutionPath(array $files = [], array $additionalFiles = []): string { $files = array_merge($files, [ @@ -154,7 +161,10 @@ protected static function generateHelpExecutionPath(array $files = [], array $ad $command = match (\PHP_OS_FAMILY) { 'Darwin' => 'grep --no-filename --extended-regexp \'^ *[-a-zA-Z0-9_/]+ *:.*## \' '.implode(' ', $files).' | awk \'BEGIN {FS = ":.*?## "}; {printf "\033[45m%-20s\033[0m %s\n", $1, $2}\' | sort', 'Linux' => 'grep -h -E \'^ *[-a-zA-Z0-9_/]+ *:.*## \' '.implode(' ', $files).' | awk \'BEGIN {FS = ":.*?## "}; {printf "\033[45m%-20s\033[0m %s\n", $1, $2}\' | sort', - 'Windows' => 'Select-String -Pattern \'^ *(?[-a-zA-Z0-9_/]+) *:.*## *(?.+)\' '.implode(',', array_map(static function (string $item, int $index): string { + 'Windows' => 'Select-String -Pattern \'^ *(?[-a-zA-Z0-9_/]+) *:.*## *(?.+)\' '.implode(',', array_map(static function (false|string $item, int $index): string { + if ($item === false) { + throw new \LogicException('Invalid item'); + } if ($index === 0) { return $item; } @@ -167,6 +177,9 @@ protected static function generateHelpExecutionPath(array $files = [], array $ad return self::normalize($command); } + /** + * @param list $dirs + */ protected static function generatePermissionsExecutionPath(array $dirs): array { $commands = []; diff --git a/tests/functional/PHP/PhpTrait.php b/tests/functional/PHP/PhpTrait.php index 858db7b..f1baf9c 100644 --- a/tests/functional/PHP/PhpTrait.php +++ b/tests/functional/PHP/PhpTrait.php @@ -34,7 +34,7 @@ private static function paths(?array $env): array { // defaults which are also defined in the Makefile $phpVersion = $env['PHP_VERSION'] ?? '8.3'; - $phpqaDockerImage = $env['PHPQA_DOCKER_IMAGE'] ?? 'jakzal/phpqa:1.93.0-php%1$s-alpine'; + $phpqaDockerImage = $env['PHPQA_DOCKER_IMAGE'] ?? 'jakzal/phpqa:1.95.1-php%1$s-alpine'; return [ 'analyze' => [ From 78d6dc857380412dac11f203c5bc80e53c006856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 19 Jan 2024 13:25:52 +0100 Subject: [PATCH 02/13] fix: disable array key check in Psalm (for now) --- psalm.baseline.xml | 76 ---------------------------------------------- psalm.xml.dist | 2 +- 2 files changed, 1 insertion(+), 77 deletions(-) diff --git a/psalm.baseline.xml b/psalm.baseline.xml index b94cff6..21f74bc 100644 --- a/psalm.baseline.xml +++ b/psalm.baseline.xml @@ -5,35 +5,10 @@ array_values - - - - - - - - - - - - - $helpOverride - - - - - - - - - - - - @@ -43,65 +18,14 @@ >]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $helpOverride - - - - - - $helpOverride - - - - diff --git a/psalm.xml.dist b/psalm.xml.dist index 80924f6..c7fe326 100644 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -3,7 +3,7 @@ cacheDirectory="var/phpqa/psalm" checkForThrowsInGlobalScope="true" ensureArrayIntOffsetsExist="true" - ensureArrayStringOffsetsExist="true" + ensureArrayStringOffsetsExist="false" errorBaseline="psalm.baseline.xml" errorLevel="1" findUnusedBaselineEntry="true" From 1f64c011320a5f546ee12e4619ddb1e22dda581b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 19 Jan 2024 13:27:18 +0100 Subject: [PATCH 03/13] fix: remove redundant array_values() --- psalm.baseline.xml | 5 ----- tests/functional/MakefileTestCase.php | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/psalm.baseline.xml b/psalm.baseline.xml index 21f74bc..3019838 100644 --- a/psalm.baseline.xml +++ b/psalm.baseline.xml @@ -1,10 +1,5 @@ - - - array_values - - $helpOverride diff --git a/tests/functional/MakefileTestCase.php b/tests/functional/MakefileTestCase.php index 1c3da34..75a8d2e 100644 --- a/tests/functional/MakefileTestCase.php +++ b/tests/functional/MakefileTestCase.php @@ -100,7 +100,7 @@ public function testHelpIsTheDefaultCommand(): void public function testMakefileHasInit(): void { $expected = array_map(static fn (string $path): string => sprintf('if [ -d "$ROOT/resources/%1$s" ]; then cp -a $ROOT/resources/%1$s/. .; fi', $path), $this->getExpectedInitPaths()); - $expected = array_merge(...array_values(array_map(static fn ($value) => [$value, 'if [ -f .gitattributes.dist ]; then mv .gitattributes.dist .gitattributes; fi'], $expected))); + $expected = array_merge(...array_map(static fn ($value) => [$value, 'if [ -f .gitattributes.dist ]; then mv .gitattributes.dist .gitattributes; fi'], $expected)); $actual = self::dryRun('init'); self::assertSame($expected, $actual); From 6c23d7c1c3d9941abad2b73eafc125766b879a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 19 Jan 2024 13:35:22 +0100 Subject: [PATCH 04/13] fix: specific keys in paths() --- psalm.baseline.xml | 8 ------- tests/functional/PHP/PhpTrait.php | 38 ++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/psalm.baseline.xml b/psalm.baseline.xml index 3019838..419f282 100644 --- a/psalm.baseline.xml +++ b/psalm.baseline.xml @@ -5,14 +5,6 @@ $helpOverride - - - iterable - - - >]]> - - $helpOverride diff --git a/tests/functional/PHP/PhpTrait.php b/tests/functional/PHP/PhpTrait.php index f1baf9c..f79450d 100644 --- a/tests/functional/PHP/PhpTrait.php +++ b/tests/functional/PHP/PhpTrait.php @@ -15,6 +15,9 @@ trait PhpTrait { + /** + * @return iterable> + */ protected static function getEnvs(): iterable { yield ['PHP_VERSION' => '8.1']; @@ -28,7 +31,40 @@ protected static function getEnvs(): iterable /** * @param null|array $env * - * @return array> + * @return array{ + * analyze: list, + * prepareAndAnalyze: list, + * "box: build": list, + * "build: dev": list, + * "build: prod": list, + * "composer: install": list, + * "composer: install-lowest": list, + * "composer: install-highest": list, + * "docker compose: start app dev": list, + * "docker compose: start app prod": list, + * "docker compose: start app test": list, + * "docker compose: start app": list, + * "docker compose: start library test": list, + * "docker compose: stop Pimcore app": list, + * "docker compose: stop Pimcore library": list, + * "permissions: Pimcore": list, + * "setup: Pimcore app test": list, + * "setup: Pimcore library test": list, + * "shell: app": list, + * "shell: app library": list, + * "shell: PHP": list, + * "test: unit": list, + * "test: functional app": list, + * "test: functional library": list, + * "mkdir: composer": list, + * "mkdir: phpqa": list, + * "touch: .env": list, + * "touch: composer.lock": list, + * "clean: Pimcore application": list, + * "clean: library": list + * } + * + * @psalm-suppress MoreSpecificReturnType */ private static function paths(?array $env): array { From 074e672f9fa50067273343d58f39afe856bb3951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 19 Jan 2024 13:35:59 +0100 Subject: [PATCH 05/13] fix: enable array key check in Psalm --- psalm.xml.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psalm.xml.dist b/psalm.xml.dist index c7fe326..80924f6 100644 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -3,7 +3,7 @@ cacheDirectory="var/phpqa/psalm" checkForThrowsInGlobalScope="true" ensureArrayIntOffsetsExist="true" - ensureArrayStringOffsetsExist="false" + ensureArrayStringOffsetsExist="true" errorBaseline="psalm.baseline.xml" errorLevel="1" findUnusedBaselineEntry="true" From 38d23f14f4e6b47dc7cf6330afd760c4365c9a09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 19 Jan 2024 13:38:30 +0100 Subject: [PATCH 06/13] fix: add permissions return type --- phpstan.baseline.neon | 5 ----- tests/functional/MakefileTestCase.php | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/phpstan.baseline.neon b/phpstan.baseline.neon index 1d6fb4a..3693962 100644 --- a/phpstan.baseline.neon +++ b/phpstan.baseline.neon @@ -15,11 +15,6 @@ parameters: count: 1 path: tests/functional/MakefileTestCase.php - - - message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:generatePermissionsExecutionPath\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/functional/MakefileTestCase.php - - message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:testMakefileCommandsWork\\(\\) has parameter \\$expected with no value type specified in iterable type array\\.$#" count: 1 diff --git a/tests/functional/MakefileTestCase.php b/tests/functional/MakefileTestCase.php index 75a8d2e..b2316e5 100644 --- a/tests/functional/MakefileTestCase.php +++ b/tests/functional/MakefileTestCase.php @@ -179,6 +179,8 @@ protected static function generateHelpExecutionPath(array $files = [], array $ad /** * @param list $dirs + * + * @return list */ protected static function generatePermissionsExecutionPath(array $dirs): array { From 3d651d33afe74c2b2730b3fa5ec30eb7964462e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 19 Jan 2024 13:42:17 +0100 Subject: [PATCH 07/13] fix: dry run return type --- phpstan.baseline.neon | 10 ---------- tests/functional/MakefileTestCase.php | 3 +++ 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/phpstan.baseline.neon b/phpstan.baseline.neon index 3693962..52ad8e6 100644 --- a/phpstan.baseline.neon +++ b/phpstan.baseline.neon @@ -5,17 +5,7 @@ parameters: count: 1 path: tests/functional/MakefileTestCase.php - - - message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:dryRun\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/functional/MakefileTestCase.php - - message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:execute\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" count: 1 path: tests/functional/MakefileTestCase.php - - - - message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:testMakefileCommandsWork\\(\\) has parameter \\$expected with no value type specified in iterable type array\\.$#" - count: 1 - path: tests/functional/MakefileTestCase.php diff --git a/tests/functional/MakefileTestCase.php b/tests/functional/MakefileTestCase.php index b2316e5..76d5cc4 100644 --- a/tests/functional/MakefileTestCase.php +++ b/tests/functional/MakefileTestCase.php @@ -109,6 +109,7 @@ public function testMakefileHasInit(): void /** * @dataProvider provideMakefileCommandsWorkCases * + * @param list $expected * @param array $env */ public function testMakefileCommandsWork(string $command, array $expected, array $env): void @@ -237,6 +238,8 @@ protected static function getMakefilePath(): string /** * @param null|array $env + * + * @return list */ protected static function dryRun( ?string $makeCommand = null, From 00737fb392384f4e5b1d8e5e89819b4197d37e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 19 Jan 2024 13:53:19 +0100 Subject: [PATCH 08/13] fix: dry run, execute args type --- phpstan.baseline.neon | 11 ----------- phpstan.neon.dist | 1 - tests/functional/MakefileTestCase.php | 2 ++ 3 files changed, 2 insertions(+), 12 deletions(-) delete mode 100644 phpstan.baseline.neon diff --git a/phpstan.baseline.neon b/phpstan.baseline.neon deleted file mode 100644 index 52ad8e6..0000000 --- a/phpstan.baseline.neon +++ /dev/null @@ -1,11 +0,0 @@ -parameters: - ignoreErrors: - - - message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:dryRun\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" - count: 1 - path: tests/functional/MakefileTestCase.php - - - - message: "#^Method Sigwin\\\\Infra\\\\Test\\\\Functional\\\\MakefileTestCase\\:\\:execute\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" - count: 1 - path: tests/functional/MakefileTestCase.php diff --git a/phpstan.neon.dist b/phpstan.neon.dist index cc73114..452a2f8 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -3,7 +3,6 @@ includes: - /tools/.composer/vendor-bin/phpstan/vendor/phpstan/phpstan-strict-rules/rules.neon - /tools/.composer/vendor-bin/phpstan/vendor/phpstan/phpstan-phpunit/extension.neon - /tools/.composer/vendor-bin/phpstan/vendor/phpstan/phpstan-symfony/extension.neon - - phpstan.baseline.neon parameters: tmpDir: %currentWorkingDirectory%/var/phpqa/phpstan level: max diff --git a/tests/functional/MakefileTestCase.php b/tests/functional/MakefileTestCase.php index 76d5cc4..a7bd9e4 100644 --- a/tests/functional/MakefileTestCase.php +++ b/tests/functional/MakefileTestCase.php @@ -237,6 +237,7 @@ protected static function getMakefilePath(): string } /** + * @param list $args * @param null|array $env * * @return list @@ -254,6 +255,7 @@ protected static function dryRun( } /** + * @param list $args * @param null|array $env */ protected static function execute( From ef895c2b969947f52c1b4edac01476b94e557d6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 19 Jan 2024 13:58:01 +0100 Subject: [PATCH 09/13] fix: Psalm more/less specific return types --- tests/functional/MakefileTestCase.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/functional/MakefileTestCase.php b/tests/functional/MakefileTestCase.php index a7bd9e4..295de8f 100644 --- a/tests/functional/MakefileTestCase.php +++ b/tests/functional/MakefileTestCase.php @@ -241,6 +241,9 @@ protected static function getMakefilePath(): string * @param null|array $env * * @return list + * + * @psalm-suppress MoreSpecificReturnType + * @psalm-suppress LessSpecificReturnStatement */ protected static function dryRun( ?string $makeCommand = null, From cfa7f02afa4a6bf6023288b14fd066c52da1b5a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 19 Jan 2024 14:01:47 +0100 Subject: [PATCH 10/13] fix: Psalm remove baseline --- psalm.baseline.xml | 18 ------------------ psalm.xml.dist | 1 - tests/functional/PHP/PharTest.php | 3 +++ tests/functional/YASSG/CompatTest.php | 3 +++ tests/functional/YASSG/DefaultTest.php | 3 +++ 5 files changed, 9 insertions(+), 19 deletions(-) delete mode 100644 psalm.baseline.xml diff --git a/psalm.baseline.xml b/psalm.baseline.xml deleted file mode 100644 index 419f282..0000000 --- a/psalm.baseline.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - $helpOverride - - - - - $helpOverride - - - - - $helpOverride - - - diff --git a/psalm.xml.dist b/psalm.xml.dist index 80924f6..dedde2f 100644 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -4,7 +4,6 @@ checkForThrowsInGlobalScope="true" ensureArrayIntOffsetsExist="true" ensureArrayStringOffsetsExist="true" - errorBaseline="psalm.baseline.xml" errorLevel="1" findUnusedBaselineEntry="true" findUnusedCode="true" diff --git a/tests/functional/PHP/PharTest.php b/tests/functional/PHP/PharTest.php index a214908..77f8490 100644 --- a/tests/functional/PHP/PharTest.php +++ b/tests/functional/PHP/PharTest.php @@ -26,6 +26,9 @@ final class PharTest extends MakefileTestCase { use PhpTrait; + /** + * @var array + */ protected array $helpOverride = [ 'phar/build' => 'Build PHAR file', ]; diff --git a/tests/functional/YASSG/CompatTest.php b/tests/functional/YASSG/CompatTest.php index 6a8488f..350ee6b 100644 --- a/tests/functional/YASSG/CompatTest.php +++ b/tests/functional/YASSG/CompatTest.php @@ -27,6 +27,9 @@ final class CompatTest extends MakefileTestCase { use PhpTrait; + /** + * @var array + */ protected array $helpOverride = [ 'start' => 'Start app in APP_ENV mode (defaults to "dev")', ]; diff --git a/tests/functional/YASSG/DefaultTest.php b/tests/functional/YASSG/DefaultTest.php index 6dc8089..865bc48 100644 --- a/tests/functional/YASSG/DefaultTest.php +++ b/tests/functional/YASSG/DefaultTest.php @@ -27,6 +27,9 @@ final class DefaultTest extends MakefileTestCase { use PhpTrait; + /** + * @var array + */ protected array $helpOverride = [ 'start' => 'Start app in APP_ENV mode (defaults to "dev")', 'build/docker' => 'Build app for "APP_ENV" target (defaults to "prod") fully in Docker', From 7d713ef23bee25a945a9efdaabfc3879c3dd8262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 19 Jan 2024 14:03:14 +0100 Subject: [PATCH 11/13] fix1: streamline --- .gitattributes | 1 - infection.json.dist | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 infection.json.dist diff --git a/.gitattributes b/.gitattributes index 195d20e..f7e494e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,4 +5,3 @@ /*baseline* export-ignore /composer.lock export-ignore /Makefile export-ignore -/package.json export-ignore diff --git a/infection.json.dist b/infection.json.dist new file mode 100644 index 0000000..9906e55 --- /dev/null +++ b/infection.json.dist @@ -0,0 +1,17 @@ +{ + "source": { + "directories": [ + "src" + ] + }, + "logs": { + "text": "var/phpqa/infection.log" + }, + "minCoveredMsi": 100, + "mutators": { + "@default": true, + "IdenticalEqual": false, + "NotIdenticalNotEqual": false, + "MBString": false + } +} From 7570f15cf1b01760531e6ea94285c1f1d5f12cbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 19 Jan 2024 15:26:12 +0100 Subject: [PATCH 12/13] bump: all --- resources/Lighthouse/common.mk | 2 +- resources/Visual/common.mk | 2 +- tests/functional/YASSG/CompatTest.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/Lighthouse/common.mk b/resources/Lighthouse/common.mk index 4e3254d..c320f5f 100644 --- a/resources/Lighthouse/common.mk +++ b/resources/Lighthouse/common.mk @@ -1,4 +1,4 @@ -LIGHTHOUSE_DOCKER_IMAGE ?= cypress/browsers:node-20.9.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1 +LIGHTHOUSE_DOCKER_IMAGE ?= cypress/browsers:node-20.10.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1 LIGHTHOUSE_DOCKER_COMMAND ?= docker run --init --interactive ${DOCKER_TTY} --rm --env HOME=/tmp ${DOCKER_USER} --volume "${DOCKER_CWD}:/public" --workdir "/public" ${LIGHTHOUSE_DOCKER_IMAGE} analyze/lighthouse: ## Analyze built files using Lighthouse diff --git a/resources/Visual/common.mk b/resources/Visual/common.mk index 8e59ad8..b95bf69 100644 --- a/resources/Visual/common.mk +++ b/resources/Visual/common.mk @@ -3,7 +3,7 @@ $(error BASE_URL must be defined before loading Visual/common.mk) endif PROJECT_ROOT = ${DOCKER_CWD} -BACKSTOP_DOCKER_IMAGE ?= backstopjs/backstopjs:6.2.2 +BACKSTOP_DOCKER_IMAGE ?= backstopjs/backstopjs:6.3.3 BACKSTOP_DOCKER_COMMAND ?= docker run --init --interactive ${TTY} --shm-size 256MB --cap-add=SYS_ADMIN --rm --env PROJECT_ROOT=${PROJECT_ROOT} --env BASE_URL=${BASE_URL} ${DOCKER_USER} --tmpfs /tmp --volume "${PROJECT_ROOT}:${PROJECT_ROOT}" --workdir "${PROJECT_ROOT}" ${BACKSTOP_DOCKER_IMAGE} --config backstop.config.js visual/test: ${BACKSTOP_DOCKER_COMMAND} test diff --git a/tests/functional/YASSG/CompatTest.php b/tests/functional/YASSG/CompatTest.php index 350ee6b..d954087 100644 --- a/tests/functional/YASSG/CompatTest.php +++ b/tests/functional/YASSG/CompatTest.php @@ -121,7 +121,7 @@ public function testDevComposeWorks(): void private static function generateDockerBackstopExecutionPath(string $command): string { return sprintf( - 'docker run --init --interactive --shm-size 256MB --cap-add=SYS_ADMIN --rm --env PROJECT_ROOT=$ROOT --env BASE_URL=file://localhost$ROOT/public %2$s --tmpfs /tmp --volume "$ROOT:$ROOT" --workdir "$ROOT" backstopjs/backstopjs:6.2.2 --config backstop.config.js %1$s', + 'docker run --init --interactive --shm-size 256MB --cap-add=SYS_ADMIN --rm --env PROJECT_ROOT=$ROOT --env BASE_URL=file://localhost$ROOT/public %2$s --tmpfs /tmp --volume "$ROOT:$ROOT" --workdir "$ROOT" backstopjs/backstopjs:6.3.3 --config backstop.config.js %1$s', $command, self::generateDockerComposeExecutionUser() ); @@ -130,7 +130,7 @@ private static function generateDockerBackstopExecutionPath(string $command): st private static function generateDockerLighthouseExecutionPath(string $command): string { return sprintf( - 'docker run --init --interactive --rm --env HOME=/tmp %2$s --volume "$ROOT:/public" --workdir "/public" cypress/browsers:node-20.9.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1 %1$s', + 'docker run --init --interactive --rm --env HOME=/tmp %2$s --volume "$ROOT:/public" --workdir "/public" cypress/browsers:node-20.10.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1 %1$s', $command, self::generateDockerComposeExecutionUser() ); From 58323cf6baf7399cac1169e9e48526305ce54243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 19 Jan 2024 15:26:48 +0100 Subject: [PATCH 13/13] fix: Psalm MoreSpecificType --- tests/functional/PHP/PhpTrait.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/functional/PHP/PhpTrait.php b/tests/functional/PHP/PhpTrait.php index f79450d..d9d51f7 100644 --- a/tests/functional/PHP/PhpTrait.php +++ b/tests/functional/PHP/PhpTrait.php @@ -63,8 +63,6 @@ protected static function getEnvs(): iterable * "clean: Pimcore application": list, * "clean: library": list * } - * - * @psalm-suppress MoreSpecificReturnType */ private static function paths(?array $env): array {