Skip to content

Commit

Permalink
Updated Rector to commit ca23ae894e833861e83533ed9f89fc7b3bf37fee
Browse files Browse the repository at this point in the history
rectorphp/rector-src@ca23ae8 [Autoloading] Allow to define bootstrapFiles([__DIR__ . '/some.phar']) on BootstrapFilesIncluder (#5518)
  • Loading branch information
TomasVotruba committed Jan 29, 2024
1 parent 0d3dcc3 commit bc9920f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
6 changes: 6 additions & 0 deletions src/Autoloading/BootstrapFilesIncluder.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
declare (strict_types=1);
namespace Rector\Autoloading;

use Phar;
use FilesystemIterator;
use Rector\Configuration\Option;
use Rector\Configuration\Parameter\SimpleParameterProvider;
Expand All @@ -29,6 +30,11 @@ public function includeBootstrapFiles() : void
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();
Expand Down
2 changes: 1 addition & 1 deletion vendor/scoper-autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// 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;
Expand Down

0 comments on commit bc9920f

Please sign in to comment.