- How do I install chaim-chv/filament-enum-plural-label?
- Install it with Composer using composer require chaim-chv/filament-enum-plural-label. v2.0.0 requires PHP 8.2 or newer, Laravel 11.28/12/13, and Filament 5 or newer. If your application is still on Filament 3 or 4, pin the v1.x line instead.
- Which Laravel and Filament versions does this package support?
- Version 2.0.0 targets Filament 5 and declares support for illuminate/contracts ^11.28, ^12.0, and ^13.0. The PHP floor is 8.2. Laravel 13 has not shipped yet, so that constraint is forward-looking and should be treated as untested until upstream releases it.
- What changed in v2.0.0 compared with v1.x?
- v2.0.0 is a compatibility release rather than a feature release. It adds Filament 5 support, raises the PHP requirement to 8.2, explicitly declares illuminate/contracts for the Htmlable type, and introduces the package's first test suite and GitHub Actions CI matrix. It also drops PHP 8.1 and Filament 3/4 support, so lagging panels should stay on v1.x.
- How do I define singular and plural labels for an enum?
- You implement the package's plural label contract on your enum and return the singular and plural display values from its methods. The label values can be strings, integers, Htmlable instances, or null. Define them once on the enum and Filament will use them wherever that enum backs a form, table, or filter option.
- Does the package work with string-backed, int-backed, and unit enums?
- Yes. The package converts enum-backed values from string-backed, int-backed, and pure unit enums into display output. That output can be a string, an integer, an Htmlable instance, or null. The supported surface is deliberately narrow and does not touch persistence, routing, authentication, or queue behaviour.
- Is Htmlable output from this package escaped or sanitized?
- Htmlable output bypasses Blade escaping, so raw HTML returned from an enum label is rendered as markup. The package documentation does not establish whether it sanitizes that HTML or leaves escaping entirely to the caller. Before using it with user-influenced data, verify the behaviour and treat sanitization as your responsibility unless the maintainer confirms otherwise.
- What happens if an enum label returns null?
- A null label produces a blank display in Filament, such as an empty table cell. No exception is thrown and nothing is logged, so the failure is silent. The blast radius is small, but observability is poor and you may want your own validation around critical enum labels.
- Is the test suite strong enough for production use?
- v2.0.0 adds 19 tests and 34 assertions with a CI matrix across PHP 8.2, 8.3, and 8.4. That is a reasonable smoke net covering enum variants, Htmlable, null, and one Filament resource integration. It is not mature coverage, and there is no evidence yet of PHPStan or Psalm, a code-style gate, coverage reporting, or a security policy.
- Can I use this package with Filament v3 or v4?
- No. v2.0.0 requires Filament 5 and will fail Composer resolution on Filament 3 or 4 panels. The package points users on older Filament versions to v1.x, so pin that branch if you cannot upgrade yet. Confirm v1.x maintenance and support status with the maintainer before relying on it long term.
- Are there alternatives, and how actively is this package maintained?
- You can implement equivalent label methods directly on your enums or use Filament's own label APIs without an extra dependency. This package's value is standardising singular and plural labels across forms, tables, and filters. Maintenance signals are limited: there is no public bus-factor, release cadence, EOL, or security disclosure information, so a review should ask about v1.x support duration and the expected Filament 6 turnaround.