Updated Rector to commit f4070bb2b2f5c8f7a11063ce35549364c437a9cf

f4070bb2b2 Fix ChildDoctrineRepositoryClassTypeRector for generic type (#5746)
This commit is contained in:
Tomas Votruba 2024-03-21 09:55:11 +00:00
parent b38b8f3e85
commit 817ab2f7cb
3 changed files with 17 additions and 2 deletions

View File

@ -155,6 +155,10 @@ CODE_SAMPLE
if (!$entityGenericType instanceof IdentifierTypeNode) {
return null;
}
// skip if value is used in generics
if (\in_array($entityGenericType->name, $classPhpDocInfo->getTemplateNames(), \true)) {
return null;
}
return $entityGenericType->name;
}
private function containsMethodCallNamed(ClassMethod $classMethod, string $desiredMethodName) : bool

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '26890958bc539e9a2234f1457a81d37f5972bf79';
public const PACKAGE_VERSION = 'f4070bb2b2f5c8f7a11063ce35549364c437a9cf';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-03-20 14:19:00';
public const RELEASE_DATE = '2024-03-21 10:52:56';
/**
* @var int
*/

View File

@ -329,6 +329,17 @@ final class PhpDocInfo
}
return null;
}
/**
* @return string[]
*/
public function getTemplateNames() : array
{
$templateNames = [];
foreach ($this->phpDocNode->getTemplateTagValues() as $templateTagValueNode) {
$templateNames[] = $templateTagValueNode->name;
}
return $templateNames;
}
/**
* @return TemplateTagValueNode[]
*/