Skip to content

fix: keep view:cache working without the panel builder - #205

Open
nessimabadi wants to merge 1 commit into
relaticle:4.xfrom
nessimabadi:fix/view-cache-without-panels
Open

nessimabadi wants to merge 1 commit into
relaticle:4.xfrom
nessimabadi:fix/view-cache-without-panels

Conversation

@nessimabadi

@nessimabadi nessimabadi commented Oct 16, 2026 •

Copy link
Copy Markdown

Fixes #204

Problem

php artisan view:cache (and php artisan optimize) fails in apps that use Flowforge without filament/filament:

InvalidArgumentException: Unable to locate a class or view for component [filament-panels::page].

view:cache compiles every view in every registered namespace. flowforge::filament.pages.board-page renders <x-filament-panels::page>, which only exists when the Panel Builder is installed. Since #86 the Panel Builder is only a suggested dependency.

Fix

  • Move board-page.blade.php from resources/views to resources/panel-views, keeping the same relative path.
  • In FlowforgeServiceProvider::packageBooted(), add resources/panel-views to the flowforge view namespace and to the flowforge-views publish tag only when Filament\Panel exists, the same check filament/support uses to detect the Panel Builder.

The view name stays flowforge::filament.pages.board-page, so BoardPage, BoardResourcePage and BaseBoard need no changes. Published overrides in resources/views/vendor/flowforge still take precedence.

Tests

  • New test in ServiceProviderTest: no view under resources/views may reference filament-panels:: components. It fails on 4.x and passes with this change.
  • The existing test that flowforge::filament.pages.board-page still resolves when Panels is installed passes.
  • Full suite: 191 passed.
  • Checked by hand in a real app with filament/forms and filament/tables but no filament/filament: view:cache fails on v4.1.4 and succeeds with this change.

composer analyse reports 7 errors on 4.x, all in files this PR doesn't touch.

🤖 Generated with Claude Code

The board page view renders <x-filament-panels::page>, so compiling the
flowforge view namespace failed in apps that use InteractsWithBoard
without filament/filament. Move it to resources/panel-views and only
register that path when Filament Panels is installed.

Fixes relaticle#204

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nessimabadi
nessimabadi force-pushed the fix/view-cache-without-panels branch from bf10ee3 to 556edc5 Compare October 16, 2026 18:20

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

view:cache fails when filament/filament (Panels) isn't installed

1 participant