From 5a20dba768d489496446b0db4987a957af7e1d1b Mon Sep 17 00:00:00 2001 From: Yanick Witschi Date: Thu, 14 Mar 2024 16:38:28 +0100 Subject: [PATCH] Only show warning about default version when not "project" type (#11885) --- src/Composer/Package/Loader/RootPackageLoader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Package/Loader/RootPackageLoader.php b/src/Composer/Package/Loader/RootPackageLoader.php index 9796bb3c9..64a169019 100644 --- a/src/Composer/Package/Loader/RootPackageLoader.php +++ b/src/Composer/Package/Loader/RootPackageLoader.php @@ -99,7 +99,7 @@ class RootPackageLoader extends ArrayLoader } if (!isset($config['version'])) { - if ($this->io !== null && $config['name'] !== '__root__') { + if ($this->io !== null && $config['name'] !== '__root__' && 'project' !== ($config['type'] ?? '')) { $this->io->warning( sprintf( "Composer could not detect the root package (%s) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version",