diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5a806c08..c9728b54 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,9 +17,7 @@ jobs: fail-fast: false matrix: php: - - '7.4' - - '8.0' - - '8.1' + - '8.3' composer_options: [ "" ] steps: @@ -50,7 +48,7 @@ jobs: strategy: matrix: php: - - '8.1' + - '8.3' steps: - uses: actions/checkout@v2 diff --git a/composer.json b/composer.json index 85a6d8ec..102ba2c8 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ "symfony/form": "^5.4" }, "require-dev": { - "ibexa/code-style": "^1.0", + "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", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 03e0cf7c..c07a4da1 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1970,11 +1970,6 @@ parameters: count: 1 path: src/lib/Browser/Routing/Router.php - - - message: "#^Access to an undefined property Ibexa\\\\Behat\\\\Core\\\\Behat\\\\ArgumentParser\\:\\:\\$roleFacade\\.$#" - count: 2 - path: src/lib/Core/Behat/ArgumentParser.php - - message: "#^Method Ibexa\\\\Behat\\\\Core\\\\Behat\\\\ArgumentParser\\:\\:parseLimitations\\(\\) has no return type specified\\.$#" count: 1 @@ -2860,11 +2855,6 @@ parameters: count: 1 path: tests/lib/Browser/Element/ElementTest.php - - - message: "#^Class Ibexa\\\\Tests\\\\Behat\\\\Browser\\\\Element\\\\Mapper\\\\TextMapperTestCase not found\\.$#" - count: 1 - path: tests/lib/Browser/Element/Mapper/ElementTextMapperTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Behat\\\\Browser\\\\Filter\\\\BrowserLogFilterTest\\:\\:testFiltersOutExcludedPatterns\\(\\) has no return type specified\\.$#" count: 1 diff --git a/src/lib/Core/Behat/ArgumentParser.php b/src/lib/Core/Behat/ArgumentParser.php index 31cd92a1..6969d9a0 100644 --- a/src/lib/Core/Behat/ArgumentParser.php +++ b/src/lib/Core/Behat/ArgumentParser.php @@ -16,8 +16,9 @@ class ArgumentParser { private const ROOT_KEYWORD = 'root'; - /** @var \Ibexa\Behat\Browser\Environment\ParameterProviderInterface */ - private $parameterProvider; + private ParameterProviderInterface $parameterProvider; + + private RoleFacade $roleFacade; public function __construct(RoleFacade $roleFacade, ParameterProviderInterface $parameterProvider) { diff --git a/tests/Browser/Element/Assert/CollectionAssertTest.php b/tests/Browser/Element/Assert/CollectionAssertTest.php index ac212300..63325b51 100644 --- a/tests/Browser/Element/Assert/CollectionAssertTest.php +++ b/tests/Browser/Element/Assert/CollectionAssertTest.php @@ -33,7 +33,7 @@ public function testAssertionPasses(array $expectedElementTexts, array $actualEl $collectionAssert = new CollectionAssert($this->locator, $collection); $returnedCollection = $collectionAssert->containsElementsWithText($expectedElementTexts); - $this->assertSame($collection, $returnedCollection); + self::assertSame($collection, $returnedCollection); } /** diff --git a/tests/bundle/Form/RetryChoiceListFactoryTest.php b/tests/bundle/Form/RetryChoiceListFactoryTest.php index 601a2a08..5e92bff8 100644 --- a/tests/bundle/Form/RetryChoiceListFactoryTest.php +++ b/tests/bundle/Form/RetryChoiceListFactoryTest.php @@ -78,13 +78,13 @@ public function testCreateViewFail(): void } /** - * @return iterable> + * @return iterable */ public static function provider(): iterable { - yield ['No failures' => 0]; - yield ['One failure' => 1]; - yield ['Two failures' => 2]; - yield ['Three failures' => 3]; + yield 'No failures' => [0]; + yield 'One failure' => [1]; + yield 'Two failures' => [2]; + yield 'Three failures' => [3]; } } diff --git a/tests/lib/Browser/Element/Condition/ElementTransitionHasEndedConditionTest.php b/tests/lib/Browser/Element/Condition/ElementTransitionHasEndedConditionTest.php index 818cbda6..5bd47e75 100644 --- a/tests/lib/Browser/Element/Condition/ElementTransitionHasEndedConditionTest.php +++ b/tests/lib/Browser/Element/Condition/ElementTransitionHasEndedConditionTest.php @@ -66,7 +66,7 @@ private function createChildElement(bool $hasStartedTransition, bool $hasEndedTr { $childElement = $this->createStub(ElementInterface::class); $childElement->method('getText')->willReturn('ChildText'); - $childElement->method('hasClass')->will($this->returnValueMap( + $childElement->method('hasClass')->will(self::returnValueMap( [ ['ibexa-selenium-transition-started', $hasStartedTransition], ['ibexa-selenium-transition-ended', $hasEndedTransition], diff --git a/tests/lib/Browser/Element/Mapper/ElementTextMapperTest.php b/tests/lib/Browser/Element/Mapper/ElementTextMapperTest.php index 5b84c7f8..18c0011c 100644 --- a/tests/lib/Browser/Element/Mapper/ElementTextMapperTest.php +++ b/tests/lib/Browser/Element/Mapper/ElementTextMapperTest.php @@ -29,5 +29,3 @@ public function testMapsSingleElement(): void Assert::assertEquals('Element1', $this->mapper->map($element)); } } - -class_alias(TextMapperTestCase::class, 'EzSystems\Behat\Test\Browser\Element\Mapper\TextMapperTestCase');