mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-09 04:32:33 +00:00
Updated Rector to commit 81e7980962f1db29f0fc2be5800a822cfb07f656
81e7980962
Prevent unnecessary IO in ChangedFilesDetector (#3650)
This commit is contained in:
parent
f84ec52872
commit
bd36624100
|
@ -40,10 +40,14 @@ final class ChangedFilesDetector
|
|||
}
|
||||
public function hasFileChanged(string $filePath) : bool
|
||||
{
|
||||
$currentFileHash = $this->hashFile($filePath);
|
||||
$fileInfoCacheKey = $this->getFilePathCacheKey($filePath);
|
||||
$cachedValue = $this->cache->load($fileInfoCacheKey, CacheKey::FILE_HASH_KEY);
|
||||
return $currentFileHash !== $cachedValue;
|
||||
if ($cachedValue !== null) {
|
||||
$currentFileHash = $this->hashFile($filePath);
|
||||
return $currentFileHash !== $cachedValue;
|
||||
}
|
||||
// we don't have a value to compare against. Be defensive and assume its changed
|
||||
return \true;
|
||||
}
|
||||
public function invalidateFile(string $filePath) : void
|
||||
{
|
||||
|
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'd777f36ffced045951e856ab22ed71591582147b';
|
||||
public const PACKAGE_VERSION = '81e7980962f1db29f0fc2be5800a822cfb07f656';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-04-22 16:28:19';
|
||||
public const RELEASE_DATE = '2023-04-22 23:48:35';
|
||||
/**
|
||||
* @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 ComposerAutoloaderInit4c91f9405f3ad58a30fba5d4ac80efdc::getLoader();
|
||||
return ComposerAutoloaderInit3978002b82d86393c650abc7b4e472c5::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 ComposerAutoloaderInit4c91f9405f3ad58a30fba5d4ac80efdc
|
||||
class ComposerAutoloaderInit3978002b82d86393c650abc7b4e472c5
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,17 +22,17 @@ class ComposerAutoloaderInit4c91f9405f3ad58a30fba5d4ac80efdc
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit4c91f9405f3ad58a30fba5d4ac80efdc', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit3978002b82d86393c650abc7b4e472c5', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit4c91f9405f3ad58a30fba5d4ac80efdc', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit3978002b82d86393c650abc7b4e472c5', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit4c91f9405f3ad58a30fba5d4ac80efdc::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit3978002b82d86393c650abc7b4e472c5::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit4c91f9405f3ad58a30fba5d4ac80efdc::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit3978002b82d86393c650abc7b4e472c5::$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 ComposerStaticInit4c91f9405f3ad58a30fba5d4ac80efdc
|
||||
class ComposerStaticInit3978002b82d86393c650abc7b4e472c5
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
|
@ -3149,9 +3149,9 @@ class ComposerStaticInit4c91f9405f3ad58a30fba5d4ac80efdc
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit4c91f9405f3ad58a30fba5d4ac80efdc::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit4c91f9405f3ad58a30fba5d4ac80efdc::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit4c91f9405f3ad58a30fba5d4ac80efdc::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit3978002b82d86393c650abc7b4e472c5::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit3978002b82d86393c650abc7b4e472c5::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit3978002b82d86393c650abc7b4e472c5::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user