Skip to content

Commit 04130f7

Browse files
committed
Updated Rector to commit cc5d6f984ffddd44fd000860acb21c2245f3b52e
1 parent a7f993e commit 04130f7

15 files changed

Lines changed: 187 additions & 9 deletions

File tree

src/Config/RectorConfig.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,13 +361,15 @@ public function containerCacheDirectory(string $directoryPath): void
361361
}
362362
/**
363363
* @param class-string<CacheStorageInterface> $cacheClass
364+
* @deprecated Cache storage is selected automatically: file cache locally, in-memory cache in CI, where the ephemeral workspace makes writing a cache that is never re-read wasted IO. The passed value is ignored.
364365
*/
365366
public function cacheClass(string $cacheClass): void
366367
{
367368
Assert::isAOf($cacheClass, CacheStorageInterface::class);
368369
}
369370
/**
370371
* @param class-string $cacheMetaExtensionClass
372+
* @deprecated Niche mechanism, no longer applied. Let Rector handle cache on its own. If custom invalidation is needed, handle it in CI in a more generic way, e.g. by clearing the cache directory.
371373
*/
372374
public function cacheMetaExtension(string $cacheMetaExtensionClass): void
373375
{

src/Configuration/RectorConfigBuilder.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,38 +403,65 @@ public function withPhpSets(
403403
$this->isPhpSetsVersionPicked = \true;
404404
return $this->addPhpLevelSets($pickedPhpVersions[0]);
405405
}
406+
/**
407+
* @deprecated Use "withPhpLevel()" instead, it raises PHP level one rule at a time.
408+
*/
406409
public function withPhp53Sets(): self
407410
{
408411
return $this->reportDeprecatedPhpSetsMethod(__FUNCTION__);
409412
}
413+
/**
414+
* @deprecated Use "withPhpLevel()" instead, it raises PHP level one rule at a time.
415+
*/
410416
public function withPhp54Sets(): self
411417
{
412418
return $this->reportDeprecatedPhpSetsMethod(__FUNCTION__);
413419
}
420+
/**
421+
* @deprecated Use "withPhpLevel()" instead, it raises PHP level one rule at a time.
422+
*/
414423
public function withPhp55Sets(): self
415424
{
416425
return $this->reportDeprecatedPhpSetsMethod(__FUNCTION__);
417426
}
427+
/**
428+
* @deprecated Use "withPhpLevel()" instead, it raises PHP level one rule at a time.
429+
*/
418430
public function withPhp56Sets(): self
419431
{
420432
return $this->reportDeprecatedPhpSetsMethod(__FUNCTION__);
421433
}
434+
/**
435+
* @deprecated Use "withPhpLevel()" instead, it raises PHP level one rule at a time.
436+
*/
422437
public function withPhp70Sets(): self
423438
{
424439
return $this->reportDeprecatedPhpSetsMethod(__FUNCTION__);
425440
}
441+
/**
442+
* @deprecated Use "withPhpLevel()" instead, it raises PHP level one rule at a time.
443+
*/
426444
public function withPhp71Sets(): self
427445
{
428446
return $this->reportDeprecatedPhpSetsMethod(__FUNCTION__);
429447
}
448+
/**
449+
* @deprecated Use "withPhpLevel()" instead, it raises PHP level one rule at a time.
450+
*/
430451
public function withPhp72Sets(): self
431452
{
432453
return $this->reportDeprecatedPhpSetsMethod(__FUNCTION__);
433454
}
455+
/**
456+
* @deprecated Use "withPhpLevel()" instead, it raises PHP level one rule at a time.
457+
*/
434458
public function withPhp73Sets(): self
435459
{
436460
return $this->reportDeprecatedPhpSetsMethod(__FUNCTION__);
437461
}
462+
/**
463+
* @deprecated Use "withPhpLevel()" instead, it raises PHP level one rule at a time.
464+
*/
438465
public function withPhp74Sets(): self
439466
{
440467
return $this->reportDeprecatedPhpSetsMethod(__FUNCTION__);
@@ -523,6 +550,7 @@ public function withCache(?string $cacheDirectory = null, ?string $cacheClass =
523550
/**
524551
* @param class-string $cacheMetaExtensionClass
525552
* @deprecated Niche mechanism, no longer applied. Let Rector handle cache on its own.
553+
* @deprecated Niche mechanism, no longer applied. Let Rector handle cache on its own. If custom invalidation is needed, handle it in CI in a more generic way, e.g. by clearing the cache directory.
526554
*/
527555
public function withCacheMetaExtension(string $cacheMetaExtensionClass): self
528556
{

src/PostRector/Collector/UseNodesToAddCollector.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public function __construct(CurrentFileProvider $currentFileProvider)
7474
}
7575
/**
7676
* @api
77+
* @deprecated Use $file->getFileNode()->getPendingImports()->addUseImport($type) instead.
7778
*/
7879
public function addUseImport(FullyQualifiedObjectType $fullyQualifiedObjectType): void
7980
{
@@ -86,6 +87,7 @@ public function addUseImport(FullyQualifiedObjectType $fullyQualifiedObjectType)
8687
}
8788
/**
8889
* @api
90+
* @deprecated Use $file->getFileNode()->getPendingImports()->addConstantUseImport($type) instead.
8991
*/
9092
public function addConstantUseImport(FullyQualifiedObjectType $fullyQualifiedObjectType): void
9193
{
@@ -98,6 +100,7 @@ public function addConstantUseImport(FullyQualifiedObjectType $fullyQualifiedObj
98100
}
99101
/**
100102
* @api
103+
* @deprecated Use $file->getFileNode()->getPendingImports()->addFunctionUseImport($type) instead.
101104
*/
102105
public function addFunctionUseImport(FullyQualifiedObjectType $fullyQualifiedObjectType): void
103106
{
@@ -112,6 +115,7 @@ public function addFunctionUseImport(FullyQualifiedObjectType $fullyQualifiedObj
112115
* @api
113116
*
114117
* @return array<AliasedObjectType|FullyQualifiedObjectType>
118+
* @deprecated Use $file->getFileNode()->resolveUsedImportTypes() instead.
115119
*/
116120
public function getUseImportTypesByNode(File $file): array
117121
{
@@ -124,6 +128,7 @@ public function getUseImportTypesByNode(File $file): array
124128
}
125129
/**
126130
* @api
131+
* @deprecated Use $file->getFileNode()->hasImport($type) instead.
127132
*/
128133
public function hasImport(File $file, FullyQualifiedObjectType $fullyQualifiedObjectType): bool
129134
{
@@ -136,6 +141,7 @@ public function hasImport(File $file, FullyQualifiedObjectType $fullyQualifiedOb
136141
}
137142
/**
138143
* @api
144+
* @deprecated Use $file->getFileNode()->getPendingImports()->isShortImported($type) instead.
139145
*/
140146
public function isShortImported(File $file, FullyQualifiedObjectType $fullyQualifiedObjectType): bool
141147
{
@@ -148,6 +154,7 @@ public function isShortImported(File $file, FullyQualifiedObjectType $fullyQuali
148154
}
149155
/**
150156
* @api
157+
* @deprecated Use $file->getFileNode()->getPendingImports()->isImportShortable($type) instead.
151158
*/
152159
public function isImportShortable(File $file, FullyQualifiedObjectType $fullyQualifiedObjectType): bool
153160
{
@@ -162,6 +169,7 @@ public function isImportShortable(File $file, FullyQualifiedObjectType $fullyQua
162169
* @api
163170
*
164171
* @return FullyQualifiedObjectType[]
172+
* @deprecated Use $file->getFileNode()->getPendingImports()->getUseImports() instead.
165173
*/
166174
public function getObjectImportsByFilePath(string $filePath): array
167175
{
@@ -176,6 +184,7 @@ public function getObjectImportsByFilePath(string $filePath): array
176184
* @api
177185
*
178186
* @return FullyQualifiedObjectType[]
187+
* @deprecated Use $file->getFileNode()->getPendingImports()->getConstantImports() instead.
179188
*/
180189
public function getConstantImportsByFilePath(string $filePath): array
181190
{
@@ -190,6 +199,7 @@ public function getConstantImportsByFilePath(string $filePath): array
190199
* @api
191200
*
192201
* @return FullyQualifiedObjectType[]
202+
* @deprecated Use $file->getFileNode()->getPendingImports()->getFunctionImports() instead.
193203
*/
194204
public function getFunctionImportsByFilePath(string $filePath): array
195205
{

src/Rector/AbstractRector.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ final public function enterNode(Node $node)
151151
return $this->postRefactorProcess($originalNode, $node, $refactoredNodeOrState, $filePath);
152152
}
153153
/**
154+
* @deprecated no longer used
154155
* @return mixed[]|int|\PhpParser\Node|null
155156
*/
156157
final public function leaveNode(Node $node)

vendor/composer/autoload_classmap.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,6 +1559,7 @@
15591559
'Rector\\DowngradePhp83\\Rector\\ClassConst\\DowngradeTypedClassConstRector' => $vendorDir . '/rector/rector-downgrade-php/rules/DowngradePhp83/Rector/ClassConst/DowngradeTypedClassConstRector.php',
15601560
'Rector\\DowngradePhp83\\Rector\\Class_\\DowngradeReadonlyAnonymousClassRector' => $vendorDir . '/rector/rector-downgrade-php/rules/DowngradePhp83/Rector/Class_/DowngradeReadonlyAnonymousClassRector.php',
15611561
'Rector\\DowngradePhp83\\Rector\\FuncCall\\DowngradeJsonValidateRector' => $vendorDir . '/rector/rector-downgrade-php/rules/DowngradePhp83/Rector/FuncCall/DowngradeJsonValidateRector.php',
1562+
'Rector\\DowngradePhp84\\Rector\\ClassMethod\\DowngradeDeprecatedAttributeRector' => $vendorDir . '/rector/rector-downgrade-php/rules/DowngradePhp84/Rector/ClassMethod/DowngradeDeprecatedAttributeRector.php',
15621563
'Rector\\DowngradePhp84\\Rector\\Expression\\DowngradeArrayAllRector' => $vendorDir . '/rector/rector-downgrade-php/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAllRector.php',
15631564
'Rector\\DowngradePhp84\\Rector\\Expression\\DowngradeArrayAnyRector' => $vendorDir . '/rector/rector-downgrade-php/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAnyRector.php',
15641565
'Rector\\DowngradePhp84\\Rector\\Expression\\DowngradeArrayFindKeyRector' => $vendorDir . '/rector/rector-downgrade-php/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindKeyRector.php',

vendor/composer/autoload_static.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,6 +1779,7 @@ class ComposerStaticInit8ff5fa6d507c0b027d31ec29ebff1b97
17791779
'Rector\\DowngradePhp83\\Rector\\ClassConst\\DowngradeTypedClassConstRector' => __DIR__ . '/..' . '/rector/rector-downgrade-php/rules/DowngradePhp83/Rector/ClassConst/DowngradeTypedClassConstRector.php',
17801780
'Rector\\DowngradePhp83\\Rector\\Class_\\DowngradeReadonlyAnonymousClassRector' => __DIR__ . '/..' . '/rector/rector-downgrade-php/rules/DowngradePhp83/Rector/Class_/DowngradeReadonlyAnonymousClassRector.php',
17811781
'Rector\\DowngradePhp83\\Rector\\FuncCall\\DowngradeJsonValidateRector' => __DIR__ . '/..' . '/rector/rector-downgrade-php/rules/DowngradePhp83/Rector/FuncCall/DowngradeJsonValidateRector.php',
1782+
'Rector\\DowngradePhp84\\Rector\\ClassMethod\\DowngradeDeprecatedAttributeRector' => __DIR__ . '/..' . '/rector/rector-downgrade-php/rules/DowngradePhp84/Rector/ClassMethod/DowngradeDeprecatedAttributeRector.php',
17821783
'Rector\\DowngradePhp84\\Rector\\Expression\\DowngradeArrayAllRector' => __DIR__ . '/..' . '/rector/rector-downgrade-php/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAllRector.php',
17831784
'Rector\\DowngradePhp84\\Rector\\Expression\\DowngradeArrayAnyRector' => __DIR__ . '/..' . '/rector/rector-downgrade-php/rules/DowngradePhp84/Rector/Expression/DowngradeArrayAnyRector.php',
17841785
'Rector\\DowngradePhp84\\Rector\\Expression\\DowngradeArrayFindKeyRector' => __DIR__ . '/..' . '/rector/rector-downgrade-php/rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindKeyRector.php',

vendor/composer/installed.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1613,12 +1613,12 @@
16131613
"source": {
16141614
"type": "git",
16151615
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
1616-
"reference": "a3ba7ce6033e90ed2a0cd56ebc4812315369f701"
1616+
"reference": "3b4122f384147f6d40adf588487d983e160b50e6"
16171617
},
16181618
"dist": {
16191619
"type": "zip",
1620-
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/a3ba7ce6033e90ed2a0cd56ebc4812315369f701",
1621-
"reference": "a3ba7ce6033e90ed2a0cd56ebc4812315369f701",
1620+
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/3b4122f384147f6d40adf588487d983e160b50e6",
1621+
"reference": "3b4122f384147f6d40adf588487d983e160b50e6",
16221622
"shasum": ""
16231623
},
16241624
"require": {
@@ -1642,7 +1642,7 @@
16421642
"tomasvotruba\/unused-public": "^2.2",
16431643
"tracy\/tracy": "^2.12"
16441644
},
1645-
"time": "2026-08-29T17:48:26+00:00",
1645+
"time": "2026-08-29T23:14:25+00:00",
16461646
"default-branch": true,
16471647
"type": "rector-extension",
16481648
"installation-source": "dist",

0 commit comments

Comments
 (0)