Skip to content

v1.2.0

Choose a tag to compare

@SanderMuller SanderMuller released this 05 Aug 22:07
· 11 commits to main since this release
Immutable release. Only release title and notes can be modified.

Restores compatibility with laravel/roster 1.0.0, whose API rewrite made every composer update on a consumer app hard-crash during the project-boost:sync post-hook.

Action required: this release requires laravel/boost ^2.5 (up from ^2.4). See UPGRADING.md.

composer require --dev "sandermuller/project-boost-laravel:^1.2" -W

-W matters: laravel/boost is usually a sibling top-level require in the consuming app, so it has to move to ^2.5 in the same resolve.

Fixed

  • composer update / install no longer fatals with Class "Laravel\Roster\Enums\Packages" not found. laravel/roster 1.0.0 (2026-07-18) removed the Packages enum and the Roster class this package was built against. The failure was unrecoverable rather than degrading to the intended permissive fallback: LaravelBoostGuidelineGate::EXCLUDED_PACKAGES referenced enum cases in a class-constant initializer, which PHP evaluates on class initialization — so permissive(), the graceful-fallback path itself, threw before any class_exists() guard could run. Package identity is now a plain composer/npm name string throughout, and Roster::scan() becomes ProjectScan::scan().

  • Guideline dirs resolve through laravel/boost's own name mapper. Package name → guideline dir now delegates to PackageRegistry::guidelineName() instead of slugifying locally. Pre-1.0 Roster's Package::name() returned the enum case name (FLUXUI_PRO), which the old slugify handled correctly; Roster 1.0 returns the composer name (livewire/flux-pro), which it would not have. Left unfixed, this would have replaced the fatal with silence — every package guideline suppressed, no error.

  • npm-ecosystem packages are gated again. Discovery scans both ecosystems (php() + js()), matching laravel/boost's own DiscoverPackagePaths::packages(). The inertia-react, inertia-svelte, inertia-vue and tailwindcss guideline dirs are npm-driven and had no gate signal from a php-only scan.

Changed

  • Requires laravel/boost ^2.5 (was ^2.4). Laravel\Boost\Support\PackageRegistry — which this package now mirrors for package constants and the name → dir map — landed in 2.5.0 alongside boost's own Roster 1.0 adaptation. 2.4.x still requires laravel/roster ^0.5, so there is no version of this fix that works on the 2.4 line.

  • laravel/roster ^1.0 is now an explicit requirement. It was previously pulled in only transitively through laravel/boost, despite this package type-hinting its classes directly — which is how a major upstream rewrite reached consumers with no constraint to stop it.

  • The known-package universe is derived from the dirs laravel/boost ships under .ai/, rather than enumerated from a hardcoded list. Roster 1.0 removed the enum that supplied it, and boost's replacement keeps its name → dir map private. Scanning is also self-maintaining: a guideline dir boost adds in a future release is gated correctly without a release here. Verified equivalent against boost 2.5 — every package dir it ships was a Packages case, and the enum cases with no shipped dir were already no-ops.

Internal

  • LaravelBoostGuidelineGate::fromRoster() became fromProjectScan() and takes a ProjectScan; VersionResolver takes a ?ProjectScan. Both are @internal — the PUBLIC_API.md surface (CLI commands, options, exit codes, config keys) is unchanged.

  • Added a regression guard asserting the gate's exclusion and must-be-direct lists still match laravel/boost's own. The gate is a 1:1 mirror of DiscoverPackagePaths, and unlike a removed class, a changed policy array drifts silently — no fatal, just guidelines quietly emitted or suppressed.

  • Dropped the abandoned rector/type-perfect dev dependency, superseded by tomasvotruba/type-coverage, which now bundles it. Both installed made PHPStan abort during container compilation on a duplicate service registration, exiting non-zero with no output — so the quality gate looked green while analysing nothing.

Full Changelog: 1.1.0...1.2.0