Updated Rector to commit 398b6503cd12778c3c0e32b6d4d096452e998ed6

398b6503cd NodeNameResolver: Throw exception in BC breaking path (#4980)
This commit is contained in:
Tomas Votruba 2023-09-11 15:26:30 +00:00
parent abed52d2c1
commit 4f2f57fa55
5 changed files with 21 additions and 12 deletions

View File

@ -37,6 +37,10 @@ final class NodeNameResolver
* @var array<string, NodeNameResolverInterface|null>
*/
private $nodeNameResolversByClass = [];
/**
* Used to check if a string might contain a regex or fnmatch pattern
*/
private const REGEX_WILDCARD_CHARS = ['*', '#', '~', '/'];
/**
* @param NodeNameResolverInterface[] $nodeNameResolvers
*/
@ -171,6 +175,11 @@ final class NodeNameResolver
if ($desiredName === 'Object') {
return $desiredName === $resolvedName;
}
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;
}
/**

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'edadb26ab4a156985027b8f685cdeecf4ea4b098';
public const PACKAGE_VERSION = '398b6503cd12778c3c0e32b6d4d096452e998ed6';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-09-11 15:14:53';
public const RELEASE_DATE = '2023-09-11 17:23:41';
/**
* @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 ComposerAutoloaderInit12d505a2f565ffa23cb2afeee6bf37bb::getLoader();
return ComposerAutoloaderInit5a0949f5d5844b35a83019a08ebf0c76::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit12d505a2f565ffa23cb2afeee6bf37bb
class ComposerAutoloaderInit5a0949f5d5844b35a83019a08ebf0c76
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInit12d505a2f565ffa23cb2afeee6bf37bb
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit12d505a2f565ffa23cb2afeee6bf37bb', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit5a0949f5d5844b35a83019a08ebf0c76', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit12d505a2f565ffa23cb2afeee6bf37bb', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit5a0949f5d5844b35a83019a08ebf0c76', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit12d505a2f565ffa23cb2afeee6bf37bb::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit5a0949f5d5844b35a83019a08ebf0c76::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit12d505a2f565ffa23cb2afeee6bf37bb::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit5a0949f5d5844b35a83019a08ebf0c76::$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 ComposerStaticInit12d505a2f565ffa23cb2afeee6bf37bb
class ComposerStaticInit5a0949f5d5844b35a83019a08ebf0c76
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -2595,9 +2595,9 @@ class ComposerStaticInit12d505a2f565ffa23cb2afeee6bf37bb
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit12d505a2f565ffa23cb2afeee6bf37bb::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit12d505a2f565ffa23cb2afeee6bf37bb::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit12d505a2f565ffa23cb2afeee6bf37bb::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit5a0949f5d5844b35a83019a08ebf0c76::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit5a0949f5d5844b35a83019a08ebf0c76::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit5a0949f5d5844b35a83019a08ebf0c76::$classMap;
}, null, ClassLoader::class);
}