tonegabes/filament-phosphor-icons
A Phosphor icon set for Filament 4 and 5 applications, exposed as a convenient enum for actions, forms, toggles, and columns. Includes weight presets, forceWeight(), and helper methods for dynamic runtime styling. Install via Composer: tonegabes/filament-phosphor-icons.
Architecture fit
ToneGabes\Filament\Icons\Enums\Phosphor) mapping Phosphor icon names onto Filament's existing icon contract, plus a companion Weight enum and fluent helpers (->fill(), ->bold(), ->forceWeight()). There is no service provider surface worth reasoning about, no middleware, no published assets in the README, no migrations, no JS build step.->icon(), ->onIcon(), ->offIcon(), <x-filament::badge :icon="...">). We are not introducing a new rendering path; we are substituting a name source. That is the lowest-risk shape a dependency can take.Phosphor::StarBold) rather than a string. For a TPM this matters beyond aesthetics: a mistyped or renamed icon fails in development instead of rendering as an empty box in a customer-facing admin.Weight enum plus forceWeight() converts emphasis from per-component CSS into a declarable convention — primary = bold, active = fill, decorative = duotone. That is reviewable in a PR; a CSS override is not.phosphor:sync artisan command (--dry-run, --enum-path) is the most architecturally significant feature. It reframes the catalogue as generated data we can refresh on our own schedule, not logic we depend on the maintainer to ship. That is what makes a 5-star, single-maintainer dependency defensible here.Integration feasibility
composer require tonegabes/filament-phosphor-icons. Adoption work is import swaps plus a design decision — no infrastructure, no credentials, no config publish step described.@svg(Phosphor::Star->getLabel()), svg(...), <x-icon name="...">) is a strong signal of a transitive dependency on a Blade icon registry (the README's sync description explicitly says "from Blade icons," and getLabel() is documented to return a phosphor- prefixed name). Whether that registry ships as a Composer requirement or must be added separately is unconfirmed in the README and is the single most important thing to verify before committing to an estimate.Technical risk
composer.json and the enum ourselves on every upgrade.vendor/, which Composer will overwrite on reinstall or composer update. Any workflow that relies on a synced enum must pin --enum-path to a first-party location or treat the fork as the source of truth. This is a footgun a TPM should name explicitly in the runbook.Key questions
Phosphor implement Filament's icon/label contract directly, or does it depend on getLabel() being resolved by a specific Blade icon package? What exactly does composer require pull in?composer.json constraints on filament/filament, php, and laravel/framework — and does it accept ^4.0 || ^5.0, or a narrower range that will fight our lockfile?Stack fit
getLabel(). That means it can be added and removed without touching our domain code, as long as icon references are isolated.Migration path
Phosphor behind our own thin App\Enums\Icon (or a small facade) and reference that everywhere. This costs a few hours and converts the worst-case scenario from "surgical find-and-replace across the admin" into "rewrite one file" — which is the exit plan made real.Weight capability. Record it.StarFill / Star) and an IconColumn boolean.aria-label, and that an icon is never the sole carrier of meaning in a status column. Cheap now, expensive to retrofit.phosphor:sync must target our own enum, not vendor/.Compatibility
~1.4.1 or exact) and treat any bump as a reviewed change, not an auto-merge. Renovate/Dependabot should be configured to require human review on this package.getIcons() / getBoldIcons() filtering helpers for product behaviour — those are introspection utilities. Using them to populate a dynamic icon picker is fine; depending on them for rendering is not.Maintenance
composer.json and enum diffs on upgrade (minutes), re-run our smoke test (minutes), and re-run phosphor:sync against our own enum path when Phosphor ships new icons we need (minutes).--enum-path capability is the operational keystone. Configure it to write to a first-party path from day one; leaving the default (writing into vendor/) guarantees a confusing regression the next time someone runs composer install.phosphor:sync to local and CI environments. It writes to the filesystem and has no business running against production.Support
Scaling
Failure modes
| Failure | Symptom | Detection | Response |
|---|---|---|---|
| Filament major ships; no matching package release | Icon resolution breaks on upgrade | CI smoke test | Execute fork plan; do not block the Filament upgrade |
| Package abandoned | No new Phosphor icons | phosphor:sync against our enum |
Fork or inline; data, not logic |
| Blade icon registry missing/renamed | Blank icon boxes in admin | Pilot + CI smoke test | Add/fix the registry dependency |
Sync run against vendor/ |
Enum reverts on composer install |
Code review on runbook | Always pass --enum-path |
| Icon renamed/removed upstream | Fatal on enum case resolution | Deploy-time (fails fast, but fails) | Regenerate; caught in staging if we run one |
| Dependency auto-bump | Silent contract drift | Pinned version + review gate | Human review required |
Ramp-up
Phosphor::CaseName plus a handful of fluent helpers; the only new concept is Weight as a convention rather than a style. IDE autocomplete across a very large enum is the one papercut — engineers will want the design's icon map or the Phosphor website open.How can I help you explore Laravel packages today?