Repository navigation
Move CI onto the awcodes/.github shared workflows - #69
Merged
Merged
Conversation
Normalizes this package's tooling config onto the canonical templates in awcodes/.github ahead of moving to the shared reusable workflows: - pint.json / rector.php replaced with the canonical templates. pint.json was missing five rules (blank_line_before_statement, concat_space, method_argument_space, single_trait_insert_per_statement, types_spaces); rector now also covers workbench/, which is hand-written code. - phpstan.neon.dist added — this package had no static analysis at all. Level 5, analysing src/ and workbench/. config/ and database/ stay commented out because the package ships neither and phpstan hard-errors on a missing path. The explicit larastan extension.neon include is required here: phpstan/extension-installer is not a dev dependency (its allow-plugins entry is a leftover). - phpstan-baseline.neon seeded from the empty template so the config's `includes` resolves; the generated baseline lands in a follow-up commit. - require-dev gains larastan/larastan, pestphp/pest-plugin-arch and nunomaduro/collision; scripts gain test:types, wired into `test`. pestphp/pest-plugin-livewire is dropped: the suite has no Livewire tests. The runtime `require` block is untouched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017QxdNSNdqXRproytP5odgW
Pure formatting, no behaviour change. Driven by the two new rules the previous pint.json was missing that actually apply here: - types_spaces (space: single) — `bool|Closure` becomes `bool | Closure` in src/, tests/ and workbench/. - concat_space (spacing: one) — `__DIR__.'/..'` becomes `__DIR__ . '/..'`. Kept separate from the config change so the reformat is reviewable on its own. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017QxdNSNdqXRproytP5odgW
`filament()` is typed to return `FilamentManager|Plugin`, so the declared
`static` return on `get()` is the one thing level 5 flags in this package:
Method StickyHeaderPlugin::get() should return
static(Awcodes\StickyHeader\StickyHeaderPlugin) but returns
Filament\Contracts\Plugin|Filament\FilamentManager.
Annotated rather than baselined. The plugin registered under this plugin's own
id is a `static` by construction, so the declared type is already correct and a
baseline entry would only hide it. This is the same fix awcodes/recently applies
to the identical idiom, and it leaves the package passing level 5 clean with an
empty baseline.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017QxdNSNdqXRproytP5odgW
Replaces the three bespoke workflows with one caller on the shared reusable workflow, scoped to the active 4.x branch. - .github/workflows/ci.yml calls filament-plugin.yml@v1 with the standard seven row matrix. All seven were verified to resolve against this package's transitive constraints: the F5 rows land filament 5.8.1, the F4 rows 4.13.1. filament-package stays at its default — this is a panel plugin, so filament/filament is the right package to pin. Tests, lint, static analysis and reformat all run. - run-build is false. The suite does not need the compiled bundle: StickyHeaderServiceProvider only hands the dist path to FilamentAsset::register(), which stores it without reading the file, and the suite passes with resources/dist/sticky-header.js deleted. Building it on every matrix row would buy nothing. - An `assets` job takes over from assets.yml. Rather than rebuilding and auto-committing after merge — which left the bundle stale until that job ran, with the diff never reviewed — it rebuilds and fails the PR if resources/dist has changed, so a stale committed bundle is caught before merge. - composer.lock is dropped from the paths filter: it is gitignored and untracked in this package, so it can never trigger a run. Removed: assets.yml, lint.yml (rebuilt and force-pushed formatting onto merged branches; the Lint and Reformat jobs now report instead of rewriting), tests.yml (its matrix had no Filament pin, so every row resolved Filament 5 and the ^4.0 half of the constraint was never executed). Dependabot is resynced from the template in the same change. It gains a composer ecosystem, grouped so dev tooling lands in one weekly PR while runtime constraint changes stay reviewable, and it ignores awcodes/.github/* because the caller tracks the moving @v1 tag. The auto-merge workflow is replaced at the same time and not later: it previously auto-merged every minor and patch Dependabot sent, so adding the composer ecosystem without narrowing it would have started merging dependency bumps unreviewed. It is now scoped to github-actions bumps and the dev-dependencies group only. Note that auto-merge stays inert, and should, until "Allow auto-merge" is on and a 4.x ruleset requires the `ci / All Checks` status check. 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.
Migrates this package onto the shared reusable CI workflows in
awcodes/.github, matching the rest of the fleet. Config baseline, formatting sweep and workflow swap are separate commits.Layer B — config baseline
pint.json/rector.phpreplaced with the canonical templates.pint.jsonwas missing five rules; two of them actually apply here (types_spaces,concat_space).rector.phpnow also coversworkbench/.phpstan.neon.distadded. This package had no static analysis at all — no config, no baseline, nolarastan, notest:types. Level 5 oversrc/andworkbench/;config/anddatabase/stay commented out because the package ships neither and phpstan hard-errors on a missing path. The explicitvendor/larastan/larastan/extension.neoninclude is required here, sincephpstan/extension-installeris not a dev dependency (itsallow-pluginsentry is a leftover).require-devgainslarastan/larastan,pestphp/pest-plugin-archandnunomaduro/collision;scriptsgainstest:types, wired intotest.pestphp/pest-plugin-livewireis dropped — the suite has no Livewire tests. The runtimerequireblock is untouched.The package passes level 5 clean, with an empty baseline. Level 5 flagged exactly one thing, on
StickyHeaderPlugin::get():filament()is typedFilamentManager|Plugin, so the declaredstaticreturn does not narrow. That is annotated rather than baselined — the plugin registered under this plugin's own id is astaticby construction, so the declared type is already right and a baseline entry would only hide it. Same fixawcodes/recentlyapplies to the identical idiom.Layer A — workflows
ci.ymlcallsfilament-plugin.yml@v1with the standard seven-row matrix. Tests, lint, static analysis and reformat all run.All seven rows were verified to resolve against this package's transitive constraints, and the per-row Filament pin does its job — the F5 rows land
filament/filament5.8.1, the F4 rows 4.13.1. The suite was run locally at both extremes (F4/L12/TB10 and F5/L13/TB11): 13 passed, 20 assertions each.run-build: false. The suite does not need the compiled bundle —StickyHeaderServiceProvideronly hands the dist path toFilamentAsset::register(), which stores it without reading the file, and the suite passes withresources/dist/sticky-header.jsdeleted. Building it on every row would buy nothing. Freshness is checked once instead, in theassetsjob.assetsjobresources/dist/sticky-header.jsis committed and shipped, so aresources/jschange that lands without a rebuild silently publishes a stale bundle. The oldassets.ymlrebuilt and auto-committed after merge, which left the branch stale until that job ran and meant the generated diff was never reviewed. The new job rebuilds and fails the PR ifresources/distmoves. The committed bundle is currently up to date — a local rebuild produced no diff.Removed
assets.ymlassetsjob, which reports instead of auto-committing.lint.ymlLintandReformatnow report instead of rewriting.tests.yml^4.0half of this package's constraint was never actually executed.composer.lockis also dropped from the paths filter — it is gitignored and untracked here, so it could never trigger a run.Dependabot
Resynced from the template in this same change. It gains a
composerecosystem, grouped so dev tooling arrives as one weekly PR while runtime constraint changes stay reviewable, and it ignoresawcodes/.github/*because the caller deliberately tracks the moving@v1tag.The auto-merge workflow is replaced in the same PR, not later: it previously auto-merged every minor and patch Dependabot opened, so adding the composer ecosystem without narrowing it first would have started merging dependency bumps unreviewed. It is now scoped to
github-actionsbumps and thedev-dependenciesgroup only.Auto-merge stays inert — and should — until "Allow auto-merge" is enabled and a
4.xruleset requires theci / All Checksstatus check.Verification
composer test(refactor → lint → types → unit) passes locally: 13 tests, 20 assertions, phpstan clean, 0 baseline entries.Rector is clean on both
src/andworkbench/with nothing to change, so there is no rector commit. That was confirmed rather than assumed — a deliberately refactorable probe file dropped intoworkbench/app/was picked up and flagged, so the path really is being analysed.The two PHP 8.5 rows could not be executed locally (local PHP is 8.4). Their dependency resolution was verified via
config.platform.php=8.5.0, but CI is the only evidence that the suite itself passes on 8.5.🤖 Generated with Claude Code
https://claude.ai/code/session_017QxdNSNdqXRproytP5odgW