Updated Rector to commit ca23ae894e833861e83533ed9f89fc7b3bf37fee

ca23ae894e [Autoloading] Allow to define bootstrapFiles([__DIR__ . '/some.phar']) on BootstrapFilesIncluder (#5518)
This commit is contained in:
Tomas Votruba 2024-01-29 23:33:42 +00:00
parent 0d3dcc3842
commit bc9920ff03
3 changed files with 9 additions and 3 deletions

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '0.19.4';
public const PACKAGE_VERSION = 'ca23ae894e833861e83533ed9f89fc7b3bf37fee';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-01-29 22:07:54';
public const RELEASE_DATE = '2024-01-30 00:31:13';
/**
* @var int
*/

View File

@ -3,6 +3,7 @@
declare (strict_types=1);
namespace Rector\Autoloading;
use Phar;
use FilesystemIterator;
use Rector\Configuration\Option;
use Rector\Configuration\Parameter\SimpleParameterProvider;
@ -29,6 +30,11 @@ final class BootstrapFilesIncluder
if (!\is_file($bootstrapFile)) {
throw new ShouldNotHappenException(\sprintf('Bootstrap file "%s" does not exist.', $bootstrapFile));
}
// load phar file
if (\substr_compare($bootstrapFile, '.phar', -\strlen('.phar')) === 0) {
Phar::loadPhar($bootstrapFile);
continue;
}
require $bootstrapFile;
}
$this->requireRectorStubs();

View File

@ -14,7 +14,7 @@ $loader = (static function () {
// Restore the backup and ensure the excluded files are properly marked as loaded
$GLOBALS['__composer_autoload_files'] = \array_merge(
$existingComposerAutoloadFiles,
\array_fill_keys(['0e6d7bf4a5811bfa5cf40c5ccd6fae6a', '5928a00fa978807cf85d90ec3f4b0147'], true)
\array_fill_keys(['5928a00fa978807cf85d90ec3f4b0147', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a'], true)
);
return $loader;