From 00adf249aafe130cdd8980102cef637d96cac36b Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 5 Dec 2025 10:48:16 +0100 Subject: [PATCH] build(scoper): fix lib-vendor-organizer run on MacOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - apparently they case sensitivized their file system somewhat… - now we have an inbetween steps in a temporary build directory to avoit the troubles Signed-off-by: Arthur Schiwon --- .lib-vendor-organizer.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.lib-vendor-organizer.php b/.lib-vendor-organizer.php index 04f609edd1..dccae268e8 100644 --- a/.lib-vendor-organizer.php +++ b/.lib-vendor-organizer.php @@ -53,7 +53,7 @@ if ($stripNamespacePrefix !== '' && strpos($namespace, $stripNamespacePrefix) === 0) { $namespace = str_replace($stripNamespacePrefix, '', $namespace); } - $destination = $sourceDirectory . str_replace('\\', '/', $namespace); + $destination = $sourceDirectory . '/build/' . str_replace('\\', '/', $namespace); if (file_exists($destination)) { rmdir_recursive($destination); } @@ -69,6 +69,14 @@ rmdir_recursive($organizationDir); } +foreach(scandir($sourceDirectory . 'build/') as $file) { + if (!is_dir($sourceDirectory . 'build/' . $file) || $file === '.' || $file === '..') { + continue; + } + rename($sourceDirectory . 'build/' . $file, $sourceDirectory . '/' . $file); +} +rmdir($sourceDirectory . 'build'); + function rmdir_recursive($dir) { foreach(scandir($dir) as $file) { if ('.' === $file || '..' === $file) {