filament/upgrade
Official Filament upgrade helper for migrating Laravel admin panels from v3 to v4. It provides automated code transformations, artisan commands, and practical guidance for handling breaking changes, so you can move your Filament app to the latest version faster and with less manual editing.
Architecture fit. filament/upgrade is a scoped, single-purpose developer tool: it rewrites Filament v4 source code into v5-compatible code. It belongs in the require-dev block of a Laravel application that already runs Filament v4 on the panel layer, and nowhere else. It is not a runtime dependency, not a compatibility shim, and not a gradual-adoption mechanism — it does not let v4 and v5 code coexist, so it must be treated as a one-shot codemod executed on a short-lived branch. Architecturally this is a "migration utility" class of package, comparable to Rector rule sets or Laravel Shift: low architectural surface area, high blast radius if run carelessly.
Integration feasibility. Fit is gated by a small number of hard preconditions, all of which a TPM can verify in under a day:
composer.json and reproducibly resolved in composer.lock.composer.json at time of execution, not against this document).The package lives inside the filamentphp/filament monorepo rather than in a standalone repository. That has two practical consequences: the 32k+ star count is the monorepo's popularity, not this subpackage's adoption, and issue traffic, changelogs, and support will be entangled with the core framework's.
Technical risk. The dominant risk is not that the codemod is wrong — it is that it is incomplete in ways that fail silently. Mechanical namespace and method-signature rewrites are the easy, well-covered case. Custom widgets, panel providers, plugins, Blade overrides, and anything that subclasses Filament internals are the long tail, and the codemod will leave those untouched while producing a clean report. Secondary risks:
Dependents: 0 and an opportunity score of ~20 are both weak signals. That does not mean the package is bad; for a dev-only codemod the dependent count is structurally near-zero. But it does mean there is almost no public corpus of migration post-mortems to learn from, and the burden of validating output falls entirely on your team.git and your rollback is composer.lock; the package provides neither.filament:upgrade:analyze, filament:upgrade:fix, --dry-run) may not match the shipped CLI. Confirm the actual command list from the package's own README before writing runbooks — do not codify commands from secondhand assessments.Key questions for the TPM to answer before approving.
Resource/Page/Widget scaffolding versus custom subclasses, custom Blade views, and plugins? The answer drives whether the codemod covers 80% or 30% of the work.v5 branch through production cutover — and what is the go/no-go gate?Stack fit. This fits a conventional Laravel + Filament application on Composer 2.x, deployed via container or a platform with build hooks (Forge, Vapor, Kubernetes). The upgrade run itself should execute in a CI-equivalent container pinned to the same PHP minor version as production, because codemod output can differ across PHP versions in subtle ways (syntax handling, static analysis). Anti-fits: monorepos where the Filament app is a submodule with its own release cadence; multi-tenant codebases where one panel serves many customers and cannot be feature-flagged independently; and any environment where the branch cannot be deployed to a production-shaped staging tier before cutover.
Migration path. Sequence matters more than tooling here.
v5-upgrade branch from main. Tag the pre-upgrade commit as the rollback point. Verify the lock file is clean and the app builds from scratch.composer.json for Filament-adjacent packages. Resolve plugin v5 compatibility before running the codemod — otherwise you rewrite code against a target that cannot be installed.composer require --dev), confirm the actual Artisan command surface from the package README, and run any available analysis or dry-run mode.git diff. Budget a real code review, sized to the number of touched files, not a rubber stamp.filament/filament:^5.0, run composer update, clear caches (config:clear, view:clear, route:clear, optimize), and rebuild front-end assets — v5's Tailwind baseline change means asset builds are part of the migration, not an afterthought.composer.json. It has no place in a v5 steady state; leaving it invites accidental re-runs.Compatibility. Treat compatibility as a matrix you fill in, not a claim you accept. Rows: core Filament packages, each third-party plugin, custom widgets, custom pages, custom Blade overrides, authorization policies, queue/export integrations, and asset pipeline. Columns: works unchanged / codemod-rewritten and verified / manually patched / blocked. Anything in the last column stops the project. Database schema should be untouched — if the codemod or the v5 upgrade implies schema work, that is a finding worth escalating, not a detail to absorb.
Sequencing. Phase 0, dependency and plugin clearance (blocking). Phase 1, low-blast-radius panels — internal reporting, admin-only screens — to prove the pipeline and calibrate effort. Phase 2, core revenue-adjacent CRUD. Phase 3, custom widgets, plugins, and Blade overrides that the codemod skipped. Phase 4, production cutover behind a flag or a maintenance window, with the v4 branch kept deployable for a defined soak period (suggest two weeks) before deletion. Use Phase 1's actual effort to re-estimate Phases 2–3; the 30–50% time-saving figure in the business case is a hypothesis, not a measurement.
Maintenance. After cutover, the package itself leaves your dependency tree — that is the good news; there is nothing to maintain. The recurring cost is v5 stewardship: tracking the UPGRADING.md changelog, keeping plugins current, and re-running the same characterization tests on every minor bump. Internally, add a short migration note to the repo documenting what the codemod changed, what was hand-patched, and what was deliberately left — this is the single highest-value artifact the team produces during the project and the first thing that will be missing if it is not assigned as a deliverable.
Support. Two tiers. Tier 1 is your own on-call: designate one engineer as the Filament v5 point of contact for the first 30 days, with authority to roll back. Tier 2 is upstream: file v5 regressions in the monorepo's issue tracker, and use the Filament Discord for usage questions — but note that support for this package is thinly evidenced, so do not plan on vendor responsiveness for migration-specific problems. For end users, the v5 UI shift is a real change; publish release notes that describe what looks different before the deploy, not after.
Scaling. Little scaling exposure on the migration itself; the concern is the post-upgrade panel. v5 changes query and rendering behaviour under Livewire, so re-check the usual suspects on your largest tables: pagination depth, filter cardinality, eager-loading on relationship columns, and widget query counts. Move exports and long-running actions to queues if they were previously synchronous. Cache panel assets at the CDN edge. If the panel serves many tenants, confirm the upgrade does not change per-tenant cache keys or panel resolution.
Failure modes. The realistic ones, ordered by likelihood:
git reset --hard to the tag and re-run; the branch is disposable by design.filament_* tables or panel-user relationships behave correctly post-upgrade. Detection: post-deploy smoke test on create/edit flows. Recovery: restore from the pre-upgrade snapshot.Ramp-up. Budget roughly: half a day to verify preconditions and the real CLI surface; one to three days for the dependency audit and any plugin remediation; one to two days for the codemod run plus diff review on a mid-sized panel; then one to three weeks of manual patching, testing, and QA depending on custom-surface density. Team enablement is modest — one 60-minute session covering v5's changed resource/page structure, the new asset pipeline, and the rollback procedure, plus pairing on the first panel. Crucially, the person who runs the codemod should be the person who reviews its output; handing a generated diff to someone who did not run it is how silent partial migrations reach production.
How can I help you explore Laravel packages today?