diff --git a/bin/find-composer-packages.php b/bin/find-composer-packages.php index a6a71a3..2935770 100755 --- a/bin/find-composer-packages.php +++ b/bin/find-composer-packages.php @@ -76,10 +76,10 @@ function getPackageForClass(ClassLoader $loader, string $class) ?? null; if ($depVersion === null) { $version = \Composer\InstalledVersions::getVersion($package); - $depVersion = substr($version, 0, strrpos($version, '.')); + $depVersion = '^' . substr($version, 0, strrpos($version, '.')); } $done[$package] = true; - echo "\"$package\": \"^$depVersion\"\n"; + echo "\"$package\": \"$depVersion\"\n"; } catch (OutOfBoundsException $exception) { // ignore package }