{"id":13617378,"url":"https://github.com/Ocramius/PackageVersions","last_synced_at":"2025-04-14T06:33:33.440Z","repository":{"id":3634547,"uuid":"50372644","full_name":"Ocramius/PackageVersions","owner":"Ocramius","description":" :package: Composer addon to efficiently get installed packages' version numbers","archived":false,"fork":false,"pushed_at":"2025-04-08T06:56:25.000Z","size":1154,"stargazers_count":3204,"open_issues_count":4,"forks_count":69,"subscribers_count":20,"default_branch":"2.11.x","last_synced_at":"2025-04-08T08:07:56.145Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ocramius.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["Ocramius"]}},"created_at":"2016-01-25T18:48:05.000Z","updated_at":"2025-04-08T06:55:54.000Z","dependencies_parsed_at":"2023-01-16T19:15:49.909Z","dependency_job_id":"c1ee25c6-e376-4565-8ace-7db32ffd46fb","html_url":"https://github.com/Ocramius/PackageVersions","commit_stats":{"total_commits":649,"total_committers":26,"mean_commits":24.96153846153846,"dds":0.539291217257319,"last_synced_commit":"c621d1dd8e7d50a68c8baedbb9bb0fb593348f5f"},"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ocramius%2FPackageVersions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ocramius%2FPackageVersions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ocramius%2FPackageVersions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ocramius%2FPackageVersions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ocramius","download_url":"https://codeload.github.com/Ocramius/PackageVersions/tar.gz/refs/heads/2.11.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248834872,"owners_count":21169100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T20:01:40.784Z","updated_at":"2025-04-14T06:33:33.143Z","avatar_url":"https://github.com/Ocramius.png","language":"PHP","funding_links":["https://github.com/sponsors/Ocramius","https://tidelift.com/badges/github/packagist/ocramius%2Fpackage-versions","https://tidelift.com/subscription/pkg/packagist-ocramius%2Fpackage-versions?utm_source=packagist-ocramius%2Fpackage-versions\u0026utm_medium=readme","https://tidelift.com/subscription/pkg/packagist-ocramius-package-versions?utm_source=packagist-ocramius-package-versions\u0026utm_medium=referral\u0026utm_campaign=enterprise\u0026utm_term=repo"],"categories":["PHP","Composer","Plugins"],"sub_categories":["PRC","Support"],"readme":"# Package Versions\n\n## A message to Russian 🇷🇺 people\n\nIf you currently live in Russia, please read [this message](./ToRussianPeople.md).\n\n### Purpose\n\nThis utility provides quick and easy access to version information of composer dependencies.\n\nThis information is derived from the ```composer.lock``` file which is (re)generated during ```composer install``` or ```composer update```.\n\n```php\n$version = \\PackageVersions\\Versions::getVersion('ocramius/package-versions');\n\nvar_dump($version); // 1.0.0@0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33\n```\n\n[![Mutation testing badge](https://img.shields.io/endpoint?style=flat\u0026url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2FOcramius%2FPackageVersions%2F2.0.x)](https://dashboard.stryker-mutator.io/reports/github.com/Ocramius/PackageVersions/2.0.x)\n[![Type Coverage](https://shepherd.dev/github/Ocramius/PackageVersions/coverage.svg)](https://shepherd.dev/github/Ocramius/PackageVersions)\n[![Downloads](https://img.shields.io/packagist/dt/ocramius/package-versions.svg)](https://packagist.org/packages/ocramius/package-versions)\n[![Packagist](https://img.shields.io/packagist/v/ocramius/package-versions.svg)](https://packagist.org/packages/ocramius/package-versions)\n[![Dependencies](https://tidelift.com/badges/github/packagist/ocramius%2Fpackage-versions)](https://tidelift.com/subscription/pkg/packagist-ocramius%2Fpackage-versions?utm_source=packagist-ocramius%2Fpackage-versions\u0026utm_medium=readme)\n\n### Installation\n\n```sh\ncomposer require ocramius/package-versions\n```\n\nIt is suggested that you use [an optimized composer autoloader](https://getcomposer.org/doc/06-config.md#optimize-autoloader) (to prevent autoload I/O when accessing the `PackageVersions\\Versions` API) in your composer.json:\n\n```json\n...\n    \"config\": {\n        \"optimize-autoloader\": true\n    },\n...\n```\n\nIn case you manually generate your autoloader via the CLI use the `--optimize` flag:\n\n```sh\ncomposer dump-autoload --optimize\n```\n\n### Use-cases\n\nThis repository implements `PackageVersions\\Versions::getVersion()` in such a way that no IO\nhappens when calling it, because the list of package versions is compiled during composer\ninstallation.\n\nThis is especially useful when you want to generate assets/code/artifacts that are computed from\nthe current version of a certain dependency. Doing so at runtime by checking the installed\nversion of a package would be too expensive, and this package mitigates that.\n\n## ocramius/package-versions for enterprise\n\nAvailable as part of the Tidelift Subscription.\n\nThe maintainer of ocramius/package-versions and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-ocramius-package-versions?utm_source=packagist-ocramius-package-versions\u0026utm_medium=referral\u0026utm_campaign=enterprise\u0026utm_term=repo).\n\nYou can also contact the maintainer at ocramius@gmail.com for looking into issues related to this package\nin your private projects.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOcramius%2FPackageVersions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOcramius%2FPackageVersions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOcramius%2FPackageVersions/lists"}