Updated Rector to commit 7b4858b689e23bac39c47ddbf06df4842f453936

7b4858b689 [Performance] [NodeNameResolver] Move loop REGEX_WILDCARD_CHARS on last resort after $resolvedName, $desiredName compare to avoid unnecesary loop when possible (#4996)
This commit is contained in:
Tomas Votruba 2023-09-11 15:30:38 +00:00
parent 4f2f57fa55
commit 0acf99c06a
5 changed files with 16 additions and 13 deletions

View File

@ -175,12 +175,15 @@ final class NodeNameResolver
if ($desiredName === 'Object') {
return $desiredName === $resolvedName;
}
if (\strcasecmp($resolvedName, $desiredName) === 0) {
return \true;
}
foreach (self::REGEX_WILDCARD_CHARS as $char) {
if (\strpos($desiredName, $char) !== \false) {
throw new ShouldNotHappenException('Matching of regular expressions is no longer supported. Use $this->getName() and compare with e.g. str_ends_with() or str_starts_with() instead.');
}
}
return \strcasecmp($resolvedName, $desiredName) === 0;
return \false;
}
/**
* @param \PhpParser\Node\Expr|\PhpParser\Node\Identifier $node

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '398b6503cd12778c3c0e32b6d4d096452e998ed6';
public const PACKAGE_VERSION = '7b4858b689e23bac39c47ddbf06df4842f453936';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-09-11 17:23:41';
public const RELEASE_DATE = '2023-09-11 15:27:56';
/**
* @var int
*/

2
vendor/autoload.php vendored
View File

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit5a0949f5d5844b35a83019a08ebf0c76::getLoader();
return ComposerAutoloaderInitbd6b28def8d74c9cc21238e5a263a42b::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit5a0949f5d5844b35a83019a08ebf0c76
class ComposerAutoloaderInitbd6b28def8d74c9cc21238e5a263a42b
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInit5a0949f5d5844b35a83019a08ebf0c76
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit5a0949f5d5844b35a83019a08ebf0c76', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitbd6b28def8d74c9cc21238e5a263a42b', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit5a0949f5d5844b35a83019a08ebf0c76', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitbd6b28def8d74c9cc21238e5a263a42b', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit5a0949f5d5844b35a83019a08ebf0c76::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitbd6b28def8d74c9cc21238e5a263a42b::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit5a0949f5d5844b35a83019a08ebf0c76::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInitbd6b28def8d74c9cc21238e5a263a42b::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit5a0949f5d5844b35a83019a08ebf0c76
class ComposerStaticInitbd6b28def8d74c9cc21238e5a263a42b
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -2595,9 +2595,9 @@ class ComposerStaticInit5a0949f5d5844b35a83019a08ebf0c76
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit5a0949f5d5844b35a83019a08ebf0c76::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit5a0949f5d5844b35a83019a08ebf0c76::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit5a0949f5d5844b35a83019a08ebf0c76::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitbd6b28def8d74c9cc21238e5a263a42b::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitbd6b28def8d74c9cc21238e5a263a42b::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitbd6b28def8d74c9cc21238e5a263a42b::$classMap;
}, null, ClassLoader::class);
}