Skip to content

Commit caba1a0

Browse files
authored
Completely remove __get() method on AbstractRector (#5245)
1 parent 61d68c8 commit caba1a0

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

src/Rector/AbstractRector.php

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -71,35 +71,6 @@ abstract class AbstractRector extends NodeVisitorAbstract implements RectorInter
7171

7272
private ?int $toBeRemovedNodeId = null;
7373

74-
/**
75-
* @var array<string, object>
76-
*/
77-
private array $deprecatedDependencies = [];
78-
79-
/**
80-
* @var array<class-string, array<string, bool>>
81-
*/
82-
private array $cachedDeprecatedDependenciesWarning = [];
83-
84-
/**
85-
* Handle deprecated dependencies compatbility
86-
*/
87-
public function __get(string $name): mixed
88-
{
89-
if (! isset($this->cachedDeprecatedDependenciesWarning[static::class][$name])) {
90-
echo sprintf(
91-
'Get %s property from AbstractRector on %s is deprecated, inject via __construct() instead',
92-
$name,
93-
static::class
94-
);
95-
echo PHP_EOL;
96-
97-
$this->cachedDeprecatedDependenciesWarning[static::class][$name] = true;
98-
}
99-
100-
return $this->deprecatedDependencies[$name] ?? null;
101-
}
102-
10374
public function autowire(
10475
NodeNameResolver $nodeNameResolver,
10576
NodeTypeResolver $nodeTypeResolver,

0 commit comments

Comments
 (0)