mirror of https://github.com/rectorphp/rector.git
Updated Rector to commit 6baafbc5a6
6baafbc5a6
[Scoper] Remove SmartFileInfo and ContainerConfigurator setup on bootstrap.php (#2253)
This commit is contained in:
parent
4b5a7031be
commit
b4e0bff933
|
@ -18,6 +18,7 @@ jobs:
|
|||
php_version: ['7.2', '7.3', '7.4', '8.0', '8.1']
|
||||
directory:
|
||||
- 'e2e/attributes'
|
||||
- 'e2e/container-configurator'
|
||||
|
||||
name: End to end test with diff - ${{ matrix.directory }}
|
||||
|
||||
|
|
|
@ -23,19 +23,4 @@ spl_autoload_register(function (string $class): void {
|
|||
$composerAutoloader->loadClass($class);
|
||||
}
|
||||
}
|
||||
|
||||
// aliased by php-scoper, that's why its missing
|
||||
if ($class === 'Symplify\SmartFileSystem\SmartFileInfo') {
|
||||
$filePath = __DIR__ . '/vendor/symplify/smart-file-system/src/SmartFileInfo.php';
|
||||
if (file_exists($filePath)) {
|
||||
require $filePath;
|
||||
}
|
||||
}
|
||||
|
||||
if ($class === 'Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator') {
|
||||
// avoid duplicated autoload bug in Rector demo runner
|
||||
if (class_exists('Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator', false)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Rector\\e2e\\": "src"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Rector\Core\Configuration\Option;
|
||||
use Rector\Php74\Rector\Property\TypedPropertyRector;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
/**
|
||||
* This e2e test is to be removed after fully migrated to RectorConfig
|
||||
*/
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$parameters = $containerConfigurator->parameters();
|
||||
$parameters->set(Option::PATHS, [__DIR__ . '/src']);
|
||||
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(TypedPropertyRector::class);
|
||||
};
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace Rector\e2e;
|
||||
|
||||
class SomeClass
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $property;
|
||||
}
|
|
@ -16,11 +16,11 @@ final class VersionResolver
|
|||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '3135f293622611407e6fb403b335077d16bfee74';
|
||||
public const PACKAGE_VERSION = '6baafbc5a6ec38b51a642f55101a3760bd50c0f9';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2022-05-07 10:18:33';
|
||||
public const RELEASE_DATE = '2022-05-07 17:54:44';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
|
|
|
@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
|||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit2a40621b066f2e2762f774b705912004::getLoader();
|
||||
return ComposerAutoloaderInit1fda85a830f6291894213d893f98cd04::getLoader();
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit2a40621b066f2e2762f774b705912004
|
||||
class ComposerAutoloaderInit1fda85a830f6291894213d893f98cd04
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,19 +22,19 @@ class ComposerAutoloaderInit2a40621b066f2e2762f774b705912004
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit2a40621b066f2e2762f774b705912004', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit1fda85a830f6291894213d893f98cd04', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit2a40621b066f2e2762f774b705912004', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit1fda85a830f6291894213d893f98cd04', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit2a40621b066f2e2762f774b705912004::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit1fda85a830f6291894213d893f98cd04::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit2a40621b066f2e2762f774b705912004::$files;
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit1fda85a830f6291894213d893f98cd04::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire2a40621b066f2e2762f774b705912004($fileIdentifier, $file);
|
||||
composerRequire1fda85a830f6291894213d893f98cd04($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
|
@ -46,7 +46,7 @@ class ComposerAutoloaderInit2a40621b066f2e2762f774b705912004
|
|||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequire2a40621b066f2e2762f774b705912004($fileIdentifier, $file)
|
||||
function composerRequire1fda85a830f6291894213d893f98cd04($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit2a40621b066f2e2762f774b705912004
|
||||
class ComposerStaticInit1fda85a830f6291894213d893f98cd04
|
||||
{
|
||||
public static $files = array (
|
||||
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
||||
|
@ -3882,9 +3882,9 @@ class ComposerStaticInit2a40621b066f2e2762f774b705912004
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit2a40621b066f2e2762f774b705912004::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit2a40621b066f2e2762f774b705912004::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit2a40621b066f2e2762f774b705912004::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit1fda85a830f6291894213d893f98cd04::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit1fda85a830f6291894213d893f98cd04::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit1fda85a830f6291894213d893f98cd04::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php';
|
|||
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
|
||||
spl_autoload_call('RectorPrefix20220507\AutoloadIncluder');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInit2a40621b066f2e2762f774b705912004', false) && !interface_exists('ComposerAutoloaderInit2a40621b066f2e2762f774b705912004', false) && !trait_exists('ComposerAutoloaderInit2a40621b066f2e2762f774b705912004', false)) {
|
||||
spl_autoload_call('RectorPrefix20220507\ComposerAutoloaderInit2a40621b066f2e2762f774b705912004');
|
||||
if (!class_exists('ComposerAutoloaderInit1fda85a830f6291894213d893f98cd04', false) && !interface_exists('ComposerAutoloaderInit1fda85a830f6291894213d893f98cd04', false) && !trait_exists('ComposerAutoloaderInit1fda85a830f6291894213d893f98cd04', false)) {
|
||||
spl_autoload_call('RectorPrefix20220507\ComposerAutoloaderInit1fda85a830f6291894213d893f98cd04');
|
||||
}
|
||||
if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) {
|
||||
spl_autoload_call('RectorPrefix20220507\Helmich\TypoScriptParser\Parser\AST\Statement');
|
||||
|
@ -59,9 +59,9 @@ if (!function_exists('print_node')) {
|
|||
return \RectorPrefix20220507\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequire2a40621b066f2e2762f774b705912004')) {
|
||||
function composerRequire2a40621b066f2e2762f774b705912004() {
|
||||
return \RectorPrefix20220507\composerRequire2a40621b066f2e2762f774b705912004(...func_get_args());
|
||||
if (!function_exists('composerRequire1fda85a830f6291894213d893f98cd04')) {
|
||||
function composerRequire1fda85a830f6291894213d893f98cd04() {
|
||||
return \RectorPrefix20220507\composerRequire1fda85a830f6291894213d893f98cd04(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('scanPath')) {
|
||||
|
|
Loading…
Reference in New Issue