mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 05:48:21 +01:00
Updated Rector to commit bdee76597b93b0c75a70d767caed6f16cd8ae403
bdee76597b
[Php55] Handle pre-slash string on StringClassNameToClassConstantRector (#2905)
This commit is contained in:
parent
a0b6b46579
commit
9d01c06e33
@ -5,6 +5,7 @@ namespace Rector\Php55\Rector\String_;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Arg;
|
||||
use PhpParser\Node\Expr\BinaryOp\Concat;
|
||||
use PhpParser\Node\Expr\ClassConstFetch;
|
||||
use PhpParser\Node\Expr\FuncCall;
|
||||
use PhpParser\Node\Name\FullyQualified;
|
||||
@ -95,6 +96,12 @@ CODE_SAMPLE
|
||||
return null;
|
||||
}
|
||||
$fullyQualified = new FullyQualified($classLikeName);
|
||||
if ($classLikeName !== $node->value) {
|
||||
$preSlashCount = \strlen($node->value) - \strlen($classLikeName);
|
||||
$preSlash = \str_repeat('\\', $preSlashCount);
|
||||
$string = new String_($preSlash);
|
||||
return new Concat($string, new ClassConstFetch($fullyQualified, 'class'));
|
||||
}
|
||||
return new ClassConstFetch($fullyQualified, 'class');
|
||||
}
|
||||
/**
|
||||
|
@ -17,12 +17,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '754fdd174ef743ebe7b528fc89adc3e61df7379e';
|
||||
public const PACKAGE_VERSION = 'bdee76597b93b0c75a70d767caed6f16cd8ae403';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2022-09-04 12:02:45';
|
||||
public const RELEASE_DATE = '2022-09-04 17:45:44';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInitd9e95f82b3f8caae0995c009fbf0b796::getLoader();
|
||||
return ComposerAutoloaderInit91356739d019fd700ce892ebe9e8ae4d::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 ComposerAutoloaderInitd9e95f82b3f8caae0995c009fbf0b796
|
||||
class ComposerAutoloaderInit91356739d019fd700ce892ebe9e8ae4d
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,19 +22,19 @@ class ComposerAutoloaderInitd9e95f82b3f8caae0995c009fbf0b796
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitd9e95f82b3f8caae0995c009fbf0b796', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit91356739d019fd700ce892ebe9e8ae4d', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitd9e95f82b3f8caae0995c009fbf0b796', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit91356739d019fd700ce892ebe9e8ae4d', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitd9e95f82b3f8caae0995c009fbf0b796::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit91356739d019fd700ce892ebe9e8ae4d::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInitd9e95f82b3f8caae0995c009fbf0b796::$files;
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit91356739d019fd700ce892ebe9e8ae4d::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequired9e95f82b3f8caae0995c009fbf0b796($fileIdentifier, $file);
|
||||
composerRequire91356739d019fd700ce892ebe9e8ae4d($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
@ -46,7 +46,7 @@ class ComposerAutoloaderInitd9e95f82b3f8caae0995c009fbf0b796
|
||||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequired9e95f82b3f8caae0995c009fbf0b796($fileIdentifier, $file)
|
||||
function composerRequire91356739d019fd700ce892ebe9e8ae4d($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 ComposerStaticInitd9e95f82b3f8caae0995c009fbf0b796
|
||||
class ComposerStaticInit91356739d019fd700ce892ebe9e8ae4d
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3093,9 +3093,9 @@ class ComposerStaticInitd9e95f82b3f8caae0995c009fbf0b796
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitd9e95f82b3f8caae0995c009fbf0b796::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitd9e95f82b3f8caae0995c009fbf0b796::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitd9e95f82b3f8caae0995c009fbf0b796::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit91356739d019fd700ce892ebe9e8ae4d::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit91356739d019fd700ce892ebe9e8ae4d::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit91356739d019fd700ce892ebe9e8ae4d::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user