mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-19 06:18:07 +01:00
Updated Rector to commit bce3b96be1c547cb4dcb22bd31837cd0cfc3a852
bce3b96be1
add source locator
This commit is contained in:
parent
ae0efb17e4
commit
a28dc20b3d
@ -22,11 +22,7 @@ final class IntermediateSourceLocator implements \PHPStan\BetterReflection\Sourc
|
||||
{
|
||||
$this->sourceLocatorProviders = $sourceLocatorProviders;
|
||||
}
|
||||
/**
|
||||
* @param \PHPStan\BetterReflection\Reflector\Reflector $reflector
|
||||
* @param \PHPStan\BetterReflection\Identifier\Identifier $identifier
|
||||
*/
|
||||
public function locateIdentifier($reflector, $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection
|
||||
public function locateIdentifier(\PHPStan\BetterReflection\Reflector\Reflector $reflector, \PHPStan\BetterReflection\Identifier\Identifier $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection
|
||||
{
|
||||
foreach ($this->sourceLocatorProviders as $sourceLocatorProvider) {
|
||||
$sourceLocator = $sourceLocatorProvider->provide();
|
||||
@ -40,10 +36,8 @@ final class IntermediateSourceLocator implements \PHPStan\BetterReflection\Sourc
|
||||
/**
|
||||
* Find all identifiers of a type
|
||||
* @return Reflection[]
|
||||
* @param \PHPStan\BetterReflection\Reflector\Reflector $reflector
|
||||
* @param \PHPStan\BetterReflection\Identifier\IdentifierType $identifierType
|
||||
*/
|
||||
public function locateIdentifiersByType($reflector, $identifierType) : array
|
||||
public function locateIdentifiersByType(\PHPStan\BetterReflection\Reflector\Reflector $reflector, \PHPStan\BetterReflection\Identifier\IdentifierType $identifierType) : array
|
||||
{
|
||||
foreach ($this->sourceLocatorProviders as $sourceLocatorProvider) {
|
||||
$sourceLocator = $sourceLocatorProvider->provide();
|
||||
|
@ -16,11 +16,11 @@ final class VersionResolver
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'd3c949f5a9d92a0a89b468dbdf8f8a363ef64284';
|
||||
public const PACKAGE_VERSION = 'bce3b96be1c547cb4dcb22bd31837cd0cfc3a852';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2021-07-06 10:40:56';
|
||||
public const RELEASE_DATE = '2021-07-06 10:56:44';
|
||||
public static function resolvePackageVersion() : string
|
||||
{
|
||||
$process = new \RectorPrefix20210706\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);
|
||||
|
@ -39,17 +39,12 @@ final class ParentAttributeSourceLocator implements \PHPStan\BetterReflection\So
|
||||
}
|
||||
/**
|
||||
* @required
|
||||
* @param \Rector\Core\PhpParser\AstResolver $astResolver
|
||||
*/
|
||||
public function autowireParentAttributeSourceLocator($astResolver) : void
|
||||
public function autowireParentAttributeSourceLocator(\Rector\Core\PhpParser\AstResolver $astResolver) : void
|
||||
{
|
||||
$this->astResolver = $astResolver;
|
||||
}
|
||||
/**
|
||||
* @param \PHPStan\BetterReflection\Reflector\Reflector $reflector
|
||||
* @param \PHPStan\BetterReflection\Identifier\Identifier $identifier
|
||||
*/
|
||||
public function locateIdentifier($reflector, $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection
|
||||
public function locateIdentifier(\PHPStan\BetterReflection\Reflector\Reflector $reflector, \PHPStan\BetterReflection\Identifier\Identifier $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection
|
||||
{
|
||||
if ($identifier->getName() === 'Symfony\\Component\\DependencyInjection\\Attribute\\Autoconfigure') {
|
||||
if ($this->reflectionProvider->hasClass($identifier->getName())) {
|
||||
@ -66,11 +61,7 @@ final class ParentAttributeSourceLocator implements \PHPStan\BetterReflection\So
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* @param \PHPStan\BetterReflection\Reflector\Reflector $reflector
|
||||
* @param \PHPStan\BetterReflection\Identifier\IdentifierType $identifierType
|
||||
*/
|
||||
public function locateIdentifiersByType($reflector, $identifierType) : array
|
||||
public function locateIdentifiersByType(\PHPStan\BetterReflection\Reflector\Reflector $reflector, \PHPStan\BetterReflection\Identifier\IdentifierType $identifierType) : array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
@ -26,11 +26,7 @@ final class RenamedClassesSourceLocator implements \PHPStan\BetterReflection\Sou
|
||||
{
|
||||
$this->renamedClassesDataCollector = $renamedClassesDataCollector;
|
||||
}
|
||||
/**
|
||||
* @param \PHPStan\BetterReflection\Reflector\Reflector $reflector
|
||||
* @param \PHPStan\BetterReflection\Identifier\Identifier $identifier
|
||||
*/
|
||||
public function locateIdentifier($reflector, $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection
|
||||
public function locateIdentifier(\PHPStan\BetterReflection\Reflector\Reflector $reflector, \PHPStan\BetterReflection\Identifier\Identifier $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection
|
||||
{
|
||||
foreach ($this->renamedClassesDataCollector->getOldToNewClasses() as $oldClass => $newClass) {
|
||||
if ($identifier->getName() !== $oldClass) {
|
||||
@ -41,11 +37,7 @@ final class RenamedClassesSourceLocator implements \PHPStan\BetterReflection\Sou
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* @param \PHPStan\BetterReflection\Reflector\Reflector $reflector
|
||||
* @param \PHPStan\BetterReflection\Identifier\IdentifierType $identifierType
|
||||
*/
|
||||
public function locateIdentifiersByType($reflector, $identifierType) : array
|
||||
public function locateIdentifiersByType(\PHPStan\BetterReflection\Reflector\Reflector $reflector, \PHPStan\BetterReflection\Identifier\IdentifierType $identifierType) : array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -4,4 +4,4 @@
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInite644ce2880b65922c38643844a81af7a::getLoader();
|
||||
return ComposerAutoloaderInit91362ee49b9b1c2fc828e507b850ba5e::getLoader();
|
||||
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInite644ce2880b65922c38643844a81af7a
|
||||
class ComposerAutoloaderInit91362ee49b9b1c2fc828e507b850ba5e
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,15 +22,15 @@ class ComposerAutoloaderInite644ce2880b65922c38643844a81af7a
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInite644ce2880b65922c38643844a81af7a', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit91362ee49b9b1c2fc828e507b850ba5e', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInite644ce2880b65922c38643844a81af7a', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit91362ee49b9b1c2fc828e507b850ba5e', 'loadClassLoader'));
|
||||
|
||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||
if ($useStaticLoader) {
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInite644ce2880b65922c38643844a81af7a::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit91362ee49b9b1c2fc828e507b850ba5e::getInitializer($loader));
|
||||
} else {
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
@ -42,19 +42,19 @@ class ComposerAutoloaderInite644ce2880b65922c38643844a81af7a
|
||||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInite644ce2880b65922c38643844a81af7a::$files;
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInit91362ee49b9b1c2fc828e507b850ba5e::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequiree644ce2880b65922c38643844a81af7a($fileIdentifier, $file);
|
||||
composerRequire91362ee49b9b1c2fc828e507b850ba5e($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequiree644ce2880b65922c38643844a81af7a($fileIdentifier, $file)
|
||||
function composerRequire91362ee49b9b1c2fc828e507b850ba5e($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
require $file;
|
||||
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInite644ce2880b65922c38643844a81af7a
|
||||
class ComposerStaticInit91362ee49b9b1c2fc828e507b850ba5e
|
||||
{
|
||||
public static $files = array (
|
||||
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
|
||||
@ -3865,9 +3865,9 @@ class ComposerStaticInite644ce2880b65922c38643844a81af7a
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInite644ce2880b65922c38643844a81af7a::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInite644ce2880b65922c38643844a81af7a::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInite644ce2880b65922c38643844a81af7a::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit91362ee49b9b1c2fc828e507b850ba5e::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit91362ee49b9b1c2fc828e507b850ba5e::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit91362ee49b9b1c2fc828e507b850ba5e::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
10
vendor/scoper-autoload.php
vendored
10
vendor/scoper-autoload.php
vendored
@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php';
|
||||
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
|
||||
spl_autoload_call('RectorPrefix20210706\AutoloadIncluder');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInite644ce2880b65922c38643844a81af7a', false) && !interface_exists('ComposerAutoloaderInite644ce2880b65922c38643844a81af7a', false) && !trait_exists('ComposerAutoloaderInite644ce2880b65922c38643844a81af7a', false)) {
|
||||
spl_autoload_call('RectorPrefix20210706\ComposerAutoloaderInite644ce2880b65922c38643844a81af7a');
|
||||
if (!class_exists('ComposerAutoloaderInit91362ee49b9b1c2fc828e507b850ba5e', false) && !interface_exists('ComposerAutoloaderInit91362ee49b9b1c2fc828e507b850ba5e', false) && !trait_exists('ComposerAutoloaderInit91362ee49b9b1c2fc828e507b850ba5e', false)) {
|
||||
spl_autoload_call('RectorPrefix20210706\ComposerAutoloaderInit91362ee49b9b1c2fc828e507b850ba5e');
|
||||
}
|
||||
if (!class_exists('Doctrine\Inflector\Inflector', false) && !interface_exists('Doctrine\Inflector\Inflector', false) && !trait_exists('Doctrine\Inflector\Inflector', false)) {
|
||||
spl_autoload_call('RectorPrefix20210706\Doctrine\Inflector\Inflector');
|
||||
@ -3308,9 +3308,9 @@ if (!function_exists('print_node')) {
|
||||
return \RectorPrefix20210706\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequiree644ce2880b65922c38643844a81af7a')) {
|
||||
function composerRequiree644ce2880b65922c38643844a81af7a() {
|
||||
return \RectorPrefix20210706\composerRequiree644ce2880b65922c38643844a81af7a(...func_get_args());
|
||||
if (!function_exists('composerRequire91362ee49b9b1c2fc828e507b850ba5e')) {
|
||||
function composerRequire91362ee49b9b1c2fc828e507b850ba5e() {
|
||||
return \RectorPrefix20210706\composerRequire91362ee49b9b1c2fc828e507b850ba5e(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('parseArgs')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user