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

Technical Evaluation

Architecture fit: This package integrates seamlessly with Laravel's Composer-based dependency management. It operates as a lightweight library (post-2.0.0) that generates static version metadata during composer install, avoiding runtime I/O. Laravel's standard production deployments always include composer.lock, making it a natural fit for version-dependent asset generation or runtime diagnostics without architecture conflicts.

Integration feasibility: High. Requires only composer require and follows Laravel's existing Composer workflow. The package's optimization recommendation (optimize-autoloader) aligns with Laravel's production best practices. No complex configuration or bootstrapping needed—simply call Versions::getVersion() where version data is required.

Technical risk: Low. The package has extensive testing (mutation coverage, type coverage), active maintenance (2.11.0 release in 2025), and resolved historical issues (e.g., Composer plugin conflicts fixed in 2.0.0). Primary risk is missing composer.lock in deployment (non-standard for Laravel), but this is a deployment failure rather than package flaw. PHP 8.1+ compatibility matches modern Laravel versions.

Key questions:

  • How should we handle environments where composer.lock is intentionally omitted (e.g., dynamic deployment scenarios)?
  • What are the implications for monorepo or multi-project Composer setups within Laravel?
  • Are there edge cases where version metadata generation fails during composer install in Laravel-specific contexts (e.g., custom installer scripts)?

Integration Approach

Stack fit: Perfect alignment with Laravel's Composer-driven dependency management. The package operates entirely within Composer's lifecycle, leveraging composer.lock as its data source—exactly how Laravel manages dependencies. No framework-specific adjustments needed; it complements existing Laravel tooling (e.g., artisan commands, deployment scripts).

Migration path: Minimal. Add to composer.json and run composer update. Existing Laravel projects can adopt it incrementally—start with non-critical features (e.g., version-aware logging) before expanding to core functionality. The static class generation occurs automatically during install, requiring no code changes to existing Laravel services.

Compatibility: Fully compatible with Laravel 8+ (PHP 8.0+). The package supports PHP 8.1–8.5 (per 2.11.

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