- How do I install vaslv/filament-app-version in a Laravel Filament panel?
- Install it with composer require vaslv/filament-app-version, then register the plugin on the relevant panel in your PanelProvider using the panel's plugin() method. Optionally publish the config file to pin the version source order. There are no migrations, routes, or middleware to add, so setup is usually a few minutes of work.
- Which Filament versions does filament-app-version support?
- This is a Filament panel plugin, so it is coupled to Filament major versions. Filament v4 changed plugin and render-hook conventions, and small packages often lag a major release, so check the filament/filament constraint in the package's composer.json rather than trusting the README. Test in a staging panel before rolling it out on an unverified major.
- What is the version source priority order in filament-app-version?
- The resolver walks a priority chain that typically starts with explicit config, then APP_VERSION from the environment, composer.json, git tags, and package.json. The exact order lives in the published config, so you can reorder sources or pin a single one. In production the practical sources are usually config and APP_VERSION, which is why your deploy pipeline should set that variable.
- Does filament-app-version work with multiple Filament panels?
- Yes. It registers per panel through the PanelProvider's plugin() method, so multi-panel applications can enable it selectively. A sensible default is internal or ops panels only, since customer-facing panels can disclose an exact build identifier you may not want public.
- How do I hide the app version chip from guests in Filament?
- The chip is hidden from unauthenticated users by default, which is the safer behaviour. Confirm in the config file whether the guest gate is configurable per panel for your installed version. If you make it visible on a public-facing panel, guests can read the exact version string, which helps attackers correlate to known CVEs in that release.
- Does filament-app-version cache the resolved version string?
- The resolver may read composer.json or shell out to git, so per-request filesystem I/O on every authenticated page load is the main performance concern. Check whether the resolved string is cached and whether the cache key and TTL are configurable. If caching is absent, wrap resolution in a cached accessor or pin APP_VERSION via config so it becomes a simple config read.
- What happens if no version source is found or resolution fails?
- Behaviour when every source misses should be graceful, such as a blank or unknown chip, rather than an exception that breaks panel rendering. Verify this in your installed version, because a throwing resolver inside a render hook could break authenticated pages. Pinning a config value or APP_VERSION removes the ambiguity entirely.
- Can I change the chip colour to match my Filament panel theme?
- The chip inherits the panel's primary colour palette, so it generally matches custom themes without extra styling. Check contrast against your palette, especially with light or low-contrast primary colours, and confirm any label i18n if you run a non-English admin. Accessibility for small chips is easy to overlook in review.
- Will the version chip work in production where there is no .git directory?
- Git tag resolution usually fails in production because deploy artefacts often contain no .git directory. The reliable fix is a build-time APP_VERSION injected by your release pipeline, for example semver plus a short SHA, so config or env resolution always succeeds. Treat that as a process dependency of your deployment, not something the package can solve alone.
- Is vaslv/filament-app-version maintained, and what is the fallback if it is abandoned?
- Adoption risk is higher than code risk here: it is a small, single-author package with few stars and dependents, so treat it as effectively unmaintained until proven otherwise. The blast radius is contained, and the fallback is roughly a 40-line Blade component plus a render hook. Any custom panel render hook that prints a cached version string achieves the same result if you prefer to avoid the dependency.