From bad8f383f58d078c49c82308bd7042c62d106999 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Mon, 6 Jan 2025 16:26:54 +0000 Subject: [PATCH] Updated Rector to commit 4b18c82b21ad76410037090b0bf4c019fa983f08 https://github.com/rectorphp/rector-src/commit/4b18c82b21ad76410037090b0bf4c019fa983f08 [Scoper] Fix scoper to fix prefixed regex on doctrine inflector take 3 (#6657) --- bin/rector.php | 2 +- src/Application/VersionResolver.php | 4 +-- vendor/bin/php-parse | 4 +-- vendor/bin/yaml-lint | 4 +-- vendor/composer/InstalledVersions.php | 4 +-- .../lib/Doctrine/Inflector/Inflector.php | 2 +- .../Inflector/Rules/English/Inflectible.php | 28 +++++++++---------- .../Inflector/Rules/Spanish/Inflectible.php | 10 +++---- vendor/react/dns/src/Query/Query.php | 2 +- vendor/react/event-loop/src/ExtLibevLoop.php | 2 +- vendor/react/event-loop/src/Factory.php | 2 +- .../react/promise/src/functions_include.php | 2 +- .../deprecation-contracts/function.php | 2 +- 13 files changed, 34 insertions(+), 34 deletions(-) diff --git a/bin/rector.php b/bin/rector.php index 6bdfb7f9f76..1c7e58210cf 100755 --- a/bin/rector.php +++ b/bin/rector.php @@ -93,7 +93,7 @@ final class AutoloadIncluder require_once $filePath; } } -\class_alias('\\AutoloadIncluder', 'AutoloadIncluder', \false); +\class_alias('RectorPrefix202501\\AutoloadIncluder', 'AutoloadIncluder', \false); if (\file_exists(__DIR__ . '/../preload.php') && \is_dir(__DIR__ . '/../vendor')) { require_once __DIR__ . '/../preload.php'; } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 79f3ec4ff45..5586d7d5cb2 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = '3b42813953f335c8d2986c391629ce007ad06ea4'; + public const PACKAGE_VERSION = '4b18c82b21ad76410037090b0bf4c019fa983f08'; /** * @api * @var string */ - public const RELEASE_DATE = '2025-01-06 16:18:51'; + public const RELEASE_DATE = '2025-01-06 16:24:17'; /** * @var int */ diff --git a/vendor/bin/php-parse b/vendor/bin/php-parse index 4dc4a5f5038..fe24ea957c3 100755 --- a/vendor/bin/php-parse +++ b/vendor/bin/php-parse @@ -13,7 +13,7 @@ namespace RectorPrefix202501\Composer; $GLOBALS['_composer_bin_dir'] = __DIR__; $GLOBALS['_composer_autoload_path'] = __DIR__ . '/..' . '/autoload.php'; if (\PHP_VERSION_ID < 80000) { - if (!\class_exists('\\Composer\\BinProxyWrapper')) { + if (!\class_exists('RectorPrefix202501\\Composer\\BinProxyWrapper')) { /** * @internal */ @@ -87,7 +87,7 @@ if (\PHP_VERSION_ID < 80000) { } } } - if (\function_exists('stream_get_wrappers') && \in_array('phpvfscomposer', \stream_get_wrappers(), \true) || \function_exists('stream_wrapper_register') && \stream_wrapper_register('phpvfscomposer', '\\Composer\\BinProxyWrapper')) { + if (\function_exists('stream_get_wrappers') && \in_array('phpvfscomposer', \stream_get_wrappers(), \true) || \function_exists('stream_wrapper_register') && \stream_wrapper_register('phpvfscomposer', 'RectorPrefix202501\\Composer\\BinProxyWrapper')) { return include "phpvfscomposer://" . __DIR__ . '/..' . '/nikic/php-parser/bin/php-parse'; } } diff --git a/vendor/bin/yaml-lint b/vendor/bin/yaml-lint index dd4a2071388..b781496fe1c 100755 --- a/vendor/bin/yaml-lint +++ b/vendor/bin/yaml-lint @@ -13,7 +13,7 @@ namespace RectorPrefix202501\Composer; $GLOBALS['_composer_bin_dir'] = __DIR__; $GLOBALS['_composer_autoload_path'] = __DIR__ . '/..' . '/autoload.php'; if (\PHP_VERSION_ID < 80000) { - if (!\class_exists('\\Composer\\BinProxyWrapper')) { + if (!\class_exists('RectorPrefix202501\\Composer\\BinProxyWrapper')) { /** * @internal */ @@ -87,7 +87,7 @@ if (\PHP_VERSION_ID < 80000) { } } } - if (\function_exists('stream_get_wrappers') && \in_array('phpvfscomposer', \stream_get_wrappers(), \true) || \function_exists('stream_wrapper_register') && \stream_wrapper_register('phpvfscomposer', '\\Composer\\BinProxyWrapper')) { + if (\function_exists('stream_get_wrappers') && \in_array('phpvfscomposer', \stream_get_wrappers(), \true) || \function_exists('stream_wrapper_register') && \stream_wrapper_register('phpvfscomposer', 'RectorPrefix202501\\Composer\\BinProxyWrapper')) { return include "phpvfscomposer://" . __DIR__ . '/..' . '/symfony/yaml/Resources/bin/yaml-lint'; } } diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php index 840d5e5e87a..bb080a78c6c 100644 --- a/vendor/composer/InstalledVersions.php +++ b/vendor/composer/InstalledVersions.php @@ -53,7 +53,7 @@ class InstalledVersions if (1 === \count($packages)) { return $packages[0]; } - return \array_keys(\array_flip(\call_user_func_array('\\array_merge', $packages))); + return \array_keys(\array_flip(\call_user_func_array('RectorPrefix202501\\array_merge', $packages))); } /** * Returns a list of all package names with a specific type e.g. 'library' @@ -277,7 +277,7 @@ class InstalledVersions private static function getInstalled() { if (null === self::$canGetVendors) { - self::$canGetVendors = \method_exists('\\Composer\\Autoload\\ClassLoader', 'getRegisteredLoaders'); + self::$canGetVendors = \method_exists('RectorPrefix202501\\Composer\\Autoload\\ClassLoader', 'getRegisteredLoaders'); } $installed = array(); $copiedLocalDir = \false; diff --git a/vendor/doctrine/inflector/lib/Doctrine/Inflector/Inflector.php b/vendor/doctrine/inflector/lib/Doctrine/Inflector/Inflector.php index d23618337a4..69492d98f7b 100644 --- a/vendor/doctrine/inflector/lib/Doctrine/Inflector/Inflector.php +++ b/vendor/doctrine/inflector/lib/Doctrine/Inflector/Inflector.php @@ -168,7 +168,7 @@ class Inflector } else { $lowered = strtolower($unaccented); } - $replacements = ['/\\W/' => ' ', '/([A-Z]+)([A-Z][a-z])/' => 'RectorPrefix202501\\1_\\2', '/([a-z\\d])([A-Z])/' => 'RectorPrefix202501\\1_\\2', '/[^A-Z^a-z^0-9^\\/]+/' => '-']; + $replacements = ['/\\W/' => ' ', '/([A-Z]+)([A-Z][a-z])/' => '\\1_\\2', '/([a-z\\d])([A-Z])/' => '\\1_\\2', '/[^A-Z^a-z^0-9^\\/]+/' => '-']; $urlized = $lowered; foreach ($replacements as $pattern => $replacement) { $replaced = preg_replace($pattern, $replacement, $urlized); diff --git a/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Inflectible.php b/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Inflectible.php index 0a16df68519..b5576785534 100644 --- a/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Inflectible.php +++ b/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Inflectible.php @@ -12,10 +12,10 @@ class Inflectible /** @return Transformation[] */ public static function getSingular() : iterable { - (yield new Transformation(new Pattern('(s)tatuses$'), 'RectorPrefix202501\\1\\2tatus')); - (yield new Transformation(new Pattern('(s)tatus$'), 'RectorPrefix202501\\1\\2tatus')); - (yield new Transformation(new Pattern('(c)ampus$'), 'RectorPrefix202501\\1\\2ampus')); - (yield new Transformation(new Pattern('^(.*)(menu)s$'), 'RectorPrefix202501\\1\\2')); + (yield new Transformation(new Pattern('(s)tatuses$'), '\\1\\2tatus')); + (yield new Transformation(new Pattern('(s)tatus$'), '\\1\\2tatus')); + (yield new Transformation(new Pattern('(c)ampus$'), '\\1\\2ampus')); + (yield new Transformation(new Pattern('^(.*)(menu)s$'), '\\1\\2')); (yield new Transformation(new Pattern('(quiz)zes$'), '\\1')); (yield new Transformation(new Pattern('(matr)ices$'), '\\1ix')); (yield new Transformation(new Pattern('(vert|ind)ices$'), '\\1ex')); @@ -31,8 +31,8 @@ class Inflectible (yield new Transformation(new Pattern('([^a])uses$'), '\\1us')); (yield new Transformation(new Pattern('([m|l])ice$'), '\\1ouse')); (yield new Transformation(new Pattern('(x|ch|ss|sh)es$'), '\\1')); - (yield new Transformation(new Pattern('(m)ovies$'), 'RectorPrefix202501\\1\\2ovie')); - (yield new Transformation(new Pattern('(s)eries$'), 'RectorPrefix202501\\1\\2eries')); + (yield new Transformation(new Pattern('(m)ovies$'), '\\1\\2ovie')); + (yield new Transformation(new Pattern('(s)eries$'), '\\1\\2eries')); (yield new Transformation(new Pattern('([^aeiouy]|qu)ies$'), '\\1y')); (yield new Transformation(new Pattern('([lr])ves$'), '\\1f')); (yield new Transformation(new Pattern('(tive)s$'), '\\1')); @@ -42,15 +42,15 @@ class Inflectible (yield new Transformation(new Pattern('(olive)s$'), '\\1')); (yield new Transformation(new Pattern('([^fo])ves$'), '\\1fe')); (yield new Transformation(new Pattern('(^analy)ses$'), '\\1sis')); - (yield new Transformation(new Pattern('(analy|diagno|^ba|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$'), 'RectorPrefix202501\\1\\2sis')); + (yield new Transformation(new Pattern('(analy|diagno|^ba|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$'), '\\1\\2sis')); (yield new Transformation(new Pattern('(tax)a$'), '\\1on')); (yield new Transformation(new Pattern('(c)riteria$'), '\\1riterion')); (yield new Transformation(new Pattern('([ti])a(?class !== Message::CLASS_IN ? 'CLASS' . $this->class . ' ' : ''; $type = 'TYPE' . $this->type; - $ref = new \ReflectionClass('\\React\\Dns\\Model\\Message'); + $ref = new \ReflectionClass('RectorPrefix202501\\React\\Dns\\Model\\Message'); foreach ($ref->getConstants() as $name => $value) { if ($value === $this->type && \strpos($name, 'TYPE_') === 0) { $type = \substr($name, 5); diff --git a/vendor/react/event-loop/src/ExtLibevLoop.php b/vendor/react/event-loop/src/ExtLibevLoop.php index a272c20dbd0..855914db63b 100644 --- a/vendor/react/event-loop/src/ExtLibevLoop.php +++ b/vendor/react/event-loop/src/ExtLibevLoop.php @@ -37,7 +37,7 @@ final class ExtLibevLoop implements LoopInterface private $signalEvents = array(); public function __construct() { - if (!\class_exists('\\libev\\EventLoop', \false)) { + if (!\class_exists('RectorPrefix202501\\libev\\EventLoop', \false)) { throw new BadMethodCallException('Cannot create ExtLibevLoop, ext-libev extension missing'); } $this->loop = new EventLoop(); diff --git a/vendor/react/event-loop/src/Factory.php b/vendor/react/event-loop/src/Factory.php index 85fd43b0705..8a5e238aeef 100644 --- a/vendor/react/event-loop/src/Factory.php +++ b/vendor/react/event-loop/src/Factory.php @@ -48,7 +48,7 @@ final class Factory // only use ext-uv on PHP 7 return new ExtUvLoop(); } - if (\class_exists('\\libev\\EventLoop', \false)) { + if (\class_exists('RectorPrefix202501\\libev\\EventLoop', \false)) { return new ExtLibevLoop(); } if (\class_exists('EvLoop', \false)) { diff --git a/vendor/react/promise/src/functions_include.php b/vendor/react/promise/src/functions_include.php index 4633cb39249..013c7bfcc43 100644 --- a/vendor/react/promise/src/functions_include.php +++ b/vendor/react/promise/src/functions_include.php @@ -2,6 +2,6 @@ namespace RectorPrefix202501; -if (!\function_exists('\\React\\Promise\\resolve')) { +if (!\function_exists('RectorPrefix202501\\React\\Promise\\resolve')) { require __DIR__ . '/functions.php'; } diff --git a/vendor/symfony/deprecation-contracts/function.php b/vendor/symfony/deprecation-contracts/function.php index e90cf37ee9f..5a53d459702 100644 --- a/vendor/symfony/deprecation-contracts/function.php +++ b/vendor/symfony/deprecation-contracts/function.php @@ -10,7 +10,7 @@ namespace RectorPrefix202501; * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ -if (!\function_exists('\\trigger_deprecation')) { +if (!\function_exists('RectorPrefix202501\\trigger_deprecation')) { /** * Triggers a silenced deprecation notice. *