Skip to content

sync: merge 5.x maintenance into main for v6 parity - #187

Merged
coolsam726 merged 43 commits into
mainfrom
sync/5x-into-main
Jun 13, 2026
Merged

sync: merge 5.x maintenance into main for v6 parity#187
coolsam726 merged 43 commits into
mainfrom
sync/5x-into-main

Conversation

@coolsam726

Copy link
Copy Markdown
Owner

Summary

  • Merges all 5.x maintenance work into main so v6 development starts from the same fixes, tests, and CI tooling.
  • Preserves v6 foundations from main: module runtime contracts, ModuleActivator/ModuleRegistry, Laravel 12+ constraints, and v6 config keys.
  • Incorporates 5.x improvements: custom namespace provider resolution, Windows path fixes, expanded test coverage (98% railguard), Codecov workflow, changelog auto-merge fallback, and panel discovery fixes.
  • Fixes NwidartModuleRegistry type hint (Nwidart\Modules\Module vs facade).

CI matrix on main (v6)

  • Laravel 12 and 13 only (no Laravel 11)
  • PHP 8.3, 8.4, 8.5 on Ubuntu
  • Windows smoke test on PHP 8.3 + Laravel 12

Test plan

  • vendor/bin/pest --ci passes locally on Laravel 12 and 13
  • CI passes on this PR (run-tests, run-coverage, phpstan)
  • Merge to main
  • Continue v6 work from main / feature/** branches

Made with Cursor

coolsam726 and others added 30 commits June 13, 2026 15:17
The global Module alias is no longer registered by nwidart/laravel-modules v13.
Replace broken \Module references and fix an if-condition parse error in
ModulesServiceProvider so the package boots correctly in tests and runtime.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extend the test workflow to cover the v5 maintenance branch and feature/*
development branches via push, and gate pull requests against main and 5.x.

Co-authored-by: Cursor <cursoragent@cursor.com>
Align test matrix with Laravel 11/12 and matching testbench versions, and point composer, README, and install prompts at coolsam726/filament-modules.

Co-authored-by: Cursor <cursoragent@cursor.com>
Run composer install steps under bash on Windows, remove the invalid phpstan-filament include, and drop the obsolete Larastan 2 config block.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the redundant Filament Resource use statement so the local abstract class can be declared on PHP 8.4.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add nwidart Module macro stubs, tighten a few real fixes (CanAccessTrait, dead catch, Stringable import), and baseline remaining Filament command analysis noise.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove the fix-styling workflow that re-introduced a PHP 8.4 class name conflict via fully_qualified_strict_types, and extend Filament Resource through an import alias instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
## Summary
- Fix the broken CI test matrix on `5.x` by pairing Laravel 11 with
testbench 9 and Laravel 12 with testbench 10 on PHP 8.3/8.4 (plus one
Windows smoke job)
- Harden PHPStan workflow with branch triggers, PHP 8.3, and
`--no-scripts` install
- Update repository URLs in `composer.json`, `README.md`, and the
install star prompt to `coolsam726/filament-modules`

## Test plan
- [x] `vendor/bin/pest --ci` passes locally
- [ ] CI green on all matrix jobs once Actions billing is resolved


Made with [Cursor](https://cursor.com)
Co-authored-by: Cursor <cursoragent@cursor.com>
## Summary
- Point the tests workflow badge and link at the `5.x` branch instead of
`main`
- Switch Packagist and CI badges to `for-the-badge` style

## Test plan
- [ ] Badges render correctly on the README preview


Made with [Cursor](https://cursor.com)
Cover nwidart v13 facade usage, module macros, Resource PHP 8.4 compatibility, and CanAccessTrait behavior, and stop delegating to package parent classes that re-enter the trait with the wrong module name.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…rsion

Normalize mixed directory separators in path macros and convertPathToNamespace so Windows CI and runtime resolve module provider namespaces correctly.

Co-authored-by: Cursor <cursoragent@cursor.com>
## Summary
- Add regression tests for the v5 maintenance fixes: nwidart v13
`Module` facade (no global alias), module path macros, `Resource` PHP
8.4/Pint compatibility, and `CanAccessTrait` widget access
- Fix `CanAccessTrait` so widget `canView()` no longer recurses through
`Coolsam\Modules\ChartWidget` and looks up the wrong module name
(`modules` instead of `blog`)
- Normalize module path macros and `convertPathToNamespace()` on Windows
so provider namespaces resolve correctly
- Improve test isolation with a shared `CreatesTestModules` helper and
testbench `Modules` directory cleanup between runs

## Issues
Closes #106
Closes #162

Relates to #170 (nwidart/laravel-modules v13 runtime compatibility on
the `5.x` line; composer constraints landed in #169 and #174)

## Test plan
- [x] `vendor/bin/pest --ci` (17 tests)
- [x] `./vendor/bin/phpstan analyse`
- [x] `vendor/bin/pint`
- [x] Windows CI matrix job passes
Parse provider namespaces from source files and module names from module.json
so custom namespaces register correctly and panels named like Blog\App work.
Document panel scoping, fix theme command filesystem injection, and add tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
## Summary

- **Closes #154** — Provider auto-registration now reads the `namespace`
declaration from each provider PHP file (with path-based fallback) and
resolves the module name from `module.json` instead of inferring it from
the namespace.
- **Closes #155** — `ModulesPlugin::getModulePanels()` uses the same
resolution logic, so module names like `Blog` are no longer confused
with segments such as `App` in custom namespaces (e.g.
`Blog\App\Providers\BlogPanelProvider`).
- **Closes #160** — `ModuleMakeFilamentThemeCommand::handle()` assigns
the injected `Filesystem` instance before use.
- **Closes #157** — Documents how to scope resources, clusters, and
pages to a specific Filament panel.

### #170 (Laravel 13)

Not addressed on `5.x`. This maintenance branch targets Laravel 11–12
with Filament 4/5 and nwidart 11–13. Laravel 13 support is planned for
v6 on `main` per `V6-ROADMAP.md`.

## Test plan

- [x] `vendor/bin/pest --ci` (20 tests)
- [x] `vendor/bin/pint`
- [x] `./vendor/bin/phpstan analyse`
- [x] New `ModuleProviderResolutionTest` covers custom namespaces, path
lookup, and provider registration


Made with [Cursor](https://cursor.com)
Declare illuminate/contracts ^13, extend the CI matrix with Laravel 13.10
and Pest 4, and document Filament 5 and nwidart 13 compatibility.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Remove static coverage report config from phpunit.xml.dist so CI runs
without pcov/xdebug do not warn and exit 1 under failOnWarning. Keep
coverage reports on the composer test-coverage script via CLI flags.

Co-authored-by: Cursor <cursoragent@cursor.com>
## Summary

- **Closes #170** — Adds explicit `illuminate/contracts` support for
Laravel 13 alongside Filament 4/5 and nwidart 11–13.
- Extends the CI matrix with PHP 8.3/8.4 on Laravel `^13.10`, Orchestra
Testbench `^11`, and Pest 4 plugins.
- Updates README compatibility table and installation notes for Laravel
13 / nwidart 13.

## Notes

- Testbench Core 11 requires Laravel `>=13.10`, so the CI matrix uses
`^13.10` rather than `^13.0`.
- Local dev dependencies remain flexible (`testbench` / Pest 3 or 4); CI
pins the Laravel version per matrix row as before.

## Test plan

- [x] `vendor/bin/pest --ci` on Laravel 11 baseline (20 tests)
- [x] `vendor/bin/pint` and `./vendor/bin/phpstan analyse`
- [x] Verified consumer install: `laravel/framework:^13.10` +
`filament/filament:^5.5` + `nwidart/laravel-modules:^13.0` +
`coolsam/modules` resolves successfully


Made with [Cursor](https://cursor.com)
Run a dedicated pcov coverage job on Laravel 12 and upload Clover reports
to Codecov; display the branch badge alongside existing README shields.

Co-authored-by: Cursor <cursoragent@cursor.com>
## Summary

- Adds a `run-coverage` workflow (PHP 8.4, Laravel 12, pcov) that
uploads Clover reports to Codecov.
- Adds a Codecov badge to the README (matching the existing
`for-the-badge` shield style).
- Adds `codecov.yml` to keep PR noise low (no required status checks).

## Setup after merge

1. Sign in at [codecov.io](https://codecov.io) with GitHub and enable
`coolsam726/filament-modules`.
2. Add the repository upload token as a GitHub Actions secret named
`CODECOV_TOKEN`.
3. Re-run the coverage workflow on `5.x` — the badge will populate after
the first successful upload.

## Test plan

- [x] `vendor/bin/pest --ci --coverage
--coverage-clover=build/logs/clover.xml` locally
- [ ] Merge and verify `run-coverage` workflow on `5.x`
Co-authored-by: Cursor <cursoragent@cursor.com>
## Summary

- Adds `.cursor/cli.json` with `attributePRsToAgent: false` for this
repo.
- Adds an agent rule instructing not to append "Made with Cursor"
footers to PR descriptions.
The release workflow was pushing directly to main, which fails under branch protection and ignored tags created from 5.x. Resolve the branch from the release target, update CHANGELOG there, and open an auto-merge PR instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add unit tests for core modules, plugins, and service provider behavior. Exclude command scaffolding from coverage metrics, fix packagePath() and stub resolution, and extend test module helpers for Filament panels and plugins.

Co-authored-by: Cursor <cursoragent@cursor.com>
Normalize stub and module output paths to the platform directory separator so generator tests and file resolution behave consistently on Windows CI runners.

Co-authored-by: Cursor <cursoragent@cursor.com>
coolsam726 and others added 13 commits June 13, 2026 19:36
Run Laravel 11, 12, and 13 testbench combinations on PHP 8.5 alongside the existing 8.3 and 8.4 jobs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Laravel 11 does not support PHP 8.5 reliably; keep 8.5 coverage on Laravel 12 and 13 only.

Co-authored-by: Cursor <cursoragent@cursor.com>
Exercise all prompt hint match branches, stub replacement formats, view path resolution, and module prompt metadata.

Co-authored-by: Cursor <cursoragent@cursor.com>
…rovider

Add unit tests for panel discovery edge cases, plugin registration and navigation, provider auto-discovery, stub publishing, and optional package configuration paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fail Pest coverage runs below 98% locally and in CI, and align Codecov project and patch status checks with the same target.

Co-authored-by: Cursor <cursoragent@cursor.com>
Exercise the install command endWith callback so config publishing and package setup are verified in CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
## Summary
- Fix the Update Changelog workflow failing under branch protection by
opening an auto-merge PR instead of pushing directly to a protected
branch.
- Resolve the target branch from the release (`target_commitish`, with a
tag-based fallback) so releases tagged from `5.x` update `CHANGELOG.md`
on `5.x` instead of `main`.
- Improve unit test coverage for core library code (~90% on non-command
sources), fix `Modules::packagePath()`, and correct stub path resolution
in `GeneratesModularFiles`.
- Exclude `src/Commands/**` and unused concern traits from coverage
reporting.

## Test plan
- [x] `vendor/bin/pest --ci` (57 tests)
- [x] `./vendor/bin/phpstan analyse`
- [ ] Merge this PR
- [ ] Re-run or re-publish the v5.3.0 release and confirm the workflow
opens a PR against `5.x`
- [ ] Confirm Codecov reflects improved coverage after the next coverage
workflow run
Update CHANGELOG

Co-authored-by: coolsam726 <5610289+coolsam726@users.noreply.github.com>
* fix: merge changelog PR directly when auto-merge is unavailable

GitHub rejects --auto on PRs that are already mergeable (no pending required checks).
Fall back to a direct squash merge so the post-release changelog workflow completes.

Co-authored-by: Cursor <cursoragent@cursor.com>

* ci: run coverage on PHP 8.4 and Laravel 13

Align the coverage workflow with the existing P8.4 L13 test matrix job by
installing Laravel 13, testbench 11, and Pest 4 plugin constraints.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Update CHANGELOG

Co-authored-by: coolsam726 <5610289+coolsam726@users.noreply.github.com>
Bring 5.x fixes, tests, CI coverage railguard, and changelog workflow
improvements onto main while preserving v6 runtime contracts, Laravel
12+ requirements, and ModuleRegistry-based command discovery.

Also fixes NwidartModuleRegistry type hint for module instances.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add integration tests for FileModuleActivator, Nwidart registry/definition,
module facades, and remaining ModulesServiceProvider runtime branches brought
in from the 5.x sync.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace nullsafe calls on Module::find() with explicit null checks and
build the registry collection via a ModuleDefinition factory method.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coolsam726
coolsam726 merged commit 0af6499 into main Jun 13, 2026
10 checks passed
@coolsam726
coolsam726 deleted the sync/5x-into-main branch June 13, 2026 18:01
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