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) {