- Is asgoodasnu/version-bundle compatible with Laravel?
- Not natively. It is a Symfony bundle that registers through the Symfony kernel, exposes values via the DI container, and ships a Twig extension; Laravel has no bundle registration step, Twig, or config/bundles.php. There is no extra.laravel autodiscovery. Treat it as a specification for a small Laravel capability rather than a dependency.
- How do I install asgoodasnu/version-bundle with Composer?
- For a Symfony application you would add it with Composer and register the bundle in the kernel, following the bundle's setup. In a Laravel application there is nothing to autodiscover and Composer will pull Symfony and Twig dependencies for a feature Laravel does not use. The practical approach is not to install it in Laravel and instead implement the same version metadata behavior with config/version.php, a container-bound value object, and a Blade directive.
- Which Laravel versions does this package support?
- None are officially supported because the package targets Symfony and does not declare Laravel integration. Its PHP and Symfony constraints, not a Laravel version matrix, determine installability. If you need Laravel 10, 11, or 12 support, that support has to come from your own port or a Laravel-specific package.
- How do I show the app version in a Blade template?
- The package provides a Twig extension, not a Blade directive, so it cannot render directly in Blade. In Laravel, bind a Version value object as a singleton and add a small Blade directive such as @version that reads from it. That mirrors the original package's view-helper ergonomics without bringing Twig into the application.
- How is the version source configured in asgoodasnu/version-bundle?
- The bundle centralizes version metadata behind a configurable version source and display format, so the active version can be surfaced consistently in templates, diagnostics, and deployment checks. The exact source depends on how the Symfony bundle is configured in a given app. For a Laravel port, read APP_VERSION, APP_COMMIT, and APP_BUILT_AT from environment variables or image labels and keep the formatting logic in one config file.
- Can I use it to expose a cacheable /version endpoint in production?
- The package does not give Laravel a route or controller for a /version endpoint. You can add a cacheable GET /version that returns flat JSON outside auth only if the payload is safe to expose publicly. Keep it low overhead and ensure the value is injected by the build pipeline rather than read from git at runtime.
- Does asgoodasnu/version-bundle handle entity versioning or audit history?
- No. The repository describes application build metadata such as semver, build number, and commit hash, not record-level versioning with audit history. Those are different features with different storage, concurrency, and compliance implications. Confirm which requirement you are evaluating before making a build-versus-buy decision.
- What Composer or PHP constraint conflicts can this package cause in a Laravel app?
- Adding it can pull symfony/* and twig/twig into composer.json, which invites constraint conflicts and can pin PHP ranges. An abandoned package becomes a blocker when you upgrade Laravel or PHP. The capability is small enough that the dependency buys little compared with a local implementation.
- How should I test a Laravel version metadata implementation?
- Test that config/version.php resolves the expected values from environment variables, that the Version object is bound as a singleton, and that the Blade directive renders the formatted version. Add a feature test for the /version JSON response and its cache headers if you expose an endpoint. Also assert that a production build cannot silently ship a dev default.
- What should I use instead if asgoodasnu/version-bundle is unmaintained?
- The package has zero stars and zero dependents and no stated release cadence, so treat abandonment as a real risk. The safest alternative is a small in-app Laravel implementation: config/version.php, a Version value object, a Blade directive, and an optional cacheable JSON endpoint. If you ever fork the original, record a named owner, confirm the license permits it, and set a review date.