From b3d889cf792113f9d063e37565701ee73e42b304 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Mon, 16 Nov 2026 17:59:01 +0100 Subject: [PATCH] [Php84] Remove 2 deprecated rules --- ...dAnnotationToDeprecatedAttributeRector.php | 67 ---------------- .../Rector/Class_/PropertyHookRector.php | 78 ------------------- 2 files changed, 145 deletions(-) delete mode 100644 rules/Php84/Rector/Class_/DeprecatedAnnotationToDeprecatedAttributeRector.php delete mode 100644 rules/Php84/Rector/Class_/PropertyHookRector.php diff --git a/rules/Php84/Rector/Class_/DeprecatedAnnotationToDeprecatedAttributeRector.php b/rules/Php84/Rector/Class_/DeprecatedAnnotationToDeprecatedAttributeRector.php deleted file mode 100644 index 44b84f6ae42..00000000000 --- a/rules/Php84/Rector/Class_/DeprecatedAnnotationToDeprecatedAttributeRector.php +++ /dev/null @@ -1,67 +0,0 @@ -name; - } - - public function setName(string $name): void - { - $this->name = ucfirst($name); - } -} -CODE_SAMPLE - , - <<<'CODE_SAMPLE' -final class Product -{ - public string $name - { - get => $this->name; - set($value) => $this->name = ucfirst($value); - } -} - -CODE_SAMPLE - ), - ]); - } - - public function getNodeTypes(): array - { - return [Class_::class]; - } - - /** - * @param Class_ $node - */ - public function refactor(Node $node): ?Node - { - throw new ShouldNotHappenException(sprintf( - '"%s" rule is deprecated, as property hooks are a matter of preference. They provide no upgrade value and make the code harder to read', - self::class - )); - } - - public function provideMinPhpVersion(): int - { - return PhpVersion::PHP_84; - } -}