mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
Updated Rector to commit 0f0b936c98b56f89c3ddf262f757dfd2a68853cb
0f0b936c98
Performance: Use faster hashing algo for cache key generation (#3508)
This commit is contained in:
parent
1cbaed467e
commit
de30caff39
@ -424,7 +424,13 @@ final class ClassRenamer
|
||||
private function createOldToNewTypes(Node $node, array $oldToNewClasses) : array
|
||||
{
|
||||
$oldToNewClasses = $this->resolveOldToNewClassCallbacks($node, $oldToNewClasses);
|
||||
$cacheKey = \md5(\serialize($oldToNewClasses));
|
||||
// md4 is faster then md5 https://php.watch/articles/php-hash-benchmark
|
||||
$hashingAlgorithm = 'md4';
|
||||
if (\PHP_VERSION_ID >= 80100) {
|
||||
// if xxh128 is available use it, as it is way faster then md4 https://php.watch/articles/php-hash-benchmark
|
||||
$hashingAlgorithm = 'xxh128';
|
||||
}
|
||||
$cacheKey = \hash($hashingAlgorithm, \serialize($oldToNewClasses));
|
||||
if (isset($this->oldToNewTypesByCacheKey[$cacheKey])) {
|
||||
return $this->oldToNewTypesByCacheKey[$cacheKey];
|
||||
}
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'ae2355d5616d51bff232786ff7604eef2760362f';
|
||||
public const PACKAGE_VERSION = '0f0b936c98b56f89c3ddf262f757dfd2a68853cb';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-03-27 08:28:37';
|
||||
public const RELEASE_DATE = '2023-03-27 15:06:17';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit9a30a81dc44b1430a744d08434b52913::getLoader();
|
||||
return ComposerAutoloaderInitc54bdafa27b3a8420c62c320fe1c2de3::getLoader();
|
||||
|
10
vendor/composer/autoload_real.php
vendored
10
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit9a30a81dc44b1430a744d08434b52913
|
||||
class ComposerAutoloaderInitc54bdafa27b3a8420c62c320fe1c2de3
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInit9a30a81dc44b1430a744d08434b52913
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit9a30a81dc44b1430a744d08434b52913', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitc54bdafa27b3a8420c62c320fe1c2de3', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit9a30a81dc44b1430a744d08434b52913', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitc54bdafa27b3a8420c62c320fe1c2de3', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit9a30a81dc44b1430a744d08434b52913::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitc54bdafa27b3a8420c62c320fe1c2de3::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit9a30a81dc44b1430a744d08434b52913::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitc54bdafa27b3a8420c62c320fe1c2de3::$files;
|
||||
$requireFile = \Closure::bind(static function ($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 ComposerStaticInit9a30a81dc44b1430a744d08434b52913
|
||||
class ComposerStaticInitc54bdafa27b3a8420c62c320fe1c2de3
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3127,9 +3127,9 @@ class ComposerStaticInit9a30a81dc44b1430a744d08434b52913
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit9a30a81dc44b1430a744d08434b52913::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit9a30a81dc44b1430a744d08434b52913::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit9a30a81dc44b1430a744d08434b52913::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitc54bdafa27b3a8420c62c320fe1c2de3::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitc54bdafa27b3a8420c62c320fe1c2de3::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitc54bdafa27b3a8420c62c320fe1c2de3::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user