diff --git a/src/PackageVersions/Installer.php b/src/PackageVersions/Installer.php index b87a7b1..c0853c1 100644 --- a/src/PackageVersions/Installer.php +++ b/src/PackageVersions/Installer.php @@ -245,7 +245,11 @@ private static function getVersions(Locker $locker, RootPackageInterface $rootPa $lockData['packages-dev'] = $lockData['packages-dev'] ?? []; - foreach (array_merge($lockData['packages'], $lockData['packages-dev']) as $package) { + $packages = $lockData['packages']; + if (getenv('COMPOSER_DEV_MODE') !== '0') { + $packages = array_merge($packages, $lockData['packages-dev']); + } + foreach ($packages as $package) { yield $package['name'] => $package['version'] . '@' . ( $package['source']['reference'] ?? $package['dist']['reference'] ?? '' );