Compile the showcase's views with the showcase off
tests / lint (push) Successful in 1m6s
tests / feature (8.4) (push) Successful in 1m18s
tests / feature (8.5) (push) Successful in 1m17s
tests / browser (chrome, chromium) (push) Successful in 3m27s
tests / browser (firefox, firefox) (push) Successful in 4m57s
tests / browser (safari, webkit) (push) Successful in 5m29s

php artisan view:cache compiles every view in the package's namespace,
the showcase's pages included, but the showcase:: component prefix was
only registered while the showcase was enabled. In production, where it
is off, view:cache failed with "Unable to locate a class or view for
component [showcase::example]" and an application caching its views on
start would not boot. The prefix is now always registered; the routes
still are not.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V9NnLxnPp8vaaurb3Z1MFy
This commit is contained in:
Andreas Reinhold / reini
2026-09-13 17:40:33 +02:00
co-authored by Claude Opus 5
parent 8afe9bac6a
commit db179e6b4e
2 changed files with 18 additions and 2 deletions
+14
View File
@@ -71,6 +71,20 @@ it('does not mount the showcase when disabled', function () {
$this->get('/material')->assertNotFound();
});
it('compiles every package view with the showcase off, as view:cache does in production', function () {
rebootWithShowcase(false);
$compiled = sys_get_temp_dir().'/livewire-material-view-cache-'.uniqid();
config(['view.compiled' => $compiled]);
File::ensureDirectoryExists($compiled);
try {
$this->artisan('view:cache')->assertSuccessful();
} finally {
File::deleteDirectory($compiled);
}
});
it('serves a symbol for the icon search', function () {
$this->get('/material/symbols/filled/favorite.svg')
->assertOk()