From 597f0a4a2b7cdeb137e1c0b84d330790da0d8558 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Fri, 31 Jul 2026 18:54:38 +0200 Subject: [PATCH] [depre] Remove deprecated AssertPropertyExistsRector The rule was already deprecated and threw on refactor(), as the assertClassHasAttribute() method it produced was removed in PHPUnit 10. It had no tests and was not part of any set. --- .../MethodCall/AssertPropertyExistsRector.php | 58 ------------------- 1 file changed, 58 deletions(-) delete mode 100644 rules/CodeQuality/Rector/MethodCall/AssertPropertyExistsRector.php diff --git a/rules/CodeQuality/Rector/MethodCall/AssertPropertyExistsRector.php b/rules/CodeQuality/Rector/MethodCall/AssertPropertyExistsRector.php deleted file mode 100644 index 2d75835b..00000000 --- a/rules/CodeQuality/Rector/MethodCall/AssertPropertyExistsRector.php +++ /dev/null @@ -1,58 +0,0 @@ -assertFalse(property_exists(new Class, "property")); -$this->assertTrue(property_exists(new Class, "property")); -CODE_SAMPLE - , - <<<'CODE_SAMPLE' -$this->assertClassHasAttribute("property", "Class"); -$this->assertClassNotHasAttribute("property", "Class"); -CODE_SAMPLE - ), - ] - ); - } - - /** - * @return array> - */ - public function getNodeTypes(): array - { - return [MethodCall::class, StaticCall::class]; - } - - /** - * @param MethodCall|StaticCall $node - */ - public function refactor(Node $node): ?Node - { - throw new ShouldNotHappenException(sprintf( - '"%s" rule is deprecated as the attribute exists assert method was removed in PHPUnit 10.', - self::class - )); - } -}