mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 22:08:00 +01:00
Updated Rector to commit df8d2b78edd46542e6426fec606c3ea98d712532
df8d2b78ed
Copy subtype phpdoc on ClassPropertyAssignToConstructorPromotionRector (#8438) (#5603)
This commit is contained in:
parent
1d69b60457
commit
12e1b38e32
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
@ -1679,12 +1679,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/rectorphp\/rector-doctrine.git",
|
||||
"reference": "103f50de2efa5f5f4052b1fb7c39bfd08326cd6d"
|
||||
"reference": "95876d8299ccb731dd2bdce5bcf197a3ddf2cedb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-doctrine\/zipball\/103f50de2efa5f5f4052b1fb7c39bfd08326cd6d",
|
||||
"reference": "103f50de2efa5f5f4052b1fb7c39bfd08326cd6d",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-doctrine\/zipball\/95876d8299ccb731dd2bdce5bcf197a3ddf2cedb",
|
||||
"reference": "95876d8299ccb731dd2bdce5bcf197a3ddf2cedb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1708,7 +1708,7 @@
|
||||
"tomasvotruba\/unused-public": "^0.3",
|
||||
"tracy\/tracy": "^2.10"
|
||||
},
|
||||
"time": "2024-02-11T21:28:40+00:00",
|
||||
"time": "2024-02-11T23:31:10+00:00",
|
||||
"default-branch": true,
|
||||
"type": "rector-extension",
|
||||
"extra": {
|
||||
|
2
vendor/composer/installed.php
vendored
2
vendor/composer/installed.php
vendored
File diff suppressed because one or more lines are too long
@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
|
||||
*/
|
||||
final class GeneratedConfig
|
||||
{
|
||||
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main 103f50d'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main 8d1aab2'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main f091938'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main 5a62f17'));
|
||||
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main 95876d8'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main 8d1aab2'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main f091938'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main 5a62f17'));
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
@ -38,6 +38,10 @@ final class InheritanceClassAnnotationTransformer implements ClassAnnotationTran
|
||||
$this->addDiscriminatorMap($classMapping['discriminatorMap'], $classPhpDocInfo);
|
||||
}
|
||||
}
|
||||
public function getClassName() : string
|
||||
{
|
||||
return 'Doctrine\\ORM\\Mapping\\DiscriminatorMap';
|
||||
}
|
||||
/**
|
||||
* @param array<string, mixed> $discriminatorColumn
|
||||
*/
|
||||
@ -54,7 +58,7 @@ final class InheritanceClassAnnotationTransformer implements ClassAnnotationTran
|
||||
{
|
||||
$arrayItemNodes = $this->arrayItemNodeFactory->create($discriminatorMap, [ArrayItemNodeFactory::QUOTE_ALL]);
|
||||
$curlyListNode = new CurlyListNode($arrayItemNodes);
|
||||
$spacelessPhpDocTagNode = DocTagNodeFactory::createSpacelessPhpDocTagNode([$curlyListNode], 'Doctrine\\ORM\\Mapping\\DiscriminatorMap');
|
||||
$spacelessPhpDocTagNode = DocTagNodeFactory::createSpacelessPhpDocTagNode([$curlyListNode], $this->getClassName());
|
||||
$classPhpDocInfo->addPhpDocTagNode($spacelessPhpDocTagNode);
|
||||
}
|
||||
}
|
||||
|
@ -51,6 +51,10 @@ final class YamlToAnnotationTransformer
|
||||
{
|
||||
$classPhpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($class);
|
||||
foreach ($this->classAnnotationTransformers as $classAnnotationTransformer) {
|
||||
// already added
|
||||
if ($classPhpDocInfo->hasByAnnotationClass($classAnnotationTransformer->getClassName())) {
|
||||
continue;
|
||||
}
|
||||
$classAnnotationTransformer->transform($entityMapping, $classPhpDocInfo);
|
||||
}
|
||||
$this->docBlockUpdater->updateRefactoredNodeWithPhpDocInfo($class);
|
||||
@ -60,6 +64,10 @@ final class YamlToAnnotationTransformer
|
||||
foreach ($class->getProperties() as $property) {
|
||||
$propertyPhpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($property);
|
||||
foreach ($this->propertyAnnotationTransformers as $propertyAnnotationTransformer) {
|
||||
// already added
|
||||
if ($propertyPhpDocInfo->hasByAnnotationClass($propertyAnnotationTransformer->getClassName())) {
|
||||
continue;
|
||||
}
|
||||
$propertyAnnotationTransformer->transform($entityMapping, $propertyPhpDocInfo, $property);
|
||||
}
|
||||
$this->docBlockUpdater->updateRefactoredNodeWithPhpDocInfo($property);
|
||||
|
@ -7,5 +7,6 @@ use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo;
|
||||
use Rector\Doctrine\CodeQuality\ValueObject\EntityMapping;
|
||||
interface ClassAnnotationTransformerInterface
|
||||
{
|
||||
public function getClassName() : string;
|
||||
public function transform(EntityMapping $entityMapping, PhpDocInfo $propertyPhpDocInfo) : void;
|
||||
}
|
||||
|
@ -8,5 +8,6 @@ use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo;
|
||||
use Rector\Doctrine\CodeQuality\ValueObject\EntityMapping;
|
||||
interface PropertyAnnotationTransformerInterface
|
||||
{
|
||||
public function getClassName() : string;
|
||||
public function transform(EntityMapping $entityMapping, PhpDocInfo $propertyPhpDocInfo, Property $property) : void;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user