Skip to content

Skip vendor guidelines that fail to render instead of crashing - #911

Merged
pushpak1300 merged 6 commits into
mainfrom
fix/vendor-guideline-render-failures
Aug 4, 2026
Merged

Skip vendor guidelines that fail to render instead of crashing#911
pushpak1300 merged 6 commits into
mainfrom
fix/vendor-guideline-render-failures

Conversation

@pushpak1300

Copy link
Copy Markdown
Member

Packages ship their own guidelines and skills under resources/boost, and Boost renders those Blade files at install time. If one of them targets an API that Boost has since changed, the whole install dies:

Illuminate\View\ViewException
Class "Laravel\Roster\Enums\Packages" not found (View: .../storage/framework/views/32976a5f.php)
at storage/framework/views/9a6ce17d.php:6

inertiajs/inertia-laravel and laravel/wayfinder both still call the Roster enum that #891 moved to PackageRegistry (wayfinder's skill also uses $assist->roster, now $assist->project). Upstream main isn't fixed yet, so composer update doesn't help. Either way, one stale vendor file taking down the entire install feels wrong.

Now a file that fails to render is skipped, Boost falls back to its own bundled copy of that guideline when it has one, and the user gets told at the end of the install:

Skipped 2 files that could not be rendered:
  - vendor/inertiajs/inertia-laravel/resources/boost/guidelines/core.blade.php
  - vendor/laravel/wayfinder/resources/boost/skills/wayfinder-development/SKILL.blade.php
These ship Boost files built for an older Boost version, so Boost used its own where it had them.
Update them with: composer update inertiajs/inertia-laravel laravel/wayfinder

Skills already got the fallback for free, since one that fails to parse drops out of the merge and the .ai copy stays.

One gap that fallback exposed: the bundled .ai/inertia-laravel/core.blade.php only knew v1 and v2, while the package ships v3 guidance. Falling back would have quietly downgraded anyone on Inertia 3, so this pulls the v3 section in behind a gte('3.0.0') branch. Wayfinder needed nothing, its bundled copies are already identical to upstream apart from the corrected API.

Also adds an UPGRADE.md section covering the authoring API changes from #891 (Packages enum to PackageRegistry, $assist->roster to $assist->project, usesVersion() to uses()), since package authors hitting this crash have nowhere to look right now. I guessed at the 2.5 From 2.4 heading, rename it to whatever the release ends up being.

I deliberately didn't shim the removed enum. Declaring a class in Roster's namespace to keep old templates rendering means owning a removed API forever, and it only covers this one break. The real fix belongs in those two packages, patches for both are ready but can't land until a release ships PackageRegistry.

Verified against the real broken files in a local project: both crashes become skips, and Inertia v3 plus the Wayfinder guideline and skill still land. Tests added for the skip, the fallback, the install warning, and the Inertia version branches.

@pushpak1300
pushpak1300 marked this pull request as ready for review August 4, 2026 21:01
@pushpak1300
pushpak1300 merged commit f6b054d into main Aug 4, 2026
24 checks passed
@pushpak1300
pushpak1300 deleted the fix/vendor-guideline-render-failures branch August 4, 2026 21:10
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.

1 participant