mirror of
https://github.com/rectorphp/rector.git
synced 2025-03-21 15:59:46 +01:00
Updated Rector to commit 41a4d2456cde167c50c628f62aa5587689c0a8b5
41a4d2456c
fix variable name (#4704)
This commit is contained in:
parent
a68d89f0cc
commit
dd899d3abb
@ -104,7 +104,7 @@ final class LazyRectorConfig extends Container
|
||||
return $value;
|
||||
});
|
||||
$this->singleton($rectorClass);
|
||||
$this->extend($rectorClass, function (ConfigurableRectorInterface $configurableRector) use($configuration) {
|
||||
$this->extend($rectorClass, static function (ConfigurableRectorInterface $configurableRector) use($configuration) : void {
|
||||
$configurableRector->configure($configuration);
|
||||
});
|
||||
$this->tagRectorService($rectorClass);
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '6f1f2676d45d2c514d567bdb52cfbb06c8b3db53';
|
||||
public const PACKAGE_VERSION = '41a4d2456cde167c50c628f62aa5587689c0a8b5';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-08-07 12:12:02';
|
||||
public const RELEASE_DATE = '2023-08-07 13:01:37';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
@ -36,7 +36,6 @@ use Rector\CodingStyle\ClassNameImport\ClassNameImportSkipVoter\FullyQualifiedNa
|
||||
use Rector\CodingStyle\ClassNameImport\ClassNameImportSkipVoter\UsesClassNameImportSkipVoter;
|
||||
use Rector\CodingStyle\Contract\ClassNameImport\ClassNameImportSkipVoterInterface;
|
||||
use Rector\Config\LazyRectorConfig;
|
||||
use Rector\Config\RectorConfig;
|
||||
use Rector\Core\Application\ApplicationFileProcessor;
|
||||
use Rector\Core\Application\ChangedNodeScopeRefresher;
|
||||
use Rector\Core\Application\FileProcessor\PhpFileProcessor;
|
||||
@ -259,12 +258,12 @@ final class LazyContainerFactory
|
||||
$lazyRectorConfig->when(ApplicationFileProcessor::class)->needs('$fileProcessors')->giveTagged(FileProcessorInterface::class);
|
||||
$lazyRectorConfig->when(FileFactory::class)->needs('$fileProcessors')->giveTagged(FileProcessorInterface::class);
|
||||
$lazyRectorConfig->when(RectorNodeTraverser::class)->needs('$phpRectors')->giveTagged(PhpRectorInterface::class);
|
||||
$lazyRectorConfig->singleton(RectorConsoleOutputStyle::class, function (Container $container) : RectorConsoleOutputStyle {
|
||||
$lazyRectorConfig->singleton(RectorConsoleOutputStyle::class, static function (Container $container) : RectorConsoleOutputStyle {
|
||||
$rectorConsoleOutputStyleFactory = $container->make(RectorConsoleOutputStyleFactory::class);
|
||||
return $rectorConsoleOutputStyleFactory->create();
|
||||
});
|
||||
$lazyRectorConfig->when(ClassNameImportSkipper::class)->needs('$classNameImportSkipVoters')->giveTagged(ClassNameImportSkipVoterInterface::class);
|
||||
$lazyRectorConfig->singleton(DynamicSourceLocatorProvider::class, function (Container $container) : DynamicSourceLocatorProvider {
|
||||
$lazyRectorConfig->singleton(DynamicSourceLocatorProvider::class, static function (Container $container) : DynamicSourceLocatorProvider {
|
||||
$phpStanServicesFactory = $container->make(PHPStanServicesFactory::class);
|
||||
return $phpStanServicesFactory->createDynamicSourceLocatorProvider();
|
||||
});
|
||||
@ -282,7 +281,7 @@ final class LazyContainerFactory
|
||||
$lazyRectorConfig->when(NodeTypeResolver::class)->needs('$nodeTypeResolvers')->giveTagged(NodeTypeResolverInterface::class);
|
||||
// node name resolvers
|
||||
$lazyRectorConfig->when(NodeNameResolver::class)->needs('$nodeNameResolvers')->giveTagged(NodeNameResolverInterface::class);
|
||||
$lazyRectorConfig->afterResolving(AbstractRector::class, function (AbstractRector $rector, Container $container) {
|
||||
$lazyRectorConfig->afterResolving(AbstractRector::class, static function (AbstractRector $rector, Container $container) : void {
|
||||
$rector->autowire($container->make(NodeNameResolver::class), $container->make(NodeTypeResolver::class), $container->make(SimpleCallableNodeTraverser::class), $container->make(NodeFactory::class), $container->make(PhpDocInfoFactory::class), $container->make(StaticTypeMapper::class), $container->make(CurrentRectorProvider::class), $container->make(CurrentNodeProvider::class), $container->make(Skipper::class), $container->make(ValueResolver::class), $container->make(BetterNodeFinder::class), $container->make(NodeComparator::class), $container->make(CurrentFileProvider::class), $container->make(RectifiedAnalyzer::class), $container->make(CreatedByRuleDecorator::class), $container->make(ChangedNodeScopeRefresher::class), $container->make(RectorOutputStyle::class), $container->make(FilePathHelper::class));
|
||||
});
|
||||
$this->registerTagged($lazyRectorConfig, self::PHP_PARSER_NODE_MAPPER_CLASSES, PhpParserNodeMapperInterface::class);
|
||||
@ -337,39 +336,39 @@ final class LazyContainerFactory
|
||||
$container->tag($class, $tagInterface);
|
||||
}
|
||||
}
|
||||
private function createPHPStanServices(LazyRectorConfig $container) : void
|
||||
private function createPHPStanServices(LazyRectorConfig $lazyRectorConfig) : void
|
||||
{
|
||||
$container->singleton(ReflectionProvider::class, static function (Container $container) : ReflectionProvider {
|
||||
$lazyRectorConfig->singleton(ReflectionProvider::class, static function (Container $container) : ReflectionProvider {
|
||||
$phpstanServiceFactory = $container->make(PHPStanServicesFactory::class);
|
||||
return $phpstanServiceFactory->createReflectionProvider();
|
||||
});
|
||||
// @todo make generic
|
||||
$container->singleton(Parser::class, static function (Container $container) {
|
||||
$lazyRectorConfig->singleton(Parser::class, static function (Container $container) {
|
||||
$phpstanServiceFactory = $container->make(PHPStanServicesFactory::class);
|
||||
return $phpstanServiceFactory->createPHPStanParser();
|
||||
});
|
||||
$container->singleton(Lexer::class, static function (Container $container) {
|
||||
$lazyRectorConfig->singleton(Lexer::class, static function (Container $container) {
|
||||
$phpstanServiceFactory = $container->make(PHPStanServicesFactory::class);
|
||||
return $phpstanServiceFactory->createEmulativeLexer();
|
||||
});
|
||||
$container->singleton(TypeNodeResolver::class, static function (Container $container) {
|
||||
$lazyRectorConfig->singleton(TypeNodeResolver::class, static function (Container $container) {
|
||||
$phpstanServiceFactory = $container->make(PHPStanServicesFactory::class);
|
||||
return $phpstanServiceFactory->createTypeNodeResolver();
|
||||
});
|
||||
$container->singleton(NodeScopeResolver::class, static function (Container $container) {
|
||||
$lazyRectorConfig->singleton(NodeScopeResolver::class, static function (Container $container) {
|
||||
$phpstanServiceFactory = $container->make(PHPStanServicesFactory::class);
|
||||
return $phpstanServiceFactory->createNodeScopeResolver();
|
||||
});
|
||||
$container->singleton(FileHelper::class, static function (Container $container) {
|
||||
$lazyRectorConfig->singleton(FileHelper::class, static function (Container $container) {
|
||||
$phpstanServiceFactory = $container->make(PHPStanServicesFactory::class);
|
||||
return $phpstanServiceFactory->createFileHelper();
|
||||
});
|
||||
$container->singleton(DependencyResolver::class, static function (Container $container) {
|
||||
$lazyRectorConfig->singleton(DependencyResolver::class, static function (Container $container) {
|
||||
$phpstanServiceFactory = $container->make(PHPStanServicesFactory::class);
|
||||
return $phpstanServiceFactory->createDependencyResolver();
|
||||
});
|
||||
// @todo make generic
|
||||
$container->singleton(ScopeFactory::class, static function (Container $container) : ScopeFactory {
|
||||
$lazyRectorConfig->singleton(ScopeFactory::class, static function (Container $container) : ScopeFactory {
|
||||
$phpstanServiceFactory = $container->make(PHPStanServicesFactory::class);
|
||||
return $phpstanServiceFactory->getByType(ScopeFactory::class);
|
||||
});
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit15960fb16ad252b4078490560622a6c0::getLoader();
|
||||
return ComposerAutoloaderInitbaa316b255ef95eb936dbd87b6717275::getLoader();
|
||||
|
10
vendor/composer/autoload_real.php
vendored
10
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit15960fb16ad252b4078490560622a6c0
|
||||
class ComposerAutoloaderInitbaa316b255ef95eb936dbd87b6717275
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInit15960fb16ad252b4078490560622a6c0
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit15960fb16ad252b4078490560622a6c0', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitbaa316b255ef95eb936dbd87b6717275', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit15960fb16ad252b4078490560622a6c0', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitbaa316b255ef95eb936dbd87b6717275', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit15960fb16ad252b4078490560622a6c0::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitbaa316b255ef95eb936dbd87b6717275::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit15960fb16ad252b4078490560622a6c0::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitbaa316b255ef95eb936dbd87b6717275::$files;
|
||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit15960fb16ad252b4078490560622a6c0
|
||||
class ComposerStaticInitbaa316b255ef95eb936dbd87b6717275
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3012,9 +3012,9 @@ class ComposerStaticInit15960fb16ad252b4078490560622a6c0
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit15960fb16ad252b4078490560622a6c0::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit15960fb16ad252b4078490560622a6c0::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit15960fb16ad252b4078490560622a6c0::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitbaa316b255ef95eb936dbd87b6717275::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitbaa316b255ef95eb936dbd87b6717275::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitbaa316b255ef95eb936dbd87b6717275::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user