Skip to content

Commit 711df60

Browse files
committed
Updated Rector to commit fbc3df902d3599e7c3e6f9e6bf6829516ceb3523
rectorphp/rector-src@fbc3df9 skip to many in /TypedPropertyFromJMSSerializerAttributeTypeRector (#7598)
1 parent 9dd5cab commit 711df60

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

rules/TypeDeclaration/Rector/Class_/TypedPropertyFromJMSSerializerAttributeTypeRector.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use PHPStan\Type\MixedType;
1515
use PHPStan\Type\ObjectType;
1616
use PHPStan\Type\Type;
17+
use Rector\Doctrine\CodeQuality\Enum\CollectionMapping;
1718
use Rector\Enum\ClassName;
1819
use Rector\Php74\Guard\MakePropertyTypedGuard;
1920
use Rector\Php80\NodeAnalyzer\PhpAttributeAnalyzer;
@@ -121,6 +122,10 @@ public function refactor(Node $node): ?Node
121122
if (!$this->phpAttributeAnalyzer->hasPhpAttribute($property, ClassName::JMS_TYPE)) {
122123
continue;
123124
}
125+
// this will be most likely collection, not single type
126+
if ($this->phpAttributeAnalyzer->hasPhpAttributes($property, CollectionMapping::TO_MANY_CLASSES)) {
127+
continue;
128+
}
124129
if (!$classReflection instanceof ClassReflection) {
125130
$classReflection = $this->reflectionResolver->resolveClassReflection($node);
126131
}

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
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 = '77a3e75fb3eb5d8dcd3a2cb5de27e9786c6abf72';
22+
public const PACKAGE_VERSION = 'fbc3df902d3599e7c3e6f9e6bf6829516ceb3523';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2025-10-28 11:41:27';
27+
public const RELEASE_DATE = '2025-10-28 14:22:36';
2828
/**
2929
* @var int
3030
*/

0 commit comments

Comments
 (0)