diff --git a/bin/rector.php b/bin/rector.php index 532970222d8..05394992ae8 100755 --- a/bin/rector.php +++ b/bin/rector.php @@ -118,11 +118,6 @@ public function loadIfExistsAndNotLoadedYet(string $filePath): void require_once __DIR__ . '/../preload.php'; } -// require rector-src on split packages -if (file_exists(__DIR__ . '/../preload-split-package.php') && is_dir(__DIR__ . '/../../../../vendor')) { - require_once __DIR__ . '/../preload-split-package.php'; -} - $autoloadIncluder->loadIfExistsAndNotLoadedYet(__DIR__ . '/../vendor/scoper-autoload.php'); $autoloadIncluder->autoloadProjectAutoloaderFile(); $autoloadIncluder->autoloadRectorInstalledAsGlobalDependency(); diff --git a/build/build-preload.php b/build/build-preload.php index 80a2e084ffc..c9836ba99a1 100755 --- a/build/build-preload.php +++ b/build/build-preload.php @@ -39,7 +39,6 @@ $preloadBuilder = new PreloadBuilder(); $preloadBuilder->buildPreloadScript($buildDirectory, $buildDirectory . '/preload.php'); -$preloadBuilder->buildPreloadScriptForSplitPackage($buildDirectory, $buildDirectory . '/preload-split-package.php'); final class PreloadBuilder { @@ -157,9 +156,6 @@ private function buildPreloadScriptForSplitPhpParser(string $buildDirectory, str // 1. find php-parser file infos $fileInfos = $this->findPhpParserFilesAndSortThem($vendorDir); - // 2. create preload.php from provided files - $preloadFileContent = $this->createPreloadFileContentForSplitPackage($fileInfos); - file_put_contents($preloadFile, $preloadFileContent); } @@ -173,9 +169,6 @@ private function buildPreloadScriptForSplitPhpDocParser(string $buildDirectory, // 1. find phpdoc-parser file infos $fileInfos = $this->findPhpDocParserFilesAndSortThem($vendorDir); - // 2. create preload-split-package.php from provided files - $preloadFileContent = $this->createPreloadFileContentForSplitPackage($fileInfos, true); - file_put_contents($preloadFile, $preloadFileContent, FILE_APPEND); } @@ -261,25 +254,6 @@ private function createPreloadFileContent(array $fileInfos, bool $append = false return $preloadFileContent; } - /** - * @param SplFileInfo[] $fileInfos - */ - private function createPreloadFileContentForSplitPackage(array $fileInfos, bool $append = false): string - { - $preloadFileContent = $append ? '' : self::PRELOAD_FILE_TEMPLATE . PHP_EOL . PHP_EOL; - - foreach ($fileInfos as $fileInfo) { - $realPath = $fileInfo->getRealPath(); - if ($realPath === false) { - continue; - } - - $preloadFileContent .= $this->createRequireOnceFilePathLineForSplitPackage($realPath); - } - - return $preloadFileContent; - } - private function createRequireOnceFilePathLineForSplitPackage(string $realPath): string { if (! str_contains($realPath, 'vendor')) { diff --git a/ecs.php b/ecs.php index 45bd97c9c41..656c23fa9eb 100644 --- a/ecs.php +++ b/ecs.php @@ -28,7 +28,6 @@ // avoid re-running on build __DIR__ . '/preload.php', - __DIR__ . '/preload-split-package.php', PhpdocTypesFixer::class => [ // double to Double false positive diff --git a/preload-split-package.php b/preload-split-package.php deleted file mode 100644 index 55adf2ab3ca..00000000000 --- a/preload-split-package.php +++ /dev/null @@ -1,382 +0,0 @@ -