Updated Rector to commit 27d4c55bebe8706a74273d8c2379f59b75543c0e

27d4c55beb [Transform] Check str_contains * before fnmatch() early on AddAllowDynamicPropertiesAttributeRector (#4991)
This commit is contained in:
Tomas Votruba 2023-09-11 13:47:00 +00:00
parent be951e04e1
commit 927d670ef2
5 changed files with 19 additions and 18 deletions

View File

@ -129,15 +129,16 @@ CODE_SAMPLE
} }
private function shouldSkip(Class_ $class) : bool private function shouldSkip(Class_ $class) : bool
{ {
if ($this->transformOnNamespaces !== []) {
$className = (string) $this->nodeNameResolver->getName($class); $className = (string) $this->nodeNameResolver->getName($class);
foreach ($this->transformOnNamespaces as $transformOnNamespace) { foreach ($this->transformOnNamespaces as $transformOnNamespace) {
if ($this->nodeNameResolver->isStringName($className, $transformOnNamespace)) { if (\strpos($transformOnNamespace, '*') !== \false) {
continue;
}
if (!\fnmatch($transformOnNamespace, $className, \FNM_NOESCAPE)) { if (!\fnmatch($transformOnNamespace, $className, \FNM_NOESCAPE)) {
return \true; return \true;
} }
continue;
}
if ($this->nodeNameResolver->isStringName($className, $transformOnNamespace)) {
continue;
} }
} }
if ($this->isDescendantOfStdclass($class)) { if ($this->isDescendantOfStdclass($class)) {

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api * @api
* @var string * @var string
*/ */
public const PACKAGE_VERSION = '878f381d30ddb07c68dfbe828e9cd6e2b77b6c31'; public const PACKAGE_VERSION = '27d4c55bebe8706a74273d8c2379f59b75543c0e';
/** /**
* @api * @api
* @var string * @var string
*/ */
public const RELEASE_DATE = '2023-09-11 20:34:52'; public const RELEASE_DATE = '2023-09-11 20:43:31';
/** /**
* @var int * @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'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit9d986ff76d23b96595f1dd94253ed121::getLoader(); return ComposerAutoloaderInitd7187bfac333e1eb6883a76ac659263c::getLoader();

View File

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

View File

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