mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-05 02:40:50 +00:00
Updated Rector to commit a4f28525c9df28ed142eabe1cde70035715fa785
a4f28525c9
[Transform] Allow transform bootstrapFiles() to withBootstrapFiles() on RectorConfigBuilderRector (#5633)
This commit is contained in:
parent
abeac2bdf6
commit
2f5015d654
|
@ -75,6 +75,7 @@ CODE_SAMPLE
|
|||
$paths = new Array_();
|
||||
$skips = new Array_();
|
||||
$autoloadPaths = new Array_();
|
||||
$bootstrapFiles = new Array_();
|
||||
foreach ($stmts as $rectorConfigStmt) {
|
||||
// complex stmts should be skipped, eg: with if else
|
||||
if (!$rectorConfigStmt instanceof Expression) {
|
||||
|
@ -111,6 +112,9 @@ CODE_SAMPLE
|
|||
} elseif ($name === 'autoloadPaths') {
|
||||
Assert::isAOf($value, Array_::class);
|
||||
$autoloadPaths = $value;
|
||||
} elseif ($name === 'bootstrapFiles') {
|
||||
Assert::isAOf($value, Array_::class);
|
||||
$bootstrapFiles = $value;
|
||||
} else {
|
||||
// implementing method by method
|
||||
return null;
|
||||
|
@ -132,6 +136,10 @@ CODE_SAMPLE
|
|||
$newExpr = $this->nodeFactory->createMethodCall($newExpr, 'withAutoloadPaths', [$autoloadPaths]);
|
||||
$hasChanged = \true;
|
||||
}
|
||||
if ($bootstrapFiles->items !== []) {
|
||||
$newExpr = $this->nodeFactory->createMethodCall($newExpr, 'withBootstrapFiles', [$bootstrapFiles]);
|
||||
$hasChanged = \true;
|
||||
}
|
||||
if ($hasChanged) {
|
||||
$stmt->expr = $newExpr;
|
||||
}
|
||||
|
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '85aba8e39f1fdf533680074accd34ab2c1ad8fc4';
|
||||
public const PACKAGE_VERSION = 'a4f28525c9df28ed142eabe1cde70035715fa785';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2024-02-18 00:26:16';
|
||||
public const RELEASE_DATE = '2024-02-18 07:31:15';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user