Weave 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

Laravel Version Laravel Package

othercode/laravel-version

A small Laravel package for managing and displaying your application's version information. Use it to keep a single version source, expose the current version in your app, and reference it from config, views, or health and about endpoints.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • The package implements a port-adapter (hexagonal) pattern around a single concern: resolving an application version string. That is architecturally clean but disproportionate for most Laravel apps, where config('app.version') or a single VERSION file read is sufficient.
  • It fits well where the source of truth legitimately varies by environment: config array in local dev, env var in containerized deploys, git tag in CI-built artifacts, VERSION file in released tarballs. That is a real, recurring problem in multi-environment release pipelines.
  • Coupling is low by design. A resolver contract with swappable sources is easy to bind in a service provider and easy to remove later. The blast radius of adoption is small.
  • It does not solve the harder adjacent problems (build-time stamping, artifact immutability, version drift between deploy targets). It reads a version; it does not guarantee one.

Integration feasibility

  • Standard Composer install with Laravel package auto-discovery is the expected shape. Verify composer.json for illuminate/support constraints and PHP floor before committing.
  • Expected surface: one service provider, one facade or container binding, a publishable config file. That is a day-one integration at most, likely an hour.
  • Validation work is mostly environmental, not code: confirm each source adapter behaves correctly inside the actual runtime — Docker images frequently lack .git, so a git-tag adapter must have a documented fallback and a clear failure message.

Technical risk

  • Primary risk: provenance. 0 stars, 0 dependents, 0 known consumers means zero external validation. No production track record, no issue history to mine for edge cases, no third-party audit.
  • Bus factor of one. No indication of maintainer depth. For a package this small that is survivable — the code is likely a few hundred lines and forkable — but it must be treated as vendored-risk, not vendor-supported.
  • Maintenance signal is unknown. Last commit date, Laravel 10/11/12 support, and PHP 8.2/8.3 compatibility are the gating checks. A version resolver that breaks on a framework upgrade is an annoying, avoidable outage.
  • Semantic risk. "Version" means different things to product, ops, and support. Adopting a tool without agreeing on the definition (semver release? build SHA? deploy timestamp?) invites downstream confusion in bug reports and support tickets.
  • Low security risk by construction — no network calls, no auth, no data persistence — assuming the git adapter shells out safely and does not interpolate untrusted input.

Key questions

  1. Which Laravel and PHP versions are declared and actually tested in CI?
  2. What is the last release date, and is there a tagged release at all, or only dev-main?
  3. Does the git-tag adapter invoke a shell command, and how does it fail when .git is absent or git is not installed?
  4. Is resolution cached, or does every resolve() call hit the filesystem or spawn a process?
  5. What is the fallback order when multiple sources are configured and one is missing — throw, log, or silently degrade?
  6. Is there a facade, and is the binding singleton or per-call?
  7. Does it interact correctly with php artisan config:cache and optimize?

Integration Approach

Stack fit

  • Natural fit for Laravel services on a conventional CI/CD pipeline: git tag available at build, env var injected at deploy, config array for local. That is precisely the matrix this package targets.
  • Poor fit if the platform is serverless or container-based with .git stripped and no env var injection discipline — the git and file adapters will be dead weight, leaving only env/config, which a one-line config entry already covers.

Migration path

  • Adopt incrementally, not as a refactor. Bind the resolver behind an existing accessor (a app.version config key or a helper) so call sites do not change and rollback is a config revert.
  • Do not touch existing version-reporting code paths (health endpoints, admin footers, Sentry release tags) until the resolver is proven to return identical values in every environment.
  • Removal is trivial: delete the dependency and inline the one source that mattered. Keep the integration narrow enough that this stays true.

Compatibility

  • Verify the composer.json constraint matrix against the target Laravel version before merge; this is the single most likely blocker and it is a five-minute check.
  • Confirm auto-discovery works and there is no manual provider registration or conflicting binding name.
  • Check for namespace collisions with any in-house version helpers, which are common in mature Laravel codebases.

Sequencing

  1. Spike (half day): install in a branch, wire all four adapters, run in local, CI, and a built container. Record actual returned values per environment.
  2. Decision gate: if any adapter fails in the containerized target — the most common production shape — reduce scope to env-plus-config and reassess whether the dependency earns its place.
  3. Pilot (one service): integrate behind the existing accessor in a single low-risk service. Ship and observe for one release cycle.
  4. Standardize: only after the pilot, codify the source-of-truth convention (which environment uses which adapter) as written policy, not tribal knowledge.
  5. Broaden: replicate to additional services only if the convention holds without per-service exceptions.

Operational Impact

Maintenance

  • Code footprint is small enough that the team can fork and own it if the maintainer goes dark. Budget for that contingency rather than assuming upstream support.
  • Ongoing cost is near zero until a Laravel major upgrade, at which point the constraint may need a fork-and-bump. Flag it on the dependency-review list alongside any other single-maintainer packages.
  • Pin to a tagged release. Do not float on dev-main for something that stamps your release identifiers.

Support

  • Community-only, no SLA, no commercial backing. Escalation path is "read the source," which is viable here only because the source is small.
  • Assign a named internal owner. An unowned dependency that determines what version number appears in production logs and support tickets is a quiet organizational risk.

Scaling

  • Negligible runtime cost at any realistic scale, provided resolution is cached or bound as a singleton. Confirm this — an uncached git describe subprocess per request would be a genuine performance defect.
  • Horizontal scaling is unaffected: no shared state, no external calls, no storage.
  • Failure does not degrade gracefully unless configured to. A resolver that throws on a missing source will take down health endpoints; that must be caught and defaulted.

Failure modes

  • Missing source file: VERSION absent from a container build. Symptoms: exception or empty version in logs. Mitigation: explicit fallback chain plus a startup assertion.
  • Git unavailable: .git stripped or binary absent in slim base images — the most likely real-world failure. Mitigation: never make git the sole production source; treat it as build-time only.
  • Env var drift: source resolves different values across environments, producing misleading version strings in error reports. Mitigation: a single CI check comparing resolved version to the expected release tag.
  • Config cache staleness: published config changes not reflected after config:cache. Mitigation: standard deploy-time cache rebuild, already typical.
  • Silent wrong answer: worse than an error — a stale or defaulted version that sends support down the wrong path. Prefer loud failure in non-production, safe default in production, and log the source used.

Ramp-up

  • Near zero for a Laravel developer: install, publish config, choose a source. Under an hour to first working resolution.
  • The real onboarding cost is the convention, not the code. Teams need a written rule for which adapter applies in which environment, plus a documented fallback order.
  • No new concepts for the team beyond the port-adapter vocabulary, which is already familiar to anyone who has used Laravel's contracts.

TPM summary: Low technical risk in isolation, moderate supply-chain risk from the provenance profile (0 stars, 0 dependents, single maintainer). Worth a half-day spike if the multi-source version problem is genuinely present; not worth adopting as a general-purpose dependency for a problem a single config key already solves. Gate adoption on the containerized-environment test and on confirming Laravel/PHP constraint compatibility.

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.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings