jeffersongoncalves/filament-security-headers
A Filament plugin that adds security headers to your admin panel, helping protect against clickjacking, MIME sniffing, and other common web threats. Easily configure CSP, X-Frame-Options, HSTS, and more directly from your Filament setup for simple, centralized protection.
This release (3.0.0) is a compatibility cut, not a feature cut: the headline is "First release for Filament 5.x." That single line drives almost everything about how you adopt it.
composer show filament/filament. If you are still on Filament 3.x or 4.x, do not take this update — pin to the last 2.x release and treat ^3.0 as blocked until your panel is upgraded.composer require the new major.php artisan vendor:publish --tag=...-assets --force (or rebuild your panel theme) and diff the published config against the previous version.PanelProvider exactly as before — the public registration API is typically the most stable surface across a major bump, so ->plugin(MyPlugin::make()) should be your sanity check that the wiring still works.Where to look first: the package's UPGRADING.md / changelog for the 2.x → 3.x delta (the release note is one line, so the real detail lives there), then the plugin class itself, then the composer.json constraints to confirm the exact Filament floor (^5.0 vs ^5.1).
First use case: boot a single panel with the plugin registered, load the page/resource it provides, and confirm the rendered output matches what you had on the previous major. That one smoke test catches the majority of Filament-major breakage.
Treat 3.0.0 as a hard version gate, not a soft one. Because the package now targets Filament 5.x, the dominant day-to-day pattern is coordinated upgrades: Filament major and package major move together in the same PR, with the package constraint bumped in lockstep. Avoid patterns where the package version floats independently of the Filament version.
Multi-panel setups. If you run several panels (admin, tenant, customer), register the plugin per-panel and verify that any Filament-5-era registration changes (navigation grouping, panel-scoped config) still resolve correctly in each. A package that works in one panel can silently fail to register in another when the plugin reads panel context.
Fluent/plugin configuration. Most Filament plugins expose ::make()->someOption() builders. Keep these in dedicated config or a small helper rather than inlining them in the provider — it makes the next major bump a one-file change instead of a grep exercise.
Resource and form/table integration. Where the package ships form components, table columns, or actions, prefer the package's published components over hand-rolled equivalents. On a major bump, custom forks of package internals are the #1 source of upgrade pain; anything you copied out of the package's src/ is now your maintenance burden against a new Filament API.
Testing. Filament's Livewire test helpers (livewire(...)->assertSuccessful(), assertCanSeeTableRecords, callAction) plus Pest/PHPUnit are the cheapest way to prove the upgrade landed. Write one test per surface the plugin touches — a page renders, a table column resolves, an action fires — before and after the bump. This is worth doing before upgrading, because it gives you a red/green signal you otherwise won't have.
Asset and theme workflow. If you compile your own panel theme, the Tailwind/Vite pipeline must be rebuilt after upgrading; package-provided views may now reference new Filament classes. Bake npm run build and asset publish into the upgrade runbook.
^3.0 (Filament 5) alongside a sibling still pinned to Filament 4 will deadlock Composer. Upgrade the whole workspace or use path repositories carefully.php artisan filament:clear-cached-components (or optimize:clear), view:clear, config:clear, and composer dump-autoload. A large share of "the upgrade broke everything" reports are stale caches.configureUsing() over editing vendor code — vendor edits vanish on the next composer update."^3.0" is fine, but in the first weeks of a new major consider a tighter constraint so a 3.0.x patch doesn't land mid-deploy without review.git revert rather than archaeology.How can I help you explore Laravel packages today?