From 6a31f493b184c9041b041b54b2b51581400c38ce Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 15 Nov 2024 16:02:47 +0100 Subject: [PATCH 01/13] [Composer] Forced PHP >= 8.3 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8ad719c..8322817 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "ezsystems/behatbundle": "*" }, "require": { - "php": "^7.4 || ^8.0", + "php": ">=8.3", "ext-json": "*", "behat/behat": "^3.13", "behat/mink-goutte-driver": "^1.2", From bd25daab6d5a3cee1155003f8fcc8b107f1da8a8 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 15 Nov 2024 16:04:00 +0100 Subject: [PATCH 02/13] [Git] Added missing src/contracts directory --- src/contracts/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/contracts/.gitkeep diff --git a/src/contracts/.gitkeep b/src/contracts/.gitkeep new file mode 100644 index 0000000..e69de29 From aaf4e249c3a62b7c85f604ed11e6f6084e58d0d5 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 15 Nov 2024 16:06:47 +0100 Subject: [PATCH 03/13] Bumped Symfony packages requirements to ^6.4 --- composer.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index 8322817..2e02ca9 100644 --- a/composer.json +++ b/composer.json @@ -25,19 +25,19 @@ "liuggio/fastest": "^1.11", "php-http/client-common": "^2.1", "phpunit/phpunit": "^8.5 || ^9.0 || ^10.0", - "symfony/config": "^5.0", - "symfony/console": "^5.0", - "symfony/dependency-injection": "^5.0", - "symfony/lock": "^5.0", - "symfony/stopwatch": "^5.2", - "symfony/http-kernel": "^5.0", - "symfony/process": "^5.4", - "symfony/property-access": "^5.0", - "symfony/yaml": "^5.0", + "symfony/config": "^6.4", + "symfony/console": "^6.4", + "symfony/dependency-injection": "^6.4", + "symfony/lock": "^6.4", + "symfony/stopwatch": "^6.4", + "symfony/http-kernel": "^6.4", + "symfony/process": "^6.4", + "symfony/property-access": "^6.4", + "symfony/yaml": "^6.4", "psy/psysh": "^0.10.8", "oleg-andreyev/mink-phpwebdriver": "^1.2.1", "oleg-andreyev/mink-phpwebdriver-extension": "^1.0", - "symfony/form": "^5.4" + "symfony/form": "^6.4" }, "require-dev": { "ibexa/code-style": "~2.0.0", @@ -48,7 +48,7 @@ "phpstan/phpstan": "^1.10", "phpstan/phpstan-phpunit": "^1.3", "phpstan/phpstan-symfony": "^1.3", - "symfony/phpunit-bridge": "^6.3" + "symfony/phpunit-bridge": "^6.4" }, "autoload": { "psr-4": { From b0eb94ae36778874622e65399e8a713d6d0bda35 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 15 Nov 2024 16:07:39 +0100 Subject: [PATCH 04/13] [TMP] Required Symfony 6 dev branches of Ibexa packages --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 2e02ca9..b6aa7b0 100644 --- a/composer.json +++ b/composer.json @@ -15,8 +15,8 @@ "dmore/behat-chrome-extension": "^1.3", "dmore/chrome-mink-driver": "^2.7", "ezsystems/behat-screenshot-image-driver-cloudinary": "^1.1@dev", - "ibexa/core": "~5.0.0@dev", - "behat/mink": "^1.11", + "ibexa/core": "dev-ibx-8470-symfony-6 as 5.0.x-dev", + "friends-of-behat/mink": "^1.11", "friends-of-behat/mink-browserkit-driver": "^1.4", "friends-of-behat/mink-extension": "^2.4", "friends-of-behat/symfony-extension": "^2.1", @@ -35,7 +35,7 @@ "symfony/property-access": "^6.4", "symfony/yaml": "^6.4", "psy/psysh": "^0.10.8", - "oleg-andreyev/mink-phpwebdriver": "^1.2.1", + "oleg-andreyev/mink-phpwebdriver": "<1.3.3", "oleg-andreyev/mink-phpwebdriver-extension": "^1.0", "symfony/form": "^6.4" }, @@ -43,7 +43,7 @@ "ibexa/code-style": "~2.0.0", "friendsofphp/php-cs-fixer": "^3.0", "ibexa/ci-scripts": "^0.2@dev", - "ibexa/doctrine-schema": "~5.0.0@dev", + "ibexa/doctrine-schema": "dev-ibx-8470-symfony-6 as 5.0.x-dev", "mikey179/vfsstream": "^1.6", "phpstan/phpstan": "^1.10", "phpstan/phpstan-phpunit": "^1.3", From 156c22a762c42a049f71682e003995e07aa8d78e Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 15 Nov 2024 16:12:47 +0100 Subject: [PATCH 05/13] [Composer] Bumped psy/psysh to ^0.12.4 which supports Symfony 6 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b6aa7b0..94e7b1a 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "symfony/process": "^6.4", "symfony/property-access": "^6.4", "symfony/yaml": "^6.4", - "psy/psysh": "^0.10.8", + "psy/psysh": "^0.12.4", "oleg-andreyev/mink-phpwebdriver": "<1.3.3", "oleg-andreyev/mink-phpwebdriver-extension": "^1.0", "symfony/form": "^6.4" From 216ba173d03db9fe7582ed826ffd92b38b2b8478 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 15 Nov 2024 16:13:19 +0100 Subject: [PATCH 06/13] [Composer] Dropped dependency on ci-scripts standalone app --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 94e7b1a..66ba7bf 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,6 @@ "require-dev": { "ibexa/code-style": "~2.0.0", "friendsofphp/php-cs-fixer": "^3.0", - "ibexa/ci-scripts": "^0.2@dev", "ibexa/doctrine-schema": "dev-ibx-8470-symfony-6 as 5.0.x-dev", "mikey179/vfsstream": "^1.6", "phpstan/phpstan": "^1.10", From 5710f198bb757006e99d50fac518084c993ea710 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 15 Nov 2024 16:22:23 +0100 Subject: [PATCH 07/13] [Composer] Dropped abandoned behat/mink-goutte-driver --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 66ba7bf..4b8c73a 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,6 @@ "php": ">=8.3", "ext-json": "*", "behat/behat": "^3.13", - "behat/mink-goutte-driver": "^1.2", "behat/mink-selenium2-driver": "^1.4", "bex/behat-screenshot": "^2.1", "dmore/behat-chrome-extension": "^1.3", From a2be8a05c21912492ec92c8c97973c53ff9ca475 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 15 Nov 2024 16:23:48 +0100 Subject: [PATCH 08/13] [Composer] Dropped direct dependency on PHP CS Fixer * Ibexa Code Style controls PHP CS Fixer dependency --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 4b8c73a..3adb98c 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,6 @@ }, "require-dev": { "ibexa/code-style": "~2.0.0", - "friendsofphp/php-cs-fixer": "^3.0", "ibexa/doctrine-schema": "dev-ibx-8470-symfony-6 as 5.0.x-dev", "mikey179/vfsstream": "^1.6", "phpstan/phpstan": "^1.10", From 40d705963a28e73ae10828d5e2e75e2b8b356f4e Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 15 Nov 2024 16:55:58 +0100 Subject: [PATCH 09/13] Aligned RetryChoiceListFactory with Symfony 6 --- src/bundle/Form/RetryChoiceListFactory.php | 76 +++++++++++++--------- 1 file changed, 47 insertions(+), 29 deletions(-) diff --git a/src/bundle/Form/RetryChoiceListFactory.php b/src/bundle/Form/RetryChoiceListFactory.php index e523094..6ccb117 100644 --- a/src/bundle/Form/RetryChoiceListFactory.php +++ b/src/bundle/Form/RetryChoiceListFactory.php @@ -25,48 +25,64 @@ public function __construct(ChoiceListFactoryInterface $choiceListFactory) $this->choiceListFactory = $choiceListFactory; } - /** {@inheritDoc} */ - public function createListFromChoices(iterable $choices, $value = null): ChoiceListInterface - { - $filter = \func_num_args() > 2 ? func_get_arg(2) : null; - + /** + * @param iterable $choices + * + * @throws \ErrorException + */ + public function createListFromChoices( + iterable $choices, + ?callable $value = null, + ?callable $filter = null + ): ChoiceListInterface { return $this->executeWithRetry(function () use ($choices, $value, $filter) { return $this->choiceListFactory->createListFromChoices($choices, $value, $filter); }); } - /** {@inheritDoc} */ - public function createListFromLoader(ChoiceLoaderInterface $loader, $value = null): ChoiceListInterface - { - $filter = \func_num_args() > 2 ? func_get_arg(2) : null; - + /** + * @throws \ErrorException + */ + public function createListFromLoader( + ChoiceLoaderInterface $loader, + ?callable $value = null, + ?callable $filter = null + ): ChoiceListInterface { return $this->executeWithRetry(function () use ($loader, $value, $filter) { return $this->choiceListFactory->createListFromLoader($loader, $value, $filter); }); } - /** {@inheritDoc} */ + /** + * @param array|callable|null $preferredChoices + * @param array|callable|null $attr + * @param array|callable $labelTranslationParameters + * + * @throws \ErrorException + */ public function createView( ChoiceListInterface $list, - $preferredChoices = null, - $label = null, - $index = null, - $groupBy = null, - $attr = null + array|callable|null $preferredChoices = null, + callable|false|null $label = null, + ?callable $index = null, + ?callable $groupBy = null, + array|callable|null $attr = null, + array|callable $labelTranslationParameters = [] + /* , bool $duplicatePreferredChoices = true */ ): ChoiceListView { - $labelTranslationParameters = \func_num_args() > 6 ? func_get_arg(6) : []; - - return $this->executeWithRetry(function () use ($list, $preferredChoices, $label, $index, $groupBy, $attr, $labelTranslationParameters) { - return $this->choiceListFactory->createView( - $list, - $preferredChoices, - $label, - $index, - $groupBy, - $attr, - $labelTranslationParameters - ); - }); + return $this->executeWithRetry( + function () use ($list, $preferredChoices, $label, $index, $groupBy, $attr, $labelTranslationParameters) { + return $this->choiceListFactory->createView( + $list, + $preferredChoices, + $label, + $index, + $groupBy, + $attr, + $labelTranslationParameters + ); + } + ); } /** @@ -75,6 +91,8 @@ public function createView( * @param callable(mixed ...$args): T $fn * * @return T + * + * @throws \ErrorException */ private function executeWithRetry(callable $fn) { From ff8da127149e537f4047cba22c88fe6d7f6b7521 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 15 Nov 2024 16:56:31 +0100 Subject: [PATCH 10/13] [Tests] Aligned form tests with Symfony 6 --- .../Form/RetryChoiceListFactoryTest.php | 2 +- .../Form/Stub/UnstableChoiceListFactory.php | 38 ++++++++++++++++--- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/tests/bundle/Form/RetryChoiceListFactoryTest.php b/tests/bundle/Form/RetryChoiceListFactoryTest.php index 5e92bff..fa68db1 100644 --- a/tests/bundle/Form/RetryChoiceListFactoryTest.php +++ b/tests/bundle/Form/RetryChoiceListFactoryTest.php @@ -60,7 +60,7 @@ public function testCreateListFromChoicesFail(): void { $retryChoiceListFactory = new RetryChoiceListFactory(new UnstableChoiceListFactory(4)); $this->expectException(ErrorException::class); - $retryChoiceListFactory->createListFromChoices([], null); + $retryChoiceListFactory->createListFromChoices([]); } public function testCreateListFromLoaderFail(): void diff --git a/tests/bundle/Form/Stub/UnstableChoiceListFactory.php b/tests/bundle/Form/Stub/UnstableChoiceListFactory.php index 1a266fb..ac14953 100644 --- a/tests/bundle/Form/Stub/UnstableChoiceListFactory.php +++ b/tests/bundle/Form/Stub/UnstableChoiceListFactory.php @@ -30,7 +30,12 @@ public function __construct(int $successfulCallAfterNthTry) $this->successfulCallAfterNthTry = $successfulCallAfterNthTry; } - public function createListFromChoices(iterable $choices, callable $value = null) + /** + * @param iterable $choices + * + * @throws \ErrorException + */ + public function createListFromChoices(iterable $choices, callable $value = null, ?callable $filter = null): ChoiceListInterface { ++$this->createListFromChoicesCounter; $this->failIfNeeded($this->createListFromChoicesCounter); @@ -38,22 +43,45 @@ public function createListFromChoices(iterable $choices, callable $value = null) return new ArrayChoiceList([]); } - public function createListFromLoader(ChoiceLoaderInterface $loader, callable $value = null) - { + /** + * @throws \ErrorException + */ + public function createListFromLoader( + ChoiceLoaderInterface $loader, + callable $value = null, + ?callable $filter = null + ): ChoiceListInterface { ++$this->createListFromLoaderCounter; $this->failIfNeeded($this->createListFromLoaderCounter); return new ArrayChoiceList([]); } - public function createView(ChoiceListInterface $list, $preferredChoices = null, $label = null, callable $index = null, callable $groupBy = null, $attr = null) - { + /** + * @param array|callable|null $preferredChoices + * @param array|callable|null $attr + * @param array|callable $labelTranslationParameters + * + * @throws \ErrorException + */ + public function createView( + ChoiceListInterface $list, + array|callable|null $preferredChoices = null, + callable|false|null $label = null, + ?callable $index = null, + ?callable $groupBy = null, + array|callable|null $attr = null, + array|callable $labelTranslationParameters = []/* , bool $duplicatePreferredChoices = true */ + ): ChoiceListView { ++$this->createViewCounter; $this->failIfNeeded($this->createViewCounter); return new ChoiceListView([]); } + /** + * @throws \ErrorException + */ private function failIfNeeded(int $callNumber): void { if ($callNumber <= $this->successfulCallAfterNthTry) { From abf95db65e14bcd359597aa754c90826a1ec886a Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 15 Nov 2024 16:57:30 +0100 Subject: [PATCH 11/13] [Tests] Aligned codebase with upgraded version of psy/psysh --- .../ObjectFunctionCallChainMatcher.php | 37 +++++++++++++++---- .../Matcher/ThisObjectMethodsMatcher.php | 9 ++++- src/lib/Core/Debug/Shell/Shell.php | 13 +++---- 3 files changed, 43 insertions(+), 16 deletions(-) diff --git a/src/lib/Core/Debug/Matcher/ObjectFunctionCallChainMatcher.php b/src/lib/Core/Debug/Matcher/ObjectFunctionCallChainMatcher.php index ce88287..c151a36 100644 --- a/src/lib/Core/Debug/Matcher/ObjectFunctionCallChainMatcher.php +++ b/src/lib/Core/Debug/Matcher/ObjectFunctionCallChainMatcher.php @@ -13,7 +13,16 @@ class ObjectFunctionCallChainMatcher extends ObjectMethodsMatcher { - public function getMatches(array $tokens, array $info = []) + /** + * @param array $info + * + * @phpstan-param list $tokens + * + * @return string[] + * + * @throws \ReflectionException + */ + public function getMatches(array $tokens, array $info = []): array { $input = $this->getInput($tokens); @@ -50,7 +59,6 @@ public function getMatches(array $tokens, array $info = []) // start a new chain $functionChainStarted = true; $chain[] = $this->getObjectClass($group); - continue; } } @@ -83,7 +91,10 @@ static function ($var) use ($input) { )); } - protected function getTokenName($token) + /** + * @phpstan-param list $token + */ + protected function getTokenName(array|string $token): string { if (!is_array($token)) { return $token; @@ -92,24 +103,36 @@ protected function getTokenName($token) return \token_name($token[0]); } - protected function isFunctionCall($tokenGroup): bool + /** + * @phpstan-param list $tokenGroup + */ + protected function isFunctionCall(array $tokenGroup): bool { return count($tokenGroup) >= 3 && self::tokenIs($tokenGroup[0], self::T_STRING) && $tokenGroup[1] === '(' && end($tokenGroup) === ')'; } - protected function getFunctionName($tokenGroup): string + /** + * @phpstan-param list $tokenGroup + */ + protected function getFunctionName(array $tokenGroup): string { return $tokenGroup[0][1]; } - protected function isObjectCall($tokenGroup): bool + /** + * @phpstan-param list $tokenGroup + */ + protected function isObjectCall(array $tokenGroup): bool { return self::tokenIs(end($tokenGroup), self::T_VARIABLE); } - protected function getObjectClass($tokenGroup): string + /** + * @phpstan-param list $tokenGroup + */ + protected function getObjectClass(array $tokenGroup): string { $objectName = \str_replace('$', '', end($tokenGroup)[1]); $object = $this->getVariable($objectName); diff --git a/src/lib/Core/Debug/Matcher/ThisObjectMethodsMatcher.php b/src/lib/Core/Debug/Matcher/ThisObjectMethodsMatcher.php index 040f45c..b674a52 100644 --- a/src/lib/Core/Debug/Matcher/ThisObjectMethodsMatcher.php +++ b/src/lib/Core/Debug/Matcher/ThisObjectMethodsMatcher.php @@ -16,7 +16,14 @@ class ThisObjectMethodsMatcher extends ObjectMethodsMatcher { - public function getMatches(array $tokens, array $info = []) + /** + * @param array $info + * + * @phpstan-param list $tokens + * + * @return string[] + */ + public function getMatches(array $tokens, array $info = []): array { $input = $this->getInput($tokens); diff --git a/src/lib/Core/Debug/Shell/Shell.php b/src/lib/Core/Debug/Shell/Shell.php index 891af2c..54a233c 100644 --- a/src/lib/Core/Debug/Shell/Shell.php +++ b/src/lib/Core/Debug/Shell/Shell.php @@ -17,10 +17,7 @@ class Shell extends BaseShell { - /** - * @return array - */ - protected function getDefaultMatchers() + protected function getDefaultMatchers(): array { $matchers = array_filter(parent::getDefaultMatchers(), static function (AbstractMatcher $matcher) { // Remove FunctionsMatcher as it spams autocomplete too much @@ -36,7 +33,7 @@ protected function getDefaultMatchers() public function addBaseImports(): void { $level = 1; - while (strpos(dirname(__DIR__, $level), 'vendor') !== false) { + while (str_contains(dirname(__DIR__, $level), 'vendor')) { ++$level; } $dir = dirname(__DIR__, $level); @@ -46,8 +43,8 @@ public function addBaseImports(): void ); $baseImports = array_filter($classes, static function (string $classFcqn): bool { - return strpos($classFcqn, 'Ibexa\Behat\Browser\Element') === 0 || - strpos($classFcqn, 'Ibexa\Behat\Browser\Locator') === 0; + return str_starts_with($classFcqn, 'Ibexa\Behat\Browser\Element') || + str_starts_with($classFcqn, 'Ibexa\Behat\Browser\Locator'); }); foreach ($baseImports as $import) { @@ -72,7 +69,7 @@ public function writeMessage(string $message): void $this->addInput(sprintf('sprintf("%s");', $message), true); } - public function displayExceptionMessage(Exception $e) + public function displayExceptionMessage(Exception $e): void { $this->writeMessage('The error message is: ' . $e->getMessage()); } From 831a5ce0657412a9eb467b25fb1ffa23502ba0fa Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 15 Nov 2024 16:58:27 +0100 Subject: [PATCH 12/13] [PHPStan] Removed resolved issues --- phpstan-baseline.neon | 210 ------------------------------------------ 1 file changed, 210 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 9c337a2..7647900 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,10 +1,5 @@ parameters: ignoreErrors: - - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\Command\\\\CreateExampleDataCommand\\:\\:configure\\(\\) has no return type specified\\.$#" - count: 1 - path: src/bundle/Command/CreateExampleDataCommand.php - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\Command\\\\CreateExampleDataManagerCommand\\:\\:createProcesses\\(\\) has no return type specified\\.$#" count: 1 @@ -40,16 +35,6 @@ parameters: count: 1 path: src/bundle/Command/CreateExampleDataManagerCommand.php - - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\Command\\\\CreateLanguageCommand\\:\\:configure\\(\\) has no return type specified\\.$#" - count: 1 - path: src/bundle/Command/CreateLanguageCommand.php - - - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\Command\\\\TestSiteaccessCommand\\:\\:configure\\(\\) has no return type specified\\.$#" - count: 1 - path: src/bundle/Command/TestSiteaccessCommand.php - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\Controller\\\\ExceptionController\\:\\:throwRepositoryUnauthorizedAction\\(\\) has no return type specified\\.$#" count: 1 @@ -90,96 +75,16 @@ parameters: count: 1 path: src/bundle/Controller/UnauthenticatedRedirectController.php - - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\DependencyInjection\\\\Compiler\\\\ElementFactoryCompilerPass\\:\\:process\\(\\) has no return type specified\\.$#" - count: 1 - path: src/bundle/DependencyInjection/Compiler/ElementFactoryCompilerPass.php - - - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\DependencyInjection\\\\Compiler\\\\FieldTypeDataProviderPass\\:\\:process\\(\\) has no return type specified\\.$#" - count: 1 - path: src/bundle/DependencyInjection/Compiler/FieldTypeDataProviderPass.php - - - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\DependencyInjection\\\\Compiler\\\\LimitationParserPass\\:\\:process\\(\\) has no return type specified\\.$#" - count: 1 - path: src/bundle/DependencyInjection/Compiler/LimitationParserPass.php - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\DependencyInjection\\\\IbexaBehatExtension\\:\\:load\\(\\) has no return type specified\\.$#" count: 1 path: src/bundle/DependencyInjection/IbexaBehatExtension.php - - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\DependencyInjection\\\\IbexaBehatExtension\\:\\:prepend\\(\\) has no return type specified\\.$#" - count: 1 - path: src/bundle/DependencyInjection/IbexaBehatExtension.php - - - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\DependencyInjection\\\\IbexaBehatExtension\\:\\:process\\(\\) has no return type specified\\.$#" - count: 1 - path: src/bundle/DependencyInjection/IbexaBehatExtension.php - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\DependencyInjection\\\\IbexaBehatExtension\\:\\:shouldLoadDxpServices\\(\\) has no return type specified\\.$#" count: 1 path: src/bundle/DependencyInjection/IbexaBehatExtension.php - - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\Form\\\\RetryChoiceListFactory\\:\\:createListFromChoices\\(\\) has parameter \\$choices with no value type specified in iterable type iterable\\.$#" - count: 1 - path: src/bundle/Form/RetryChoiceListFactory.php - - - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\Form\\\\RetryChoiceListFactory\\:\\:createListFromChoices\\(\\) has parameter \\$value with no type specified\\.$#" - count: 1 - path: src/bundle/Form/RetryChoiceListFactory.php - - - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\Form\\\\RetryChoiceListFactory\\:\\:createListFromLoader\\(\\) has parameter \\$value with no type specified\\.$#" - count: 1 - path: src/bundle/Form/RetryChoiceListFactory.php - - - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\Form\\\\RetryChoiceListFactory\\:\\:createView\\(\\) has parameter \\$attr with no value type specified in iterable type array\\.$#" - count: 1 - path: src/bundle/Form/RetryChoiceListFactory.php - - - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\Form\\\\RetryChoiceListFactory\\:\\:createView\\(\\) has parameter \\$groupBy with no type specified\\.$#" - count: 1 - path: src/bundle/Form/RetryChoiceListFactory.php - - - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\Form\\\\RetryChoiceListFactory\\:\\:createView\\(\\) has parameter \\$index with no type specified\\.$#" - count: 1 - path: src/bundle/Form/RetryChoiceListFactory.php - - - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\Form\\\\RetryChoiceListFactory\\:\\:createView\\(\\) has parameter \\$preferredChoices with no value type specified in iterable type array\\.$#" - count: 1 - path: src/bundle/Form/RetryChoiceListFactory.php - - - - message: "#^Method Symfony\\\\Component\\\\Form\\\\ChoiceList\\\\Factory\\\\ChoiceListFactoryInterface\\:\\:createListFromChoices\\(\\) invoked with 3 parameters, 1\\-2 required\\.$#" - count: 1 - path: src/bundle/Form/RetryChoiceListFactory.php - - - - message: "#^Method Symfony\\\\Component\\\\Form\\\\ChoiceList\\\\Factory\\\\ChoiceListFactoryInterface\\:\\:createListFromLoader\\(\\) invoked with 3 parameters, 1\\-2 required\\.$#" - count: 1 - path: src/bundle/Form/RetryChoiceListFactory.php - - - - message: "#^Method Symfony\\\\Component\\\\Form\\\\ChoiceList\\\\Factory\\\\ChoiceListFactoryInterface\\:\\:createView\\(\\) invoked with 7 parameters, 1\\-6 required\\.$#" - count: 1 - path: src/bundle/Form/RetryChoiceListFactory.php - - - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\IbexaBehatBundle\\:\\:build\\(\\) has no return type specified\\.$#" - count: 1 - path: src/bundle/IbexaBehatBundle.php - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\IbexaExtension\\:\\:configure\\(\\) has no return type specified\\.$#" count: 1 @@ -200,11 +105,6 @@ parameters: count: 1 path: src/bundle/IbexaExtension.php - - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\IbexaExtension\\:\\:process\\(\\) has no return type specified\\.$#" - count: 1 - path: src/bundle/IbexaExtension.php - - message: "#^Method Ibexa\\\\Bundle\\\\Behat\\\\IbexaExtension\\:\\:setMinkParameters\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" count: 1 @@ -2245,111 +2145,16 @@ parameters: count: 1 path: src/lib/Core/Context/TimeContext.php - - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Debug\\\\Command\\\\GoBackCommand\\:\\:configure\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/Core/Debug/Command/GoBackCommand.php - - - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Debug\\\\Command\\\\RefreshPageCommand\\:\\:configure\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/Core/Debug/Command/RefreshPageCommand.php - - - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Debug\\\\Command\\\\ShowHTMLCommand\\:\\:configure\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/Core/Debug/Command/ShowHTMLCommand.php - - - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Debug\\\\Command\\\\ShowURLCommand\\:\\:configure\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/Core/Debug/Command/ShowURLCommand.php - - - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Debug\\\\Command\\\\TakeScreenshotCommand\\:\\:configure\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/Core/Debug/Command/TakeScreenshotCommand.php - - message: "#^Cannot call method getName\\(\\) on ReflectionType\\|null\\.$#" count: 1 path: src/lib/Core/Debug/Matcher/ObjectFunctionCallChainMatcher.php - - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Debug\\\\Matcher\\\\ObjectFunctionCallChainMatcher\\:\\:getFunctionName\\(\\) has parameter \\$tokenGroup with no type specified\\.$#" - count: 1 - path: src/lib/Core/Debug/Matcher/ObjectFunctionCallChainMatcher.php - - - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Debug\\\\Matcher\\\\ObjectFunctionCallChainMatcher\\:\\:getMatches\\(\\) has parameter \\$info with no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/Core/Debug/Matcher/ObjectFunctionCallChainMatcher.php - - - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Debug\\\\Matcher\\\\ObjectFunctionCallChainMatcher\\:\\:getMatches\\(\\) has parameter \\$tokens with no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/Core/Debug/Matcher/ObjectFunctionCallChainMatcher.php - - - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Debug\\\\Matcher\\\\ObjectFunctionCallChainMatcher\\:\\:getMatches\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/Core/Debug/Matcher/ObjectFunctionCallChainMatcher.php - - - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Debug\\\\Matcher\\\\ObjectFunctionCallChainMatcher\\:\\:getObjectClass\\(\\) has parameter \\$tokenGroup with no type specified\\.$#" - count: 1 - path: src/lib/Core/Debug/Matcher/ObjectFunctionCallChainMatcher.php - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Debug\\\\Matcher\\\\ObjectFunctionCallChainMatcher\\:\\:getObjectClass\\(\\) should return string but returns class\\-string\\|false\\.$#" count: 1 path: src/lib/Core/Debug/Matcher/ObjectFunctionCallChainMatcher.php - - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Debug\\\\Matcher\\\\ObjectFunctionCallChainMatcher\\:\\:getTokenName\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/Core/Debug/Matcher/ObjectFunctionCallChainMatcher.php - - - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Debug\\\\Matcher\\\\ObjectFunctionCallChainMatcher\\:\\:getTokenName\\(\\) has parameter \\$token with no type specified\\.$#" - count: 1 - path: src/lib/Core/Debug/Matcher/ObjectFunctionCallChainMatcher.php - - - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Debug\\\\Matcher\\\\ObjectFunctionCallChainMatcher\\:\\:isFunctionCall\\(\\) has parameter \\$tokenGroup with no type specified\\.$#" - count: 1 - path: src/lib/Core/Debug/Matcher/ObjectFunctionCallChainMatcher.php - - - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Debug\\\\Matcher\\\\ObjectFunctionCallChainMatcher\\:\\:isObjectCall\\(\\) has parameter \\$tokenGroup with no type specified\\.$#" - count: 1 - path: src/lib/Core/Debug/Matcher/ObjectFunctionCallChainMatcher.php - - - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Debug\\\\Matcher\\\\ThisObjectMethodsMatcher\\:\\:getMatches\\(\\) has parameter \\$info with no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/Core/Debug/Matcher/ThisObjectMethodsMatcher.php - - - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Debug\\\\Matcher\\\\ThisObjectMethodsMatcher\\:\\:getMatches\\(\\) has parameter \\$tokens with no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/Core/Debug/Matcher/ThisObjectMethodsMatcher.php - - - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Debug\\\\Matcher\\\\ThisObjectMethodsMatcher\\:\\:getMatches\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/Core/Debug/Matcher/ThisObjectMethodsMatcher.php - - - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Debug\\\\Shell\\\\Shell\\:\\:displayExceptionMessage\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/Core/Debug/Shell/Shell.php - - - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Debug\\\\Shell\\\\Shell\\:\\:getDefaultMatchers\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/Core/Debug/Shell/Shell.php - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Log\\\\Failure\\\\AnalysisResult\\:\\:getJiraReference\\(\\) should return string but returns string\\|null\\.$#" count: 1 @@ -2735,21 +2540,6 @@ parameters: count: 1 path: tests/Browser/Locator/Validator/CssLocatorValidatorTest.php - - - message: "#^Method Ibexa\\\\Tests\\\\Bundle\\\\Behat\\\\Form\\\\Stub\\\\UnstableChoiceListFactory\\:\\:createListFromChoices\\(\\) has parameter \\$choices with no value type specified in iterable type iterable\\.$#" - count: 1 - path: tests/bundle/Form/Stub/UnstableChoiceListFactory.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Bundle\\\\Behat\\\\Form\\\\Stub\\\\UnstableChoiceListFactory\\:\\:createView\\(\\) has parameter \\$attr with no value type specified in iterable type array\\.$#" - count: 1 - path: tests/bundle/Form/Stub/UnstableChoiceListFactory.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Bundle\\\\Behat\\\\Form\\\\Stub\\\\UnstableChoiceListFactory\\:\\:createView\\(\\) has parameter \\$preferredChoices with no value type specified in iterable type array\\.$#" - count: 1 - path: tests/bundle/Form/Stub/UnstableChoiceListFactory.php - - message: "#^Method Ibexa\\\\Tests\\\\Behat\\\\Browser\\\\Element\\\\BaseTestCase\\:\\:createCollection\\(\\) has parameter \\$elementTexts with no type specified\\.$#" count: 1 From 7fe0926ddb8e9a6d71a4f630535223d27b4d78d9 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 25 Nov 2024 13:03:54 +0100 Subject: [PATCH 13/13] [TMP] Dropped dependency on SF 5 bex/behat-screenshot --- behat_ibexa_oss.yaml | 18 +++++++++--------- composer.json | 1 - 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/behat_ibexa_oss.yaml b/behat_ibexa_oss.yaml index 090d07d..c616b85 100644 --- a/behat_ibexa_oss.yaml +++ b/behat_ibexa_oss.yaml @@ -53,15 +53,15 @@ default: Liuggio\Fastest\Behat\ListFeaturesExtension\Extension: ~ - Bex\Behat\ScreenshotExtension: - active_image_drivers: cloudinary - image_drivers: - cloudinary: - screenshot_directory: /tmp/behat-screenshot/ - cloud_name: ezplatformtravis - preset: ezplatform - mode: normal - limit: 10 +# Bex\Behat\ScreenshotExtension: +# active_image_drivers: cloudinary +# image_drivers: +# cloudinary: +# screenshot_directory: /tmp/behat-screenshot/ +# cloud_name: ezplatformtravis +# preset: ezplatform +# mode: normal +# limit: 10 suites: ~ diff --git a/composer.json b/composer.json index 3adb98c..f1cf084 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,6 @@ "ext-json": "*", "behat/behat": "^3.13", "behat/mink-selenium2-driver": "^1.4", - "bex/behat-screenshot": "^2.1", "dmore/behat-chrome-extension": "^1.3", "dmore/chrome-mink-driver": "^2.7", "ezsystems/behat-screenshot-image-driver-cloudinary": "^1.1@dev",