From 144e8f8a349380fe8fca3e3782fb8c9028c8694e Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 11 Dec 2024 10:50:24 +0100 Subject: [PATCH] Fix create-project when passed with a path repo to disable symlinks by default Fixes #12222 --- src/Composer/Command/CreateProjectCommand.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Composer/Command/CreateProjectCommand.php b/src/Composer/Command/CreateProjectCommand.php index d14e2f123..368516fdb 100644 --- a/src/Composer/Command/CreateProjectCommand.php +++ b/src/Composer/Command/CreateProjectCommand.php @@ -404,6 +404,12 @@ EOT ) { continue; } + + // disable symlinking for the root package by default as that most likely makes no sense + if (($repoConfig['type'] ?? null) === 'path' && !isset($repoConfig['options']['symlink'])) { + $repoConfig['options']['symlink'] = false; + } + $repositorySet->addRepository(RepositoryFactory::createRepo($io, $config, $repoConfig, $rm)); } }