Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Package Versions Laravel Package

ocramius/package-versions

Fast, zero‑I/O access to Composer dependency versions at runtime. Reads version data compiled from composer.lock during install/update, so calls are cheap. Use PackageVersions\Versions::getVersion('vendor/package') to embed or log exact versions.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Enables efficient runtime access to dependency version information without I/O overhead, critical for features like version-aware caching, debugging endpoints, and deployment validation.
  • Eliminates need to build custom version-checking logic (build vs buy), reducing technical debt and maintenance costs.
  • Supports use cases where dependency versions must be dynamically referenced in application logic (e.g., generating cache keys based on specific package versions, or displaying dependency details in admin panels).

When to Consider This Package

  • Adopt when your PHP project uses Composer and requires runtime access to installed package versions for performance-sensitive operations (e.g., caching, diagnostics, or deployment scripts).
  • Consider if you need to avoid runtime I/O for version checks (e.g., in high-throughput applications where reading composer.lock on each request would be costly).
  • Look elsewhere if your project doesn't use Composer, if version checks are only needed during build time (e.g., CI/CD), or if you need dependency tree analysis (use tools like composer show instead).

How to Pitch It (Stakeholders)

  • Executives: "This lightweight package solves a critical performance bottleneck for version-dependent features. By eliminating runtime I/O for dependency version checks, it ensures our application scales efficiently while reducing development time—freeing engineering resources for higher-value work. Backed by Tidelift for enterprise support and proven in production with 3K+ stars."
  • Engineering: "Simple Composer dependency with zero runtime overhead. Pre-compiles version data during installation, so calls to Versions::getVersion() are in-memory and blazing fast. Handles edge cases like --classmap-authoritative installs and has active maintenance (security updates, PHP 8.5 support). Integrates in minutes with no code changes beyond a single method call."
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation
uri-template/tests