Skip to content

Commit 68b0466

Browse files
committed
Updated Rector to commit 00da8f36d1fd115d6e5893782bf0299a7c978732
rectorphp/rector-src@00da8f3 [Test] Add test for crash after reprint Stmt (#6924)
1 parent 3da3dc9 commit 68b0466

7 files changed

Lines changed: 16 additions & 19 deletions

File tree

vendor/composer/installed.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,12 +1687,12 @@
16871687
"source": {
16881688
"type": "git",
16891689
"url": "https:\/\/github.com\/rectorphp\/rector-doctrine.git",
1690-
"reference": "1edeb03a451449543283866c96c06eeb011b4433"
1690+
"reference": "6be09e40af7af5bd06281ce33772a6b0f0f9a7a4"
16911691
},
16921692
"dist": {
16931693
"type": "zip",
1694-
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-doctrine\/zipball\/1edeb03a451449543283866c96c06eeb011b4433",
1695-
"reference": "1edeb03a451449543283866c96c06eeb011b4433",
1694+
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-doctrine\/zipball\/6be09e40af7af5bd06281ce33772a6b0f0f9a7a4",
1695+
"reference": "6be09e40af7af5bd06281ce33772a6b0f0f9a7a4",
16961696
"shasum": ""
16971697
},
16981698
"require": {
@@ -1715,7 +1715,7 @@
17151715
"tomasvotruba\/class-leak": "^2.0",
17161716
"tracy\/tracy": "^2.10"
17171717
},
1718-
"time": "2025-05-24T11:45:25+00:00",
1718+
"time": "2025-05-24T14:32:38+00:00",
17191719
"default-branch": true,
17201720
"type": "rector-extension",
17211721
"extra": {

vendor/composer/installed.php

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

vendor/rector/extension-installer/src/GeneratedConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
final class GeneratedConfig
1111
{
12-
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 1edeb03'), '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 9650da2'), '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 b430be2'), '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 3786ceb'));
12+
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 6be09e4'), '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 9650da2'), '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 b430be2'), '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 3786ceb'));
1313
private function __construct()
1414
{
1515
}

vendor/rector/rector-doctrine/rules/TypedCollections/Rector/ClassMethod/NarrowArrayCollectionToCollectionRector.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
declare (strict_types=1);
44
namespace Rector\Doctrine\TypedCollections\Rector\ClassMethod;
55

6-
use RectorPrefix202505\Doctrine\Common\Collections\ArrayCollection;
76
use PhpParser\Node;
87
use PhpParser\Node\Identifier;
98
use PhpParser\Node\Name;
@@ -140,7 +139,7 @@ private function refactorClassMethodNativeTypes(ClassMethod $classMethod) : bool
140139
return NodeVisitorAbstract::REMOVE_NODE;
141140
}
142141
}
143-
if ($node instanceof Name && $this->isName($node, ArrayCollection::class)) {
142+
if ($node instanceof Name && $this->isName($node, DoctrineClass::ARRAY_COLLECTION)) {
144143
$hasChanged = \true;
145144
if ($hasReturnCollectionType) {
146145
// we already have Collection, and can remove it
@@ -150,7 +149,7 @@ private function refactorClassMethodNativeTypes(ClassMethod $classMethod) : bool
150149
}
151150
return null;
152151
});
153-
if ($this->isName($classMethod->returnType, ArrayCollection::class)) {
152+
if ($this->isName($classMethod->returnType, DoctrineClass::ARRAY_COLLECTION)) {
154153
$classMethod->returnType = new FullyQualified(DoctrineClass::COLLECTION);
155154
$hasChanged = \true;
156155
}
@@ -191,15 +190,15 @@ private function processNativeType($paramOrProperty) : bool
191190
}
192191
$hasCollectionName = $this->hasCollectionName($paramOrProperty);
193192
$hasChanged = \false;
194-
if ($this->isName($paramOrProperty->type, ArrayCollection::class)) {
193+
if ($this->isName($paramOrProperty->type, DoctrineClass::ARRAY_COLLECTION)) {
195194
$paramOrProperty->type = new FullyQualified(DoctrineClass::COLLECTION);
196195
return \true;
197196
}
198197
$this->traverseNodesWithCallable($paramOrProperty->type, function (Node $node) use($hasCollectionName, &$hasChanged) {
199198
if (!$node instanceof Name) {
200199
return null;
201200
}
202-
if (!$this->isName($node, ArrayCollection::class)) {
201+
if (!$this->isName($node, DoctrineClass::ARRAY_COLLECTION)) {
203202
return null;
204203
}
205204
$hasChanged = \true;

vendor/rector/rector-doctrine/rules/TypedCollections/Rector/ClassMethod/ReturnArrayToNewArrayCollectionRector.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
declare (strict_types=1);
44
namespace Rector\Doctrine\TypedCollections\Rector\ClassMethod;
55

6-
use RectorPrefix202505\Doctrine\Common\Collections\ArrayCollection;
76
use PhpParser\Node;
87
use PhpParser\Node\Arg;
98
use PhpParser\Node\Expr;
@@ -82,7 +81,7 @@ public function refactor(Node $node) : ?ClassMethod
8281
if (!$exprType->isArray()->yes()) {
8382
return null;
8483
}
85-
$node->expr = new New_(new FullyQualified(ArrayCollection::class), [new Arg($node->expr)]);
84+
$node->expr = new New_(new FullyQualified(DoctrineClass::ARRAY_COLLECTION), [new Arg($node->expr)]);
8685
$hasChanged = \true;
8786
return $node;
8887
});

vendor/rector/rector-doctrine/rules/TypedCollections/Rector/Class_/DefaultNewArrayCollectionRector.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
declare (strict_types=1);
44
namespace Rector\Doctrine\TypedCollections\Rector\Class_;
55

6-
use RectorPrefix202505\Doctrine\Common\Collections\ArrayCollection;
7-
use RectorPrefix202505\Doctrine\Common\Collections\Collection;
86
use PhpParser\Modifiers;
97
use PhpParser\Node;
108
use PhpParser\Node\Expr\Assign;
@@ -16,6 +14,7 @@
1614
use PhpParser\Node\Stmt\ClassMethod;
1715
use PhpParser\Node\Stmt\Expression;
1816
use PHPStan\Type\ObjectType;
17+
use Rector\Doctrine\Enum\DoctrineClass;
1918
use Rector\NodeManipulator\ClassInsertManipulator;
2019
use Rector\PHPUnit\NodeAnalyzer\TestsNodeAnalyzer;
2120
use Rector\Rector\AbstractRector;
@@ -162,7 +161,7 @@ private function createDefaultPropertyAssigns(array $missingDefaultProperties) :
162161
$propertyDefaultAssigns = [];
163162
foreach ($missingDefaultProperties as $missingDefaultProperty) {
164163
$propertyFetch = new PropertyFetch(new Variable('this'), $missingDefaultProperty);
165-
$missingDefaultPropertyAssign = new Assign($propertyFetch, new New_(new FullyQualified(ArrayCollection::class)));
164+
$missingDefaultPropertyAssign = new Assign($propertyFetch, new New_(new FullyQualified(DoctrineClass::ARRAY_COLLECTION)));
166165
$propertyDefaultAssigns[] = new Expression($missingDefaultPropertyAssign);
167166
}
168167
return $propertyDefaultAssigns;
@@ -178,7 +177,7 @@ private function resolveCollectionPropertyNames(Class_ $class) : array
178177
if (!$propertyType instanceof ObjectType) {
179178
continue;
180179
}
181-
if ($propertyType->getClassName() !== Collection::class) {
180+
if ($propertyType->getClassName() !== DoctrineClass::COLLECTION) {
182181
continue;
183182
}
184183
$collectionPropertyNames[] = $this->getName($property);

vendor/rector/rector-doctrine/rules/TypedCollections/Rector/New_/RemoveNewArrayCollectionWrapRector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
declare (strict_types=1);
44
namespace Rector\Doctrine\TypedCollections\Rector\New_;
55

6-
use RectorPrefix202505\Doctrine\Common\Collections\ArrayCollection;
76
use PhpParser\Node;
87
use PhpParser\Node\Expr;
98
use PhpParser\Node\Expr\New_;
9+
use Rector\Doctrine\Enum\DoctrineClass;
1010
use Rector\Doctrine\TypedCollections\TypeAnalyzer\CollectionTypeDetector;
1111
use Rector\Rector\AbstractRector;
1212
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
@@ -67,7 +67,7 @@ public function refactor(Node $node) : ?Expr
6767
if ($node->isFirstClassCallable()) {
6868
return null;
6969
}
70-
if (!$this->isName($node->class, ArrayCollection::class)) {
70+
if (!$this->isName($node->class, DoctrineClass::ARRAY_COLLECTION)) {
7171
return null;
7272
}
7373
if ($node->getArgs() === []) {

0 commit comments

Comments
 (0)