Skip to content

Commit e292437

Browse files
committed
Updated Rector to commit 78431af5710d3c01436a446344d017e4b8004df3
rectorphp/rector-src@78431af chore: Add fixture for replacing simple tag by an attribute (#6777)
1 parent 86dd771 commit e292437

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

rules/Php80/Rector/Class_/AnnotationToAttributeRector.php

+8-4
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,11 @@ public function refactor(Node $node) : ?Node
154154
return null;
155155
}
156156
$uses = $this->useImportsResolver->resolveBareUses();
157-
// 1. bare tags without annotation class, e.g. "@require"
158-
$genericAttributeGroups = $this->processGenericTags($phpDocInfo);
159-
// 2. Doctrine annotation classes
157+
// 1. Doctrine annotation classes
160158
$annotationAttributeGroups = $this->processDoctrineAnnotationClasses($phpDocInfo, $uses);
161-
$attributeGroups = \array_merge($genericAttributeGroups, $annotationAttributeGroups);
159+
// 2. bare tags without annotation class, e.g. "@require"
160+
$genericAttributeGroups = $this->processGenericTags($phpDocInfo);
161+
$attributeGroups = \array_merge($annotationAttributeGroups, $genericAttributeGroups);
162162
if ($attributeGroups === []) {
163163
return null;
164164
}
@@ -243,6 +243,10 @@ private function processDoctrineAnnotationClasses(PhpDocInfo $phpDocInfo, array
243243
if (!$annotationToAttribute instanceof AnnotationToAttribute) {
244244
continue;
245245
}
246+
if ($annotationToAttribute->getUseValueAsAttributeArgument()) {
247+
/* Will be processed by processGenericTags instead */
248+
continue;
249+
}
246250
// make sure the attribute class really exists to avoid error on early upgrade
247251
if (!$this->reflectionProvider->hasClass($annotationToAttribute->getAttributeClass())) {
248252
continue;

src/Application/VersionResolver.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = '78c7d79c4f63e046fc8d0af49315f47d380ac33f';
22+
public const PACKAGE_VERSION = '78431af5710d3c01436a446344d017e4b8004df3';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2025-03-17 11:30:00';
27+
public const RELEASE_DATE = '2025-03-19 04:56:30';
2828
/**
2929
* @var int
3030
*/

0 commit comments

Comments
 (0)