From 50a02b3141958a5629c37660fc94fb44a245bac9 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Mon, 10 Aug 2026 19:03:53 +0200 Subject: [PATCH 1/2] [e2e] Remove attributes e2e test The e2e/attributes fixture project was the only entry in the e2e_diff.yaml matrix, so both are removed together. --- .../.github/workflows/e2e_diff.yaml | 37 ---- .../e2e/attributes/composer.json | 5 - .../e2e/attributes/rector.php | 14 -- .../e2e/attributes/src/route.php | 13 -- .../Component/Routing/Annotation/Route.php | 177 ------------------ 5 files changed, 246 deletions(-) delete mode 100644 build/target-repository/.github/workflows/e2e_diff.yaml delete mode 100644 build/target-repository/e2e/attributes/composer.json delete mode 100644 build/target-repository/e2e/attributes/rector.php delete mode 100644 build/target-repository/e2e/attributes/src/route.php delete mode 100644 build/target-repository/e2e/attributes/stubs/Symfony/Component/Routing/Annotation/Route.php diff --git a/build/target-repository/.github/workflows/e2e_diff.yaml b/build/target-repository/.github/workflows/e2e_diff.yaml deleted file mode 100644 index 2bf284f0be9..00000000000 --- a/build/target-repository/.github/workflows/e2e_diff.yaml +++ /dev/null @@ -1,37 +0,0 @@ -# This workflow runs system tests: Use the Rector application from the source -# checkout to process "fixture" projects in tests/system-tests -# to see if those can be processed successfully -name: End to End tests that expect diff - -on: - push: - branches: - - main - -jobs: - end_to_end_with_diff: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php_version: ['7.4', '8.0', '8.1'] - directory: - - 'e2e/attributes' - - name: Tests with diffs on PHP ${{ matrix.php_version }} - ${{ matrix.directory }} - - steps: - - uses: actions/checkout@v4 - - - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php_version }} - coverage: none - - - - run: composer require rector/rector:dev-main --dev - working-directory: ${{ matrix.directory }} - - - - run: vendor/bin/rector process --ansi - working-directory: ${{ matrix.directory }} diff --git a/build/target-repository/e2e/attributes/composer.json b/build/target-repository/e2e/attributes/composer.json deleted file mode 100644 index a8d803fa520..00000000000 --- a/build/target-repository/e2e/attributes/composer.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "autoload-dev": { - "directories": ["stubs"] - } -} diff --git a/build/target-repository/e2e/attributes/rector.php b/build/target-repository/e2e/attributes/rector.php deleted file mode 100644 index 027d3fda920..00000000000 --- a/build/target-repository/e2e/attributes/rector.php +++ /dev/null @@ -1,14 +0,0 @@ -sets([SymfonySetList::SYMFONY_52]); - - $rectorConfig->phpVersion(PhpVersion::PHP_80); - $rectorConfig->paths([__DIR__ . '/src']); -}; diff --git a/build/target-repository/e2e/attributes/src/route.php b/build/target-repository/e2e/attributes/src/route.php deleted file mode 100644 index f951959c055..00000000000 --- a/build/target-repository/e2e/attributes/src/route.php +++ /dev/null @@ -1,13 +0,0 @@ - $value) { - $method = 'set'.str_replace('_', '', $key); - if (!method_exists($this, $method)) { - throw new \BadMethodCallException(sprintf('Unknown property "%s" on annotation "%s".', $key, \get_class($this))); - } - $this->$method($value); - } - } - - public function setPath($path) - { - $this->path = $path; - } - - public function getPath() - { - return $this->path; - } - - public function setLocalizedPaths(array $localizedPaths) - { - $this->localizedPaths = $localizedPaths; - } - - public function getLocalizedPaths(): array - { - return $this->localizedPaths; - } - - public function setHost($pattern) - { - $this->host = $pattern; - } - - public function getHost() - { - return $this->host; - } - - public function setName($name) - { - $this->name = $name; - } - - public function getName() - { - return $this->name; - } - - public function setRequirements($requirements) - { - $this->requirements = $requirements; - } - - public function getRequirements() - { - return $this->requirements; - } - - public function setOptions($options) - { - $this->options = $options; - } - - public function getOptions() - { - return $this->options; - } - - public function setDefaults($defaults) - { - $this->defaults = $defaults; - } - - public function getDefaults() - { - return $this->defaults; - } - - public function setSchemes($schemes) - { - $this->schemes = \is_array($schemes) ? $schemes : [$schemes]; - } - - public function getSchemes() - { - return $this->schemes; - } - - public function setMethods($methods) - { - $this->methods = \is_array($methods) ? $methods : [$methods]; - } - - public function getMethods() - { - return $this->methods; - } - - public function setCondition($condition) - { - $this->condition = $condition; - } - - public function getCondition() - { - return $this->condition; - } -} From a3fb667f1c58762524db584d99ac81dfa4874fda Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Mon, 10 Aug 2026 17:06:33 +0000 Subject: [PATCH 2/2] [ci-review] Rector Rectify --- .../ExtensionComposerBasedSetTest.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/Configuration/ExtensionComposerBasedSetTest.php b/tests/Configuration/ExtensionComposerBasedSetTest.php index de5873a81cc..8975e47187e 100644 --- a/tests/Configuration/ExtensionComposerBasedSetTest.php +++ b/tests/Configuration/ExtensionComposerBasedSetTest.php @@ -19,11 +19,11 @@ public function testEverySetGroupToggleHasASetListMapped(): void { $extensionSetLists = $this->provideExtensionComposerBasedSetLists(); - self::assertArrayHasKey(SetGroup::LARAVEL, $extensionSetLists); - self::assertArrayHasKey(SetGroup::DRUPAL, $extensionSetLists); + $this->assertArrayHasKey(SetGroup::LARAVEL, $extensionSetLists); + $this->assertArrayHasKey(SetGroup::DRUPAL, $extensionSetLists); - foreach ($extensionSetLists as $setListConstant) { - self::assertMatchesRegularExpression('#^\w+(\\\\\w+)+::\w+$#', $setListConstant); + foreach ($extensionSetLists as $extensionSetList) { + $this->assertMatchesRegularExpression('#^\w+(\\\\\w+)+::\w+$#', $extensionSetList); } } @@ -34,14 +34,14 @@ public function testEverySetGroupToggleHasASetListMapped(): void public function testFallsBackToTheSetGroupWhenTheExtensionIsNotInstalled(): void { foreach ($this->provideExtensionComposerBasedSetLists() as $setListConstant) { - self::assertFalse(defined($setListConstant), $setListConstant); + $this->assertFalse(defined($setListConstant), $setListConstant); } $rectorConfigBuilder = new RectorConfigBuilder() ->withComposerBased(laravel: true, drupal: true); - self::assertSame([SetGroup::LARAVEL, SetGroup::DRUPAL], $this->readPrivateArray($rectorConfigBuilder, 'setGroups')); - self::assertSame([], $this->readPrivateArray($rectorConfigBuilder, 'sets')); + $this->assertSame([SetGroup::LARAVEL, SetGroup::DRUPAL], $this->readPrivateArray($rectorConfigBuilder, 'setGroups')); + $this->assertSame([], $this->readPrivateArray($rectorConfigBuilder, 'sets')); } /** @@ -52,7 +52,7 @@ private function provideExtensionComposerBasedSetLists(): array $extensionSetLists = new ReflectionClass(RectorConfigBuilder::class) ->getConstant('EXTENSION_COMPOSER_BASED_SET_LISTS'); - self::assertIsArray($extensionSetLists); + $this->assertIsArray($extensionSetLists); return $extensionSetLists; } @@ -66,7 +66,7 @@ private function readPrivateArray(RectorConfigBuilder $rectorConfigBuilder, stri ->getProperty($propertyName) ->getValue($rectorConfigBuilder); - self::assertIsArray($value); + $this->assertIsArray($value); return $value; }