Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions src/Rector/AbstractRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,35 +71,6 @@ abstract class AbstractRector extends NodeVisitorAbstract implements RectorInter

private ?int $toBeRemovedNodeId = null;

/**
* @var array<string, object>
*/
private array $deprecatedDependencies = [];

/**
* @var array<class-string, array<string, bool>>
*/
private array $cachedDeprecatedDependenciesWarning = [];

/**
* Handle deprecated dependencies compatbility
*/
public function __get(string $name): mixed
{
if (! isset($this->cachedDeprecatedDependenciesWarning[static::class][$name])) {
echo sprintf(
'Get %s property from AbstractRector on %s is deprecated, inject via __construct() instead',
$name,
static::class
);
echo PHP_EOL;

$this->cachedDeprecatedDependenciesWarning[static::class][$name] = true;
}

return $this->deprecatedDependencies[$name] ?? null;
}

public function autowire(
NodeNameResolver $nodeNameResolver,
NodeTypeResolver $nodeTypeResolver,
Expand Down