ci: migrate to the awcodes/.github shared workflows - #55
Merged
Conversation
Widen orchestra/testbench to ^9.0|^10.0|^11.0 so the Laravel 13 matrix rows can resolve. require-dev only — no change to the published runtime contract. phpstan: add reportUnmatchedIgnoredErrors: false, and analyse workbench/ and config/ alongside src/. workbench/storage is excluded with the optional marker because it is gitignored but fills with compiled Blade locally. The larastan extension.neon is deliberately NOT included: phpstan/extension-installer is in require-dev and registers it already, and an explicit include double-registers it, aborting the run. rector: add workbench/ (29 hand-written PHP files) and skip workbench/storage. Keeps this repo's imported-exception form rather than the template's fully-qualified catch, which is what makes this copy pint-clean. composer: add the canonical test:types script and wire it into test. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017QxdNSNdqXRproytP5odgW
Three real code changes, not formatting: two arrow-function return types and one closure void return type. workbench/routes/web.php needed a hand fix. Rector emits the view() union as two fully-qualified names; pint's fully_qualified_strict_types then strips the leading backslash from only the first member, leaving a half-qualified `Factory | \Illuminate\Contracts\View\View` that both tools report as clean. Imported both classes explicitly instead, so rector and pint agree. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017QxdNSNdqXRproytP5odgW
The committed baseline was an empty 0-byte file. Adding config/ and workbench/ to the analysed paths, plus a year of analyser and Filament releases since it was last generated, surfaces 16 errors across 13 entries. Twelve of the sixteen are the larastan view-string family, which fires wherever a package renders its own namespaced views; the rest are two MasonRenderer array-shape mismatches, one always-true condition, a deprecated VerifyCsrfToken constant in the workbench panel provider, and the two workbench factories' definition() return types under checkModelProperties. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017QxdNSNdqXRproytP5odgW
Replaces the hand-rolled tests.yml and lint.yml with one caller of awcodes/.github/.github/workflows/filament-plugin.yml@v1, scoped to 3.x. Seven explicit matrix rows cover both supported Filament majors from this one branch; every row was resolved locally first. The Laravel 13 / testbench 11 rows are new — the old tests.yml listed laravel 13.* with testbench 11.* but composer.json capped testbench at ^10.0, so those rows could never install. lint.yml auto-committed rector and pint output to merged PRs. The shared Reformat and Lint jobs check the same two tools on the PR instead, so a formatting problem is visible before merge rather than fixed after it. The `assets` job is local to this repo: resources/dist/mason.js and mason-entry.js are committed and shipped, so it rebuilds them with esbuild and fails if the tree moves. run-build stays false — the suite reads the committed bundles' registration, not their contents, so it needs no build of its own. Dependabot config and auto-merge come from the current templates. The github-actions ecosystem ignores awcodes/.github/* so the moving @v1 tag is not pinned to a snapshot, and auto-merge is narrowed to github-actions plus the dev-dependencies group — runtime bumps rewrite a published constraint and stay manual. workbench/** is added to the path filters, a deliberate addition to the template: rector and phpstan now analyse workbench/, so a workbench-only commit has to be able to turn CI red. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017QxdNSNdqXRproytP5odgW
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves this package onto the shared reusable CI workflows in
awcodes/.github, replacing the hand-rolledtests.ymlandlint.ymlwith a single caller offilament-plugin.yml@v1scoped to3.x.The blocker: Laravel 13 could never have worked
The old
tests.ymllistedlaravel: [13.*, 12.*]withtestbench: 11.*for the 13 rows, butcomposer.jsoncappedorchestra/testbenchat^9.0|^10.0. Those rows could not install — testbench 11 was simply unreachable. Widening the constraint to^9.0|^10.0|^11.0fixes it. This isrequire-devonly: nothing in the publishedrequireblock changes, and"php": "^8.2"stays.All seven matrix rows were resolved locally before being committed. The two Laravel 13 rows now resolve
laravel/framework v13.31.0+orchestra/testbench v11.2.0+filament/filament v5.8.1, and the full suite passes against exactly that set: 175 tests, 297 assertions.Tooling
phpstan.neon.dist— addsreportUnmatchedIgnoredErrors: falseand analysesconfig/andworkbench/alongsidesrc/.workbench/storageis excluded with the optional(?)marker because it is gitignored but fills with compiled Blade the moment the workbench app runs. There is no rootdatabase/, so that path stays out.extension.neoninclude is deliberately absent.phpstan/extension-installeris inrequire-devand registers larastan already; an explicit include double-registers it and phpstan aborts with "This file is included multiple times" before analysing anything.phpstan-baseline.neon— was a committed 0-byte file. Regenerating over the wider paths, a year after it was last generated, gives 13 entries covering 16 errors: twelve are the larastanview-stringfamily, plus twoMasonRendererarray-shape mismatches, one always-true condition, a deprecatedVerifyCsrfTokenconstant in the workbench panel provider, and the two workbench factories'definition()return types undercheckModelProperties.rector.php— addsworkbench/(29 hand-written PHP files) and skipsworkbench/storage. This repo's copy keeps its imported-exception form rather than the template's fully-qualifiedcatch, which is what makes it pint-clean.pint.jsonalready matched the canonical template byte for byte, so it is untouched and no reformat sweep was needed.composer.json— adds the canonicaltest:typesscript, wired intotest.Rector produced three real code changes, not formatting: two arrow-function return types and one closure void return type. One of them needed a hand fix — rector emits the
view()union as two fully-qualified names, and pint'sfully_qualified_strict_typesthen strips the leading backslash from only the first member, leaving a half-qualifiedFactory | \Illuminate\Contracts\View\Viewthat both tools report as clean. Both classes are imported explicitly instead.Assets
resources/dist/mason.jsandmason-entry.jsare committed and shipped, so this repo carries theassetsjob: it rebuilds with esbuild and fails if the tree moves. Verified locally — a cleannpm ci && npm run buildreproduces both bundles byte for byte, so the committed dist is current.run-buildstaysfalse. The suite reads the committed bundles' registration inMasonServiceProvider, not their contents, and passes with no build step; freshness is theassetsjob's concern.workbench/**is added to the path filters — a deliberate addition to the template, since rector and phpstan now analyseworkbench/and a workbench-only commit has to be able to turn CI red.Not in scope
The branch-protection ruleset and "Allow auto-merge" are not set up here;
dependabot-auto-merge.ymlis inert-by-design until the requiredci / All Checkscheck exists, and its header says so.🤖 Generated with Claude Code
https://claude.ai/code/session_017QxdNSNdqXRproytP5odgW