From 1f38a1a71f8179dd79ea77930ae0041aa9941951 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Fri, 7 Aug 2026 11:25:07 +0200 Subject: [PATCH] remove unuset set tests, as rule tests are the source of truth --- phpstan.neon | 5 - .../Fixture/version_bound_renames.php.inc | 4 + .../DoctrineBUNDLE210SetTest.php | 36 ------- .../eventsubscriber_to_attribute.php.inc | 82 ---------------- .../DoctrineBUNDLE210Set/config/composer.json | 5 - .../config/configured_set.php | 9 -- .../DoctrineCOLLECTION22SetTest.php | 36 ------- ...sc_desc_in_attributes_not_replaced.php.inc | 27 ------ .../Fixture/criteria_to_order.php.inc | 15 --- .../config/composer.json | 5 - .../config/configured_set.php | 9 -- .../DoctrineDBAL211SetTest.php | 36 ------- .../Fixture/dont_replace_static_calls.php.inc | 12 --- .../Fixture/replace_constants.php.inc | 61 ------------ .../DoctrineDBAL211Set/config/composer.json | 5 - .../config/configured_set.php | 9 -- .../DoctrineORM219SetTest.php | 36 ------- ...type_with_discriminator_column_map.php.inc | 43 --------- .../Fixture/join_column_many_to_one.php.inc | 43 --------- ...rine_lexer_constants_to_token_type.php.inc | 95 ------------------- .../Fixture/table_and_nested_index.php.inc | 34 ------- .../Fixture/unwrap_join_columns.php.inc | 33 ------- .../decouple_join_columns.php.inc | 33 ------- .../FixturePhp81/overrides.php.inc | 37 -------- .../table_and_nested_index.php.inc | 33 ------- .../Php81NestedAttributesTest.php | 36 ------- .../DoctrineORM219Set/config/composer.json | 5 - .../config/configured_set.php | 12 --- .../config/php81_nested_attributes.php | 12 --- 29 files changed, 4 insertions(+), 804 deletions(-) delete mode 100644 tests/Set/DoctrineBUNDLE210Set/DoctrineBUNDLE210SetTest.php delete mode 100644 tests/Set/DoctrineBUNDLE210Set/Fixture/eventsubscriber_to_attribute.php.inc delete mode 100644 tests/Set/DoctrineBUNDLE210Set/config/composer.json delete mode 100644 tests/Set/DoctrineBUNDLE210Set/config/configured_set.php delete mode 100644 tests/Set/DoctrineCOLLECTION22Set/DoctrineCOLLECTION22SetTest.php delete mode 100644 tests/Set/DoctrineCOLLECTION22Set/Fixture/asc_desc_in_attributes_not_replaced.php.inc delete mode 100644 tests/Set/DoctrineCOLLECTION22Set/Fixture/criteria_to_order.php.inc delete mode 100644 tests/Set/DoctrineCOLLECTION22Set/config/composer.json delete mode 100644 tests/Set/DoctrineCOLLECTION22Set/config/configured_set.php delete mode 100644 tests/Set/DoctrineDBAL211Set/DoctrineDBAL211SetTest.php delete mode 100644 tests/Set/DoctrineDBAL211Set/Fixture/dont_replace_static_calls.php.inc delete mode 100644 tests/Set/DoctrineDBAL211Set/Fixture/replace_constants.php.inc delete mode 100644 tests/Set/DoctrineDBAL211Set/config/composer.json delete mode 100644 tests/Set/DoctrineDBAL211Set/config/configured_set.php delete mode 100644 tests/Set/DoctrineORM219Set/DoctrineORM219SetTest.php delete mode 100644 tests/Set/DoctrineORM219Set/Fixture/inheritancetype_with_discriminator_column_map.php.inc delete mode 100644 tests/Set/DoctrineORM219Set/Fixture/join_column_many_to_one.php.inc delete mode 100644 tests/Set/DoctrineORM219Set/Fixture/rename_doctrine_lexer_constants_to_token_type.php.inc delete mode 100644 tests/Set/DoctrineORM219Set/Fixture/table_and_nested_index.php.inc delete mode 100644 tests/Set/DoctrineORM219Set/Fixture/unwrap_join_columns.php.inc delete mode 100644 tests/Set/DoctrineORM219Set/FixturePhp81/decouple_join_columns.php.inc delete mode 100644 tests/Set/DoctrineORM219Set/FixturePhp81/overrides.php.inc delete mode 100644 tests/Set/DoctrineORM219Set/FixturePhp81/table_and_nested_index.php.inc delete mode 100644 tests/Set/DoctrineORM219Set/Php81NestedAttributesTest.php delete mode 100644 tests/Set/DoctrineORM219Set/config/composer.json delete mode 100644 tests/Set/DoctrineORM219Set/config/configured_set.php delete mode 100644 tests/Set/DoctrineORM219Set/config/php81_nested_attributes.php diff --git a/phpstan.neon b/phpstan.neon index 5ffd0490..1fd07a37 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -38,11 +38,6 @@ parameters: # false positive - '#Parameter \#1 \$tag of method Rector\\BetterPhpDocParser\\PhpDocParser\\ClassAnnotationMatcher\:\:resolveTagFullyQualifiedName\(\) expects string, string\|null given#' - - - message: '#Parameter \#1 \$phpVersion of method Rector\\Config\\RectorConfig\:\:phpVersion\(\) expects (.*?), \d+ given#' - paths: - - tests/Set/*/config/configured_set.php - # needed for instanceof method API - '#Doing instanceof PHPStan\\Type\\ObjectType is error\-prone and deprecated\. Use Type\:\:isObject\(\) or Type\:\:getObjectClassNames\(\) instead#' - '#Doing instanceof PHPStan\\Type\\(Generic\\GenericObjectType|ArrayType) is error\-prone and deprecated#' diff --git a/tests/ComposerBased/Fixture/version_bound_renames.php.inc b/tests/ComposerBased/Fixture/version_bound_renames.php.inc index e9e283df..fb27bb1b 100644 --- a/tests/ComposerBased/Fixture/version_bound_renames.php.inc +++ b/tests/ComposerBased/Fixture/version_bound_renames.php.inc @@ -1,5 +1,7 @@ doTestFile($filePath); - } - - public static function provideData(): Iterator - { - return self::yieldFilesFromDirectory(__DIR__ . '/Fixture'); - } - - public function provideConfigFilePath(): string - { - return __DIR__ . '/config/configured_set.php'; - } - - /** - * The composer-based set rules are bound to the Doctrine package versions in this "composer.json" - */ - protected function provideComposerJsonFilePath(): string - { - return __DIR__ . '/config/composer.json'; - } -} diff --git a/tests/Set/DoctrineBUNDLE210Set/Fixture/eventsubscriber_to_attribute.php.inc b/tests/Set/DoctrineBUNDLE210Set/Fixture/eventsubscriber_to_attribute.php.inc deleted file mode 100644 index 70718e17..00000000 --- a/tests/Set/DoctrineBUNDLE210Set/Fixture/eventsubscriber_to_attribute.php.inc +++ /dev/null @@ -1,82 +0,0 @@ - ------ - diff --git a/tests/Set/DoctrineBUNDLE210Set/config/composer.json b/tests/Set/DoctrineBUNDLE210Set/config/composer.json deleted file mode 100644 index 50a07c63..00000000 --- a/tests/Set/DoctrineBUNDLE210Set/config/composer.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "require": { - "doctrine/doctrine-bundle": "^2.10" - } -} diff --git a/tests/Set/DoctrineBUNDLE210Set/config/configured_set.php b/tests/Set/DoctrineBUNDLE210Set/config/configured_set.php deleted file mode 100644 index f5135d96..00000000 --- a/tests/Set/DoctrineBUNDLE210Set/config/configured_set.php +++ /dev/null @@ -1,9 +0,0 @@ -sets([__DIR__ . '/../../../../config/sets/composer-based.php']); -}; diff --git a/tests/Set/DoctrineCOLLECTION22Set/DoctrineCOLLECTION22SetTest.php b/tests/Set/DoctrineCOLLECTION22Set/DoctrineCOLLECTION22SetTest.php deleted file mode 100644 index 8e072724..00000000 --- a/tests/Set/DoctrineCOLLECTION22Set/DoctrineCOLLECTION22SetTest.php +++ /dev/null @@ -1,36 +0,0 @@ -doTestFile($filePath); - } -} diff --git a/tests/Set/DoctrineCOLLECTION22Set/Fixture/asc_desc_in_attributes_not_replaced.php.inc b/tests/Set/DoctrineCOLLECTION22Set/Fixture/asc_desc_in_attributes_not_replaced.php.inc deleted file mode 100644 index 65d88f72..00000000 --- a/tests/Set/DoctrineCOLLECTION22Set/Fixture/asc_desc_in_attributes_not_replaced.php.inc +++ /dev/null @@ -1,27 +0,0 @@ - \Doctrine\Common\Collections\Criteria::ASC])] - public \Doctrine\Common\Collections\Collection $properties; - - #[ORM\OneToMany(targetEntity: YetAnotherEntity::class, mappedBy: 'dummy')] - #[ORM\OrderBy(["id" => \Doctrine\Common\Collections\Criteria::DESC])] - public \Doctrine\Common\Collections\Collection $otherProperties; -} -?> ------ - 'ASC'])] - public \Doctrine\Common\Collections\Collection $properties; - - #[ORM\OneToMany(targetEntity: YetAnotherEntity::class, mappedBy: 'dummy')] - #[ORM\OrderBy(["id" => 'DESC'])] - public \Doctrine\Common\Collections\Collection $otherProperties; -} -?> diff --git a/tests/Set/DoctrineCOLLECTION22Set/Fixture/criteria_to_order.php.inc b/tests/Set/DoctrineCOLLECTION22Set/Fixture/criteria_to_order.php.inc deleted file mode 100644 index 3bc38433..00000000 --- a/tests/Set/DoctrineCOLLECTION22Set/Fixture/criteria_to_order.php.inc +++ /dev/null @@ -1,15 +0,0 @@ -orderBy(['asc' => Criteria::ASC, 'desc' => Criteria::DESC]); - ------ -orderBy(['asc' => \Doctrine\Common\Collections\Order::Ascending, 'desc' => \Doctrine\Common\Collections\Order::Descending]); - diff --git a/tests/Set/DoctrineCOLLECTION22Set/config/composer.json b/tests/Set/DoctrineCOLLECTION22Set/config/composer.json deleted file mode 100644 index ae640d7e..00000000 --- a/tests/Set/DoctrineCOLLECTION22Set/config/composer.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "require": { - "doctrine/collections": "^2.2" - } -} diff --git a/tests/Set/DoctrineCOLLECTION22Set/config/configured_set.php b/tests/Set/DoctrineCOLLECTION22Set/config/configured_set.php deleted file mode 100644 index f5135d96..00000000 --- a/tests/Set/DoctrineCOLLECTION22Set/config/configured_set.php +++ /dev/null @@ -1,9 +0,0 @@ -sets([__DIR__ . '/../../../../config/sets/composer-based.php']); -}; diff --git a/tests/Set/DoctrineDBAL211Set/DoctrineDBAL211SetTest.php b/tests/Set/DoctrineDBAL211Set/DoctrineDBAL211SetTest.php deleted file mode 100644 index b8bbf6b1..00000000 --- a/tests/Set/DoctrineDBAL211Set/DoctrineDBAL211SetTest.php +++ /dev/null @@ -1,36 +0,0 @@ -doTestFile($filePath); - } - - public static function provideData(): Iterator - { - return self::yieldFilesFromDirectory(__DIR__ . '/Fixture'); - } - - public function provideConfigFilePath(): string - { - return __DIR__ . '/config/configured_set.php'; - } - - /** - * The composer-based set rules are bound to the Doctrine package versions in this "composer.json" - */ - protected function provideComposerJsonFilePath(): string - { - return __DIR__ . '/config/composer.json'; - } -} diff --git a/tests/Set/DoctrineDBAL211Set/Fixture/dont_replace_static_calls.php.inc b/tests/Set/DoctrineDBAL211Set/Fixture/dont_replace_static_calls.php.inc deleted file mode 100644 index e7e784a5..00000000 --- a/tests/Set/DoctrineDBAL211Set/Fixture/dont_replace_static_calls.php.inc +++ /dev/null @@ -1,12 +0,0 @@ - ------ - diff --git a/tests/Set/DoctrineDBAL211Set/config/composer.json b/tests/Set/DoctrineDBAL211Set/config/composer.json deleted file mode 100644 index 296545ee..00000000 --- a/tests/Set/DoctrineDBAL211Set/config/composer.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "require": { - "doctrine/dbal": "^2.11" - } -} diff --git a/tests/Set/DoctrineDBAL211Set/config/configured_set.php b/tests/Set/DoctrineDBAL211Set/config/configured_set.php deleted file mode 100644 index f5135d96..00000000 --- a/tests/Set/DoctrineDBAL211Set/config/configured_set.php +++ /dev/null @@ -1,9 +0,0 @@ -sets([__DIR__ . '/../../../../config/sets/composer-based.php']); -}; diff --git a/tests/Set/DoctrineORM219Set/DoctrineORM219SetTest.php b/tests/Set/DoctrineORM219Set/DoctrineORM219SetTest.php deleted file mode 100644 index d57232c3..00000000 --- a/tests/Set/DoctrineORM219Set/DoctrineORM219SetTest.php +++ /dev/null @@ -1,36 +0,0 @@ -doTestFile($filePath); - } - - public static function provideData(): Iterator - { - return self::yieldFilesFromDirectory(__DIR__ . '/Fixture'); - } - - public function provideConfigFilePath(): string - { - return __DIR__ . '/config/configured_set.php'; - } - - /** - * The composer-based set rules are bound to the Doctrine package versions in this "composer.json" - */ - protected function provideComposerJsonFilePath(): string - { - return __DIR__ . '/config/composer.json'; - } -} diff --git a/tests/Set/DoctrineORM219Set/Fixture/inheritancetype_with_discriminator_column_map.php.inc b/tests/Set/DoctrineORM219Set/Fixture/inheritancetype_with_discriminator_column_map.php.inc deleted file mode 100644 index 10bd5f5b..00000000 --- a/tests/Set/DoctrineORM219Set/Fixture/inheritancetype_with_discriminator_column_map.php.inc +++ /dev/null @@ -1,43 +0,0 @@ - ------ - 'Person', 'employee' => 'Employee'])] -class Person -{ -} - -?> diff --git a/tests/Set/DoctrineORM219Set/Fixture/join_column_many_to_one.php.inc b/tests/Set/DoctrineORM219Set/Fixture/join_column_many_to_one.php.inc deleted file mode 100644 index abc4cc3d..00000000 --- a/tests/Set/DoctrineORM219Set/Fixture/join_column_many_to_one.php.inc +++ /dev/null @@ -1,43 +0,0 @@ - ------ - diff --git a/tests/Set/DoctrineORM219Set/Fixture/rename_doctrine_lexer_constants_to_token_type.php.inc b/tests/Set/DoctrineORM219Set/Fixture/rename_doctrine_lexer_constants_to_token_type.php.inc deleted file mode 100644 index 9e4f9703..00000000 --- a/tests/Set/DoctrineORM219Set/Fixture/rename_doctrine_lexer_constants_to_token_type.php.inc +++ /dev/null @@ -1,95 +0,0 @@ -value2) { - return sprintf( - 'AGE(%s, %s)', - $this->value1->dispatch($sqlWalker), - $this->value2->dispatch($sqlWalker) - ); - } - - return sprintf( - 'AGE(%s)', - $this->value1->dispatch($sqlWalker), - ); - } - - public function parse(Parser $parser) - { - $parser->match(\Doctrine\ORM\Query\Lexer::T_IDENTIFIER); - $parser->match(\Doctrine\ORM\Query\Lexer::T_OPEN_PARENTHESIS); - - $this->value1 = $parser->SimpleArithmeticExpression(); - - $parser->match(\Doctrine\ORM\Query\Lexer::T_COMMA); - - $this->value2 = $parser->SimpleArithmeticExpression(); - - $parser->match(\Doctrine\ORM\Query\Lexer::T_CLOSE_PARENTHESIS); - } -} - -?> ------ -value2) { - return sprintf( - 'AGE(%s, %s)', - $this->value1->dispatch($sqlWalker), - $this->value2->dispatch($sqlWalker) - ); - } - - return sprintf( - 'AGE(%s)', - $this->value1->dispatch($sqlWalker), - ); - } - - public function parse(Parser $parser) - { - $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER); - $parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS); - - $this->value1 = $parser->SimpleArithmeticExpression(); - - $parser->match(\Doctrine\ORM\Query\TokenType::T_COMMA); - - $this->value2 = $parser->SimpleArithmeticExpression(); - - $parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS); - } -} - -?> diff --git a/tests/Set/DoctrineORM219Set/Fixture/table_and_nested_index.php.inc b/tests/Set/DoctrineORM219Set/Fixture/table_and_nested_index.php.inc deleted file mode 100644 index 7fb492e0..00000000 --- a/tests/Set/DoctrineORM219Set/Fixture/table_and_nested_index.php.inc +++ /dev/null @@ -1,34 +0,0 @@ - ------ - diff --git a/tests/Set/DoctrineORM219Set/Fixture/unwrap_join_columns.php.inc b/tests/Set/DoctrineORM219Set/Fixture/unwrap_join_columns.php.inc deleted file mode 100644 index a37d62c5..00000000 --- a/tests/Set/DoctrineORM219Set/Fixture/unwrap_join_columns.php.inc +++ /dev/null @@ -1,33 +0,0 @@ - ------ - diff --git a/tests/Set/DoctrineORM219Set/FixturePhp81/decouple_join_columns.php.inc b/tests/Set/DoctrineORM219Set/FixturePhp81/decouple_join_columns.php.inc deleted file mode 100644 index abdc7596..00000000 --- a/tests/Set/DoctrineORM219Set/FixturePhp81/decouple_join_columns.php.inc +++ /dev/null @@ -1,33 +0,0 @@ - ------ - diff --git a/tests/Set/DoctrineORM219Set/FixturePhp81/overrides.php.inc b/tests/Set/DoctrineORM219Set/FixturePhp81/overrides.php.inc deleted file mode 100644 index 7083647f..00000000 --- a/tests/Set/DoctrineORM219Set/FixturePhp81/overrides.php.inc +++ /dev/null @@ -1,37 +0,0 @@ - ------ - diff --git a/tests/Set/DoctrineORM219Set/FixturePhp81/table_and_nested_index.php.inc b/tests/Set/DoctrineORM219Set/FixturePhp81/table_and_nested_index.php.inc deleted file mode 100644 index e8b1111b..00000000 --- a/tests/Set/DoctrineORM219Set/FixturePhp81/table_and_nested_index.php.inc +++ /dev/null @@ -1,33 +0,0 @@ - ------ - diff --git a/tests/Set/DoctrineORM219Set/Php81NestedAttributesTest.php b/tests/Set/DoctrineORM219Set/Php81NestedAttributesTest.php deleted file mode 100644 index 414e42c8..00000000 --- a/tests/Set/DoctrineORM219Set/Php81NestedAttributesTest.php +++ /dev/null @@ -1,36 +0,0 @@ -doTestFile($filePath); - } - - public static function provideData(): Iterator - { - return self::yieldFilesFromDirectory(__DIR__ . '/FixturePhp81'); - } - - public function provideConfigFilePath(): string - { - return __DIR__ . '/config/php81_nested_attributes.php'; - } - - /** - * The composer-based set rules are bound to the Doctrine package versions in this "composer.json" - */ - protected function provideComposerJsonFilePath(): string - { - return __DIR__ . '/config/composer.json'; - } -} diff --git a/tests/Set/DoctrineORM219Set/config/composer.json b/tests/Set/DoctrineORM219Set/config/composer.json deleted file mode 100644 index 78cf0a84..00000000 --- a/tests/Set/DoctrineORM219Set/config/composer.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "require": { - "doctrine/orm": "^2.19" - } -} diff --git a/tests/Set/DoctrineORM219Set/config/configured_set.php b/tests/Set/DoctrineORM219Set/config/configured_set.php deleted file mode 100644 index fccd966c..00000000 --- a/tests/Set/DoctrineORM219Set/config/configured_set.php +++ /dev/null @@ -1,12 +0,0 @@ -sets([__DIR__ . '/../../../../config/sets/composer-based.php']); - - $rectorConfig->phpVersion(PhpVersionFeature::NEW_INITIALIZERS - 1); -}; diff --git a/tests/Set/DoctrineORM219Set/config/php81_nested_attributes.php b/tests/Set/DoctrineORM219Set/config/php81_nested_attributes.php deleted file mode 100644 index 6ba50c3e..00000000 --- a/tests/Set/DoctrineORM219Set/config/php81_nested_attributes.php +++ /dev/null @@ -1,12 +0,0 @@ -sets([__DIR__ . '/../../../../config/sets/composer-based.php']); - - $rectorConfig->phpVersion(PhpVersionFeature::NEW_INITIALIZERS); -};