Filament ships two separate layers that must stay in sync:
- PHP — blade templates, component classes, action definitions (updated via
composer update) - JS — compiled Alpine components published to
public/js/filament/(updated viaphp artisan filament:assets)
The Vapor build steps run composer install (which pulls the latest PHP), but never run php artisan filament:assets. This means every Filament version bump via composer silently leaves the published JS behind.
Escape key was broken on all modals. The blade template referenced isTopmost() (added in v4.7.2) but the published support.js was from v4.3.1 and didn't include it. Diffing the two JS files confirmed isTopmost was the only user-facing gap across five minor releases — the rest were internal DOM morphing utilities.
Add php artisan filament:assets to the build steps in vapor.yml, before npm run build:
build:
- 'composer install --no-dev --optimize-autoloader'
- 'php artisan optimize'
- 'php artisan event:cache'
- 'php artisan icons:cache'
- 'php artisan filament:cache-components'
- 'php artisan filament:assets' # ← add this
- 'npm ci && npm run build && rm -rf node_modules'This ensures the published JS always matches the installed PHP version on every deploy.
Run php artisan filament:assets locally after any composer update that bumps Filament, and commit the updated public/js/filament/ files.