sitesource/laravel-polymorphic-settings-filament
Filament admin panel integration for polymorphic settings: manage key-value configuration attached to any Eloquent model through a clean UI, with per-model overrides, typed values, and easy extension for Laravel apps.
Architecture fit
sitesource/laravel-polymorphic-settings-filament is a thin adapter between the core polymorphic settings store and Filament's form layer. Its job is narrow: mount from the settings store, render fields, persist on save. That is the right shape — the version-specific surface stays in the adapter rather than leaking into the settings core.form(), so the subclass supplies the version-appropriate signature and Filament's existing form discovery picks it up. This is what makes one package work across three majors, but it moves the version-specific contract into consumer code. The package is now version-agnostic; our subclasses are not.Integration feasibility
composer require sitesource/laravel-polymorphic-settings-filament with no config, no service provider wiring described, no published assets. Integration cost is effectively one line plus whatever subclasses we already own.Technical risk
form() and no declared return contract on the base class, a subclass with the wrong signature for the installed major produces no compile-time or boot-time error — it produces a form that doesn't render. That failure is discovered by an admin user, not by CI. We should assume this becomes our most common self-inflicted incident.FormIntrospector accepting "whichever container Filament resolves" is deliberate decoupling, but it is coupled to runtime shape rather than a published interface. A Filament patch/minor that changes that shape breaks every settings form in the panel, and can block us from taking a Filament security patch.TextInput->password() doing the encryption means the guarantee holds only for values written through that field. Any write through the settings API directly, any later switch of the field type, or any key rotation puts secrets in scope. This is a data-handling decision, not a UI decision, and needs an explicit answer.Key questions
doctor/diagnostic command?form() intentionally unenforced? Can it be backed by an interface, a @method annotation, or a boot-time assertion so failures are loud?password() encryption path use — Laravel's encrypted cast, or something package-local? What is the key-rotation story, and does a masked field blank or re-populate its value on re-render?composer.json declare — exact tested patches or a caret range? What is the stated support window for Filament 3, and will dropping it be a major bump?laravel-polymorphic-settings package does this require, and is that constraint aligned with what we already run?form() relocation?Stack fit
Migration path
form() signature changed to Schema and ->schema([...]) replaced with ->components([...]). Effort scales linearly with the number of settings form classes we own — inventory that count before committing to a date.Compatibility
composer.json Filament constraint and the package's declared range intersect cleanly, and that no transitive dependency pins us to a single major.Sequencing
form() signature and schema() → components() in the same PR, so the two changes are never separated.Maintenance
Support
Scaling
Failure modes
form() signature): highest likelihood, discovered by users, no error signal. Mitigate with a discovery test per form class.Ramp-up
form(). Two pages — one "which signature do I use," one "upgrading Filament majors" — would eliminate most of the ramp-up and support load.How can I help you explore Laravel packages today?