NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #1517 most downloaded on Packagist
Provides efficient querying for installed package versions (no runtime IO)
Latest stable
2.12.0
Last release 6 months ago
21 May 2026
Ships fairly regularly
a new release about every 6 months
Nearly every release is documented
notes for 43 of 43 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
43 releases · first in 2016
Drag across the ruler to compare, or tap a release to open it.
Total pull requests resolved: 3
Feature release (minor)
Total pull requests resolved: 4
Feature release (minor)
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Total pull requests resolved: 4
Feature release (minor)
Total pull requests resolved: 2
Feature release (minor)
Total pull requests resolved: 4
Feature release (minor)
Total pull requests resolved: 6
Feature release (minor)
laminas/laminas-ci-matrix-action thanks to @OcramiusTotal pull requests resolved: 11
Feature release (minor)
Total pull requests resolved: 1
2.5.x bugfix release (patch)
Total pull requests resolved: 6
Feature release (minor)
composer/composer:2.2.0, trust dealerdirect/phpcodesniffer-composer-installer and run everything in CI with --no-interaction thanks to @OcramiusTotal pull requests resolved: 1
2.4.x bugfix release (patch)
Total pull requests resolved: 2
Total pull requests resolved: 1
Total pull requests resolved: 1
.gitattributes to avoid exporting phpcs artifacts thanks to @reedyTotal pull requests resolved: 1
This release is mostly a cleanup to keep the test setup and CI pipelines small in size and manageable long-term, since maintaining both PHP 7 and PHP
This release is mostly a cleanup to keep the test setup and CI pipelines small in size and manageable long-term, since maintaining both PHP 7 and PHP 8 support would (due to dependencies) become quite a lot of long-term effort otherwise.
If, for some reason, you require to run both PHP 7 and PHP 8 in different
environments, use ocramius/package-versions:2.1.0, which supports both.
php:^7.4.7 support - switch to only php:~8.0.0 thanks to @OcramiusTotal pull requests resolved: 1
In addition to that, we now actively replace composer/package-versions-deprecated, which is constantly causing issues in installation, and which is fu…
This patch explicitly adds php:~8.0.0 support along with php:^7.4.7.
phpunit/phpunit had to also be upgraded, so that it does not contain symbols
that clash with the php:8.0.0 parser BC breaks.
To do so, we had to disable infection/infection reporting for now, as the
mutation testing setup is not yet capable of working with phpunit/phpunit:^9.3.
In addition to that, we now actively replace composer/package-versions-deprecated,
which is constantly causing issues in installation, and which is fully replaced by
this specific package. If you run composer/composer:^2.0 and php:8.0.0, there is
no reason to use composer/package-versions-deprecated anyway.
Please note that the support for PHP is limited to php:^7.4.7 || php:~8.0.0: php:8.1.0
is NOT supported by this release, as the upstream ecosystem is just too unstable
and regularly breaks BC in multiple ways. Once php:8.1.0-rc2 is out (possibly next year),
work will be done to support that too.
php:8.0.* support thanks to @OcramiusTotal pull requests resolved: 1
155: BC break: removed deprecated `PackageVersions\Versions::ROOT_PACKAGE_NAME` constant thanks to @Ocramius
This release turns the package into a library (previously, it was a composer plugin).
Relevant change is that the PackageVersions\Versions::ROOT_PACKAGE_NAME
constant no longer exists: please use PackageVersions\Versions::rootPackageName()
instead.
This slims down the complexity of the package massively, and removes multiple known bugs.
Total issues resolved: 5
src/Packages/Versions.php changes detected in composer install thanks to @TaluuPackageVersions\Versions::ROOT_PACKAGE_NAME constant thanks to @OcramiusRelease 2.0.0
This release turns the package into a library (previously, it was a composer plugin).
Relevant change is that the PackageVersions\Versions::ROOT_PACKAGE_NAME
constant no longer exists: please use PackageVersions\Versions::rootPackageName()
instead.
This slims down the complexity of the package massively, and removes multiple known bugs.
"type": "library" composer package thanks to @OcramiusPackageVersions\Versions::ROOT_PACKAGE_NAME constant thanks to @Ocramius and @alexgit2kTotal pull requests resolved: 1
Release 1.11.0
Total pull requests resolved: 1
Release 1.10.2
--no-scripts thanks to @Ocramius and @stofIntroduced release automation tooling, which should also help us with keeping the changelog up-to-date long-term.
Introduced release automation tooling, which should also help us with keeping the changelog up-to-date long-term.
Release 1.10.1
This release increases the minimum supported version of composer to v2 (currently in alpha, but you should REALLY try it out).
This release increases the minimum supported version of composer to v2 (currently in alpha,
but you should REALLY try it out).
By doing so, the code has been massively reduced, and a few relevant bugs around the detected installed package versions have been squished in the process.
In order to upgrade, you must first have composer v2 installed, which you can get by runnning
its self-update tooling: composer self-update --2.
You can look at the in-depth thought-process behind this patch at https://www.twitch.tv/videos/640893205
Total issues resolved: 5
composer-runtime-api:^2.0 and no longer keep an internal generated map thanks to @Ocramius136: PHPUnit update - use better assertion names, remove deprecations thanks to @michalbundyra
This release allows ocramius/package-version to skip writing the Version class when the
vendor directory is locked/not writable.
Total issues resolved: 2
This release adds forward-compatibility for composer/composer:2.0.0.
This release adds forward-compatibility for composer/composer:2.0.0.
Total issues resolved: 1
This release adds @psalm-pure to the generated version of PackageVersions\Versions. Please note that if you run your composer installation with --no-s
This release adds @psalm-pure to the generated version of
PackageVersions\Versions. Please note that if you run your
composer installation with --no-scripts and --no-plugins, then the fallback
version of PackageVersions\Versions will be in use, and
therefore purity is not guaranteed.
Total issues resolved: 1
115: Allow using internal/deprecated symbols, but only in the test suite thanks to @Ocramius
This release upgrades dependencies, improves testing/static analysis checks, and moves the package to PHP 7.4 as a minimum required engine version.
Total issues resolved: 4
This release fixes an issue leading FallbackVersions (used when installing with --no-scripts) to fail to detect composer.lock or installed.json locati
This release fixes an issue leading FallbackVersions (used when installing with
--no-scripts) to fail to detect composer.lock or installed.json locations
due to getcwd() misbehavior during composer installation.
Total issues resolved: 2
composer.lock nor installed.json when using package with --no-scripts thanks to @PhilETaylorinstalled.json and composer.json thanks to @Ocramius92: Failures on PHP 7.4 build due to `ReflectionType#__toString()` deprecations thanks to @Ocramius
This release improves discovery of versions when composer.lock cannot be
located, falling back to installed.json (which is at a fixed relative filesystem
location).
We removed duplicate plugin runs during install/update, and runs
the plugin only during the POST_AUTOLOAD_DUMP event.
The minimum supported PHP version is now PHP 7.3.0.
PHP 7.4 compatibility issues with ReflectionType#__toString() have been fixed.
Static analysis additions will also now start highlighting issues in downstream
projects using vimeo/psalm (at build-time) when non-existing dependency
lookups are performed against PackageVersions\Versions::getVersion(), preventing
useless runtime exceptions.
Total issues resolved: 12
Versions::VERSION thanks to @staabmvendor/composer/installed.json and fallback to using composer.lock thanks to @9ae8sdf76doctrine/coding-standard v6.0.0 thanks to @carusogabriel@psalm-param key-of<self::VERSIONS> type-check for downstream thanks to @Ocramiuscomposer dump-autoload thanks to @staabmReflectionType#__toString() deprecations thanks to @OcramiusPOST_AUTOLOAD_DUMP event also happens on composer install/update thanks to @staabm113: Fix incorrect lookup path for `installed.json` thanks to @ArondeParon
This release ports the ability to rely on installed.json when composer.json is not available to the stable 1.4.x branch.
This release ports the ability to rely on installed.json when composer.json is not available
to the stable 1.4.x branch.
Total issues resolved: 1
This release makes writes to the Version class file atomic, and makes sure that access rights/flags are also correctly set when the versions are being
This release makes writes to the Version class file atomic,
and makes sure that access rights/flags are also correctly set when
the versions are being generated.
Total issues resolved: 6
Support for self.version and replace composer settings and constraints, which are now correctly considered and substituted with their actual versions.
In this release:
self.version and replace composer settings and constraints,
which are now correctly considered and substituted with their actual versions.PackageVersions\Versions::ROOT_PACKAGE_NAME constant, which is
populated with the name of the root package, if available.Total issues resolved: 5
This release was tested against PHP 7.2, improves the CI and testing setup and improves the displayed version for the root package by using the packag
This release was tested against PHP 7.2, improves the CI and testing setup and improves the displayed version for the root package by using the package pretty version rather than an unresolved one.
Total issues resolved: 5
This release fixes a bug that caused PackageVersions to prevent the composer remove and composer update commands to fail when this package is removed.
This release fixes a bug that caused PackageVersions to prevent
the composer remove and composer update commands to fail when
this package is removed.
In addition to that, mutation testing has been added to the suite, ensuring that the package is accurately and extensively tested.
Total issues resolved: 3
This release fixes a bug that caused PackageVersions to be enabled even when it was part of a globally installed package.
This release fixes a bug that caused PackageVersions to be enabled even when it was part of a globally installed package.
Total issues resolved: 3
This release removes the `"files"` directive from `composer.json`, as it is no longer needed for composer install --classmap-authoritative. Also, that
This release removes the "files" directive from
composer.json,
as it is no longer needed for composer install --classmap-authoritative.
Also, that directive was causing issues with HHVM installations, since
PackageVersions is not compatible with it.
Total issues resolved: 1
This release introduces support for running composer install --classmap-authoritative and composer install --no-scripts. Please note that performance
This release introduces support for running composer install --classmap-authoritative
and composer install --no-scripts. Please note that performance
while using these modes may be degraded, but the package will
still work.
Additionally, the package was tuned to prevent the plugin from running twice at installation.
Total issues resolved: 10
This release includes a fix/workaround for composer/composer#5237, which causes ocramius/package-versions to sometimes generate a Versions class with
This release includes a fix/workaround for composer/composer#5237, which causes ocramius/package-versions to sometimes generate a Versions class with malformed name (something like Versions_composer_tmp0) when running composer require <package-name>.
Total issues resolved: 2
This release fixes an issue related to concurrent autoloader re-generation caused by multiple composer plugins being installed. The issue was solved b
This release fixes an issue related to concurrent autoloader re-generation caused by multiple composer plugins being installed. The issue was solved by removing autoloader re-generation from this package, but it may still affect other packages.
It is now recommended that you run composer dump-autoload --optimize after installation when using this particular package.
Please note that composer (install|update) -o is not sufficient to avoid autoload overhead when using this particular package.
Total issues resolved: 1
This release fixes issues related to installing the component without any dev dependencies or with packages that don't have a source or dist reference
This release fixes issues related to installing the component without
any dev dependencies or with packages that don't have a source or dist
reference, which is usual with packages defined directly in the
composer.json.
Total issues resolved: 3
This release fixes an issue related with composer updates to already installed versions. Using composer require within a package that already used ocr
This release fixes an issue related with composer updates to already installed versions. Using composer require within a package that already used ocramius/package-versions caused the installation to be unable to write the PackageVersions\Versions class to a file.
Total issues resolved: 6
First stable release of ocramius/package-versions.
One column per quarter.