composer/package-versions-deprecated
Architecture fit: This package is a legacy shim for Composer version resolution, designed as a temporary bridge for Composer 1→2 migration on PHP <7.4. It has no place in modern architectures since Composer 2.2+ natively provides Composer\InstalledVersions functionality. Its runtime file generation (via Versions.php) adds unnecessary complexity and conflicts with modern Composer optimizations like --classmap-authoritative.
Integration feasibility: Technically feasible for legacy projects stuck on PHP 7.0-7.3 with Composer 2 dependencies, but strongly discouraged for new integrations. The package requires special Composer flags (--optimize-autoloader) to avoid performance issues and has known conflicts with --no-scripts and global installations. Modern projects should use native Composer APIs instead.
Technical risk: High. The package is officially deprecated with no security updates. Key risks include:
Composer\InstalledVersions collisions)--no-dev installs and PHAR contextsE_USER_DEPRECATED warnings that break strict error handlingKey questions:
Composer\InstalledVersions before Composer 2.3+)PackageVersions\Versions::getVersion() calls must be migrated)Stack fit: Only suitable for temporary use in legacy PHP 7.0-7.3 projects where Composer 2 is required but PHP upgrade isn't possible. Never use in PHP 7.4+ or Composer 2.2+ environments. Modern stacks (Symfony 5.4+, Laravel 9+, Composer 2.2+) should never install this package.
Migration path:
PackageVersions\Versions usage (e.g., grep -r 'PackageVersions\\Versions' .)Composer\InstalledVersions::getVersion('package/name')composer --version)composer/package-versions-deprecated from composer.jsoncomposer update --with-all-dependencies to clean up dependenciescomposer dump-autoload --optimize to regenerate autoloadersCompatibility:
composer/package-versions v1.* during upgrades--no-dev without workaroundsSequencing:
Composer\InstalledVersionsHow can I help you explore Laravel packages today?