diff --git a/.github/workflows/e2e_diff.yaml b/.github/workflows/e2e_diff.yaml index e3e79736626..9912b69d188 100644 --- a/.github/workflows/e2e_diff.yaml +++ b/.github/workflows/e2e_diff.yaml @@ -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 }} diff --git a/bootstrap.php b/bootstrap.php index 1d4dbaab0c3..2e46abf997c 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -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; - } - } }); diff --git a/e2e/container-configurator/composer.json b/e2e/container-configurator/composer.json new file mode 100644 index 00000000000..ba82aa35d41 --- /dev/null +++ b/e2e/container-configurator/composer.json @@ -0,0 +1,7 @@ +{ + "autoload": { + "psr-4": { + "Rector\\e2e\\": "src" + } + } +} diff --git a/e2e/container-configurator/rector.php b/e2e/container-configurator/rector.php new file mode 100644 index 00000000000..c368cc28e9f --- /dev/null +++ b/e2e/container-configurator/rector.php @@ -0,0 +1,18 @@ +parameters(); + $parameters->set(Option::PATHS, [__DIR__ . '/src']); + + $services = $containerConfigurator->services(); + $services->set(TypedPropertyRector::class); +}; diff --git a/e2e/container-configurator/src/SomeClass.php b/e2e/container-configurator/src/SomeClass.php new file mode 100644 index 00000000000..4c87511e9a1 --- /dev/null +++ b/e2e/container-configurator/src/SomeClass.php @@ -0,0 +1,11 @@ +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; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 5131aedb352..48c9d7150f5 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -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); } diff --git a/vendor/scoper-autoload.php b/vendor/scoper-autoload.php index 65709809b99..8a84ba803b2 100644 --- a/vendor/scoper-autoload.php +++ b/vendor/scoper-autoload.php @@ -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')) {