Skip to content

Commit

Permalink
Only show warning about default version when not "project" type (#11885)
Browse files Browse the repository at this point in the history
  • Loading branch information
Toflar committed Mar 14, 2024
1 parent 94fe294 commit 5a20dba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Composer/Package/Loader/RootPackageLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function load(array $config, string $class = 'Composer\Package\RootPackag
}

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",
Expand Down

0 comments on commit 5a20dba

Please sign in to comment.