Skip to content

Commit

Permalink
Merge pull request #8202 from samsonasik/rector-fix-dep-phpdocinfo
Browse files Browse the repository at this point in the history
[Rector] Fix deprecated dynamic pull phpDocInfoFactory from AbstractRector on UnderscoreToCamelCaseVariableNameRector
  • Loading branch information
samsonasik authored Nov 13, 2023
2 parents 2118d11 + aed2800 commit a5ddb5e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utils/Rector/UnderscoreToCamelCaseVariableNameRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Function_;
use PhpParser\Node\Stmt\Namespace_;
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory;
use Rector\Core\Php\ReservedKeywordAnalyzer;
use Rector\Core\PhpParser\Node\CustomNode\FileWithoutNamespace;
use Rector\Core\Rector\AbstractRector;
Expand All @@ -39,12 +40,15 @@ final class UnderscoreToCamelCaseVariableNameRector extends AbstractRector
private const PARAM_NAME_REGEX = '#(?<paramPrefix>@param\s.*\s+\$)(?<paramName>%s)#ms';

private ReservedKeywordAnalyzer $reservedKeywordAnalyzer;
private PhpDocInfoFactory $phpDocInfoFactory;
private bool $hasChanged = false;

public function __construct(
ReservedKeywordAnalyzer $reservedKeywordAnalyzer
ReservedKeywordAnalyzer $reservedKeywordAnalyzer,
PhpDocInfoFactory $phpDocInfoFactory
) {
$this->reservedKeywordAnalyzer = $reservedKeywordAnalyzer;
$this->phpDocInfoFactory = $phpDocInfoFactory;
}

public function getRuleDefinition(): RuleDefinition
Expand Down

0 comments on commit a5ddb5e

Please sign in to comment.