[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-8558":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":16,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":16,"starSnapshotCount":16,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},8558,"PackageVersions","Ocramius\u002FPackageVersions","Ocramius"," :package: Composer addon to efficiently get installed packages' version numbers","",null,"PHP",3179,73,17,1,0,27.61,"MIT License",false,"2.12.x",true,[],"2026-06-12 02:01:55","# Package Versions\n\n## A message to Russian 🇷🇺 people\n\nIf you currently live in Russia, please read [this message](.\u002FToRussianPeople.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\u002Fpackage-versions');\n\nvar_dump($version); \u002F\u002F 1.0.0@0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33\n```\n\n[![Mutation testing badge](https:\u002F\u002Fimg.shields.io\u002Fendpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2FOcramius%2FPackageVersions%2F2.0.x)](https:\u002F\u002Fdashboard.stryker-mutator.io\u002Freports\u002Fgithub.com\u002FOcramius\u002FPackageVersions\u002F2.0.x)\n[![Type Coverage](https:\u002F\u002Fshepherd.dev\u002Fgithub\u002FOcramius\u002FPackageVersions\u002Fcoverage.svg)](https:\u002F\u002Fshepherd.dev\u002Fgithub\u002FOcramius\u002FPackageVersions)\n[![Downloads](https:\u002F\u002Fimg.shields.io\u002Fpackagist\u002Fdt\u002Focramius\u002Fpackage-versions.svg)](https:\u002F\u002Fpackagist.org\u002Fpackages\u002Focramius\u002Fpackage-versions)\n[![Packagist](https:\u002F\u002Fimg.shields.io\u002Fpackagist\u002Fv\u002Focramius\u002Fpackage-versions.svg)](https:\u002F\u002Fpackagist.org\u002Fpackages\u002Focramius\u002Fpackage-versions)\n[![Dependencies](https:\u002F\u002Ftidelift.com\u002Fbadges\u002Fgithub\u002Fpackagist\u002Focramius%2Fpackage-versions)](https:\u002F\u002Ftidelift.com\u002Fsubscription\u002Fpkg\u002Fpackagist-ocramius%2Fpackage-versions?utm_source=packagist-ocramius%2Fpackage-versions&utm_medium=readme)\n\n### Installation\n\n```sh\ncomposer require ocramius\u002Fpackage-versions\n```\n\nIt is suggested that you use [an optimized composer autoloader](https:\u002F\u002Fgetcomposer.org\u002Fdoc\u002F06-config.md#optimize-autoloader) (to prevent autoload I\u002FO 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\u002Fcode\u002Fartifacts 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\u002Fpackage-versions for enterprise\n\nAvailable as part of the Tidelift Subscription.\n\nThe maintainer of ocramius\u002Fpackage-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:\u002F\u002Ftidelift.com\u002Fsubscription\u002Fpkg\u002Fpackagist-ocramius-package-versions?utm_source=packagist-ocramius-package-versions&utm_medium=referral&utm_campaign=enterprise&utm_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","Ocramius\u002FPackageVersions 是一个 Composer 扩展，用于高效获取已安装包的版本号。它通过解析 `composer.lock` 文件来提供依赖包版本信息的快速访问接口，如 `\\PackageVersions\\Versions::getVersion('package_name')`，从而避免了运行时的 I\u002FO 操作。此项目特别适用于需要基于当前依赖版本生成资产、代码或工件的场景，能够显著提升性能。采用 PHP 编写，并遵循 MIT 许可证发布，具有良好的类型覆盖率和测试覆盖率。",2,"2026-06-11 03:18:37","top_language"]