mirror of https://github.com/rectorphp/rector.git
Updated Rector to commit 01c0ea9420b424bf1484c99dbb1185a0cd1c3e61
01c0ea9420
[Config] Remove asterisk support in import() for file, use explicit paths instead (#5010)
This commit is contained in:
parent
ba7988e3e0
commit
5272a66ce1
|
@ -7,7 +7,7 @@ use Rector\Core\ValueObject\PhpVersion;
|
||||||
use Rector\Symfony\Set\SymfonySetList;
|
use Rector\Symfony\Set\SymfonySetList;
|
||||||
|
|
||||||
return static function (RectorConfig $rectorConfig): void {
|
return static function (RectorConfig $rectorConfig): void {
|
||||||
$rectorConfig->import(SymfonySetList::SYMFONY_52);
|
$rectorConfig->sets([SymfonySetList::SYMFONY_52]);
|
||||||
|
|
||||||
$rectorConfig->phpVersion(PhpVersion::PHP_80);
|
$rectorConfig->phpVersion(PhpVersion::PHP_80);
|
||||||
$rectorConfig->paths([__DIR__ . '/src']);
|
$rectorConfig->paths([__DIR__ . '/src']);
|
||||||
|
|
|
@ -8,5 +8,5 @@ use Rector\Set\ValueObject\SetList;
|
||||||
return static function (RectorConfig $rectorConfig): void {
|
return static function (RectorConfig $rectorConfig): void {
|
||||||
$rectorConfig->paths([__DIR__.'/src']);
|
$rectorConfig->paths([__DIR__.'/src']);
|
||||||
|
|
||||||
$rectorConfig->import(SetList::PHP_53);
|
$rectorConfig->sets([SetList::PHP_53]);
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,5 +8,5 @@ use Rector\Set\ValueObject\SetList;
|
||||||
return static function (RectorConfig $rectorConfig): void {
|
return static function (RectorConfig $rectorConfig): void {
|
||||||
$rectorConfig->paths([__DIR__.'/src']);
|
$rectorConfig->paths([__DIR__.'/src']);
|
||||||
|
|
||||||
$rectorConfig->import(SetList::DEAD_CODE);
|
$rectorConfig->sets([SetList::DEAD_CODE]);
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,5 +8,5 @@ use Rector\Set\ValueObject\SetList;
|
||||||
return static function (RectorConfig $rectorConfig): void {
|
return static function (RectorConfig $rectorConfig): void {
|
||||||
$rectorConfig->paths([__DIR__.'/src']);
|
$rectorConfig->paths([__DIR__.'/src']);
|
||||||
|
|
||||||
$rectorConfig->import(SetList::PHP_53);
|
$rectorConfig->sets([SetList::PHP_53]);
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,5 +8,5 @@ use Rector\Set\ValueObject\SetList;
|
||||||
return static function (RectorConfig $rectorConfig): void {
|
return static function (RectorConfig $rectorConfig): void {
|
||||||
$rectorConfig->paths([__DIR__.'/src']);
|
$rectorConfig->paths([__DIR__.'/src']);
|
||||||
|
|
||||||
$rectorConfig->import(SetList::PHP_53);
|
$rectorConfig->sets([SetList::PHP_53]);
|
||||||
};
|
};
|
||||||
|
|
|
@ -177,14 +177,7 @@ final class RectorConfig extends Container
|
||||||
}
|
}
|
||||||
public function import(string $filePath) : void
|
public function import(string $filePath) : void
|
||||||
{
|
{
|
||||||
$paths = [$filePath];
|
$this->importFile($filePath);
|
||||||
if (\strpos($filePath, '*') !== \false) {
|
|
||||||
$filesystemTweaker = new FilesystemTweaker();
|
|
||||||
$paths = $filesystemTweaker->resolveWithFnmatch($paths);
|
|
||||||
}
|
|
||||||
foreach ($paths as $path) {
|
|
||||||
$this->importFile($path);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @param array<class-string<RectorInterface>> $rectorClasses
|
* @param array<class-string<RectorInterface>> $rectorClasses
|
||||||
|
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||||
* @api
|
* @api
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const PACKAGE_VERSION = '0.18.3';
|
public const PACKAGE_VERSION = '01c0ea9420b424bf1484c99dbb1185a0cd1c3e61';
|
||||||
/**
|
/**
|
||||||
* @api
|
* @api
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const RELEASE_DATE = '2023-09-12 22:14:26';
|
public const RELEASE_DATE = '2023-09-13 01:01:45';
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||||
|
|
||||||
require_once __DIR__ . '/composer/autoload_real.php';
|
require_once __DIR__ . '/composer/autoload_real.php';
|
||||||
|
|
||||||
return ComposerAutoloaderInit74b494968d871723f2b2948ff265d302::getLoader();
|
return ComposerAutoloaderInitd2c3d8ff3dd641afd1f799a5d931ddd5::getLoader();
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
// autoload_real.php @generated by Composer
|
// autoload_real.php @generated by Composer
|
||||||
|
|
||||||
class ComposerAutoloaderInit74b494968d871723f2b2948ff265d302
|
class ComposerAutoloaderInitd2c3d8ff3dd641afd1f799a5d931ddd5
|
||||||
{
|
{
|
||||||
private static $loader;
|
private static $loader;
|
||||||
|
|
||||||
|
@ -22,17 +22,17 @@ class ComposerAutoloaderInit74b494968d871723f2b2948ff265d302
|
||||||
return self::$loader;
|
return self::$loader;
|
||||||
}
|
}
|
||||||
|
|
||||||
spl_autoload_register(array('ComposerAutoloaderInit74b494968d871723f2b2948ff265d302', 'loadClassLoader'), true, true);
|
spl_autoload_register(array('ComposerAutoloaderInitd2c3d8ff3dd641afd1f799a5d931ddd5', 'loadClassLoader'), true, true);
|
||||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||||
spl_autoload_unregister(array('ComposerAutoloaderInit74b494968d871723f2b2948ff265d302', 'loadClassLoader'));
|
spl_autoload_unregister(array('ComposerAutoloaderInitd2c3d8ff3dd641afd1f799a5d931ddd5', 'loadClassLoader'));
|
||||||
|
|
||||||
require __DIR__ . '/autoload_static.php';
|
require __DIR__ . '/autoload_static.php';
|
||||||
call_user_func(\Composer\Autoload\ComposerStaticInit74b494968d871723f2b2948ff265d302::getInitializer($loader));
|
call_user_func(\Composer\Autoload\ComposerStaticInitd2c3d8ff3dd641afd1f799a5d931ddd5::getInitializer($loader));
|
||||||
|
|
||||||
$loader->setClassMapAuthoritative(true);
|
$loader->setClassMapAuthoritative(true);
|
||||||
$loader->register(true);
|
$loader->register(true);
|
||||||
|
|
||||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit74b494968d871723f2b2948ff265d302::$files;
|
$filesToLoad = \Composer\Autoload\ComposerStaticInitd2c3d8ff3dd641afd1f799a5d931ddd5::$files;
|
||||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace Composer\Autoload;
|
namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInit74b494968d871723f2b2948ff265d302
|
class ComposerStaticInitd2c3d8ff3dd641afd1f799a5d931ddd5
|
||||||
{
|
{
|
||||||
public static $files = array (
|
public static $files = array (
|
||||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||||
|
@ -2593,9 +2593,9 @@ class ComposerStaticInit74b494968d871723f2b2948ff265d302
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInit74b494968d871723f2b2948ff265d302::$prefixLengthsPsr4;
|
$loader->prefixLengthsPsr4 = ComposerStaticInitd2c3d8ff3dd641afd1f799a5d931ddd5::$prefixLengthsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInit74b494968d871723f2b2948ff265d302::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitd2c3d8ff3dd641afd1f799a5d931ddd5::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInit74b494968d871723f2b2948ff265d302::$classMap;
|
$loader->classMap = ComposerStaticInitd2c3d8ff3dd641afd1f799a5d931ddd5::$classMap;
|
||||||
|
|
||||||
}, null, ClassLoader::class);
|
}, null, ClassLoader::class);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue