pluswerk/grumphp-config
A GrumPHP configuration package for Laravel/PHP projects that auto-generates grumphp.yml, rector.php, phpstan.neon, and a baseline, pulling in project-specific resources as needed. Override any settings directly in the generated grumphp.yml.
Strengths:
composer_validate_autoload (PR #124): The first change in this line to add a Laravel-relevant quality gate rather than pure backport housekeeping. Autoload drift (renamed/moved classes in app/, packages/, or modular src/ trees not reflected after composer dump-autoload) is a well-known Laravel failure mode that surfaces late — in CI test runs or, worse, in production class not found errors. Catching it as a pre-commit/CI task is directly aligned with how Laravel teams work.phpro/grumphp v2.x task referenced by documentation link, so it inherits the existing execution model (parallel runner, git hooks, CI invocation). No new plugin API, no new runtime dependency, no additional config surface beyond a tasks: entry.Gaps:
pluswerk/grumphp-config inherits it on the next upgrade without a config change. For Laravel projects with non-standard autoload setups (classmap-heavy legacy app/ code, generated proxies, multi-namespace modules), this converts an upgrade into a potentially failing upgrade.11.1.1...11.2.0. The 10.x → 11.x step is a major bump whose contents (minimum PHP/GrumPHP versions, config key renames, task defaults) are not evidenced in the supplied data and must be reviewed before adoption.route:list, migrate:status, config:cache, artisan optimize, or pint. Custom tasks: entries remain required.vendor/ exclusion guidance is addressed; this release adds a Composer process to each run, marginally increasing the cost the prior assessment already flagged.post-autoload-dump hook (@php artisan package:discover) is relevant if the task shells out to Composer without --no-scripts.composer require --dev), but the major-line change means the previous pin (@10.2.8) is now stale. Pin explicitly (:11.2.0 or ^11.2) and upgrade on a branch with composer update --with-dependencies.tasks: block, and control ordering via metadata.priority if autoload validation should run before static analysis.phpstan/extension-installer plus Laravel rules, Pint still needs to override PHP-CS-Fixer, Rector still needs Laravel rule sets. None of this is addressed by 11.2.0.--no-scripts. If not, Laravel's package:discover hook can fire during the check, which is undesirable in build stages lacking .env/APP_KEY.| Risk Area | Severity (Updated) | Mitigation Strategy |
|---|---|---|
| Major-version upgrade (10.x → 11.x) | High | Review the full 10.2.8...11.2.0 changelog and UPGRADE notes, not just the published 11.2.0 notes. Upgrade in a branch, run grumphp run against a clean tree, diff task output vs. the 10.2.8 baseline. |
| Autoload validation failures (new task) | Medium | Pre-flight every affected repo with a clean composer dump-autoload -o before upgrading. Where classmap/generated autoload is intentional, disable the task per project (composer_validate_autoload: ~ under tasks, or an ignore_patterns entry) rather than globally. |
| Default-ON shared config | Medium | Treat the upgrade as a behavioral change: record it in the team changelog, notify squads, and standardize an opt-out snippet for projects that can't satisfy the check. |
| Composer script side effects | Medium | Verify --no-scripts behavior in the upstream task; if scripts run, add --no-scripts-equivalent handling or gate the task to CI only where env is provisioned. |
| Tooling conflicts (Pint vs. CS-Fixer) | High (unchanged) | Audit grumphp.yml post-upgrade; override conflicting rules. |
| PHPStan false positives | Medium (unchanged) | phpstan-baseline.neon + phpstan/extension-installer; test against Eloquent dynamic properties/magic methods. |
| Performance overhead | Medium (slightly raised) | Explicit parallel: true; exclude vendor/; measure the added Composer process; consider running the autoload task pre-push rather than pre-commit. |
| Laravel-specific task gaps | High (unchanged) | Supplement with custom tasks (phpunit, artisan optimize, route:list) or third-party packages. |
| Dependency bloat | Low | Dev-only; unchanged. |
compare/10.2.8...11.2.0 before any upgrade.composer_validate_autoload run Composer with --no-scripts (and does it touch composer.lock)? If Laravel's package:discover hook fires, is that acceptable in our CI image?composer.json roots (app + local packages), which root does the task validate? Do we need per-package task instances?artisan-based tasks, given the package has again shipped no Laravel-specific tooling?andersundsehr/grumphp-config releases, given backports (PR #112) and shared-config additions (PR #124) both change behavior without requiring a config edit?composer.json/composer.lock hygiene become part of the quality gate.execute/tasks; unchanged.grumphp.yml.spatie/laravel-rector still required for Laravel rule sets.composer validate and Laravel's package:discover by catching PSR-4/classmap drift earlier.10.2.8...11.2.0 changelog and confirm major-version implications (PHP/GrumPHP minimums, config keys, removed tasks).composer dump-autoload -o must complete cleanly on main.grumphp.yml for TYPO3-specific rules to strip.composer require --dev pluswerk/grumphp-config:^11.2
vendor/bin/grumphp tasks | grep composer_validate_autoload
time vendor/bin/grumphp run --tasks=composer_validate_autoload
tasks:
composer_validate_autoload:
ignore_patterns: []
parallel: true and vendor/ exclusions; measure total run time vs. 10.2.8.phpstan.neon with Laravel rules via phpstan/extension-installer.tasks:
composer_validate_autoload: ~
phpunit: ~
artisan:
optimize: ~
route:list: ~
grumphp run output between the 10.2.8 baseline branch and the 11.2.0 branch; any new failure outside composer_validate_autoload is an undocumented behavior change and should block rollout.| Component | Compatibility Notes |
|---|---|
| Laravel Framework | ✅ Expected compatible (PHP 8.5+); re-verify 11.x minimums — not stated in the 11.2.0 notes. |
| Composer 2 / autoload config | ✅ New task targets this directly; ⚠️ repos with classmap or generated autoload may need an opt-out. |
| Laravel package discovery | ⚠️ Confirm --no-scripts handling so package:discover doesn't run during validation. |
| Laravel Breeze/Jetstream | ✅ Works if PHP 8.5+ and a clean composer dump-autoload. |
| Lumen/Octane | ⚠️ Octane's generated/proxy classes are a plausible source of autoload-validation noise; test explicitly. |
| Pint | ⚠️ Still override PHP-CS-Fixer in grumphp.yml. |
| PHPStan | ✅ Extend with phpstan/extension-installer; baseline Laravel false positives. |
| Rector | ✅ Use spatie/laravel-rector. |
| DDEV | ✅ Built-in DDEV environment detection — useful, since the autoload task shells out to Composer. |
| Monorepos | ❌ Still not optimized; now with an added open question about which composer.json root is validated. |
composer dump-autoload -o.10.2.8...11.2.0 changelog.composer require --dev pluswerk/grumphp-config:^11.2 on a feature branch.parallel: true; decide the composer_validate_autoload opt-out policy per project.grumphp run — confirm exactly one new class of failure (autoload), nothing else.--parallel; measure delta in pipeline duration.grumphp.yml diverges from the shared config. The 11.2.0 addition shows how the shared config grows: silently, from the consumer's perspective. Maintain a per-repo grumphp.yml diff review as part of the dependency-upgrade checklist.10.2.8 to an 11.x line, and the 10.x assessment baseline is now historical. Record the target version and the reviewed changelog range in the repo.andersundsehr/grumphp-config releases plus phpro/grumphp task documentation changes.composer_validate_autoload" will be unfamiliar to Laravel developers. Prepare a one-page runbook: what the task checks, the standard fix (composer dump-autoload -o, correct PSR-4 mapping, remove stale classmap entries), and how to request an opt-out.grumphp run -vvv output and the composer.lock diff before filing upstream.composer.json roots may each need validation, which the shared config does not express. Defer broad rollout in monorepos until this is tested.| Failure Mode | Symptom | Handling |
|---|---|---|
| Autoload mismatch on upgrade | Commits/PRs fail immediately post-upgrade on composer_validate_autoload |
Expected for drift-prone repos; fix autoload or apply the documented opt-out. Not a package defect. |
| Composer script side effects | package:discover or other Laravel hooks fire during validation; CI fails on missing .env/APP_KEY |
Confirm --no-scripts; otherwise provision minimal env in the validation stage or gate the task to CI-only. |
| Major-version config incompatibility | grumphp.yml keys rejected or tasks silently dropped after upgrading to 11.x |
Pin the version, run grumphp validate / grumphp tasks before merging; treat as a blocking upgrade defect. |
| False positives on generated code | Validation flags Octane proxies, IDE helpers, or generated classmaps | Exclude via ignore_patterns or disable the task for that repo. |
| Silent strictness change | A previously passing repo begins failing on an unrelated task | Compare 10.2.8 vs. 11.2.0 output; revert the pin and file upstream with -vvv logs. |
| Hook-related local friction | Slow pre-commit runs on large repos | Move autoload validation to pre-push/CI; keep fast linters pre-commit. |
composer_validate_autoload is a one-line config change. The real effort is validating the 10.x → 11.x major step and re-running the 10.2.8-era risk mitigations (Pint override, PHPStan extension, baseline files) against the new line.How can I help you explore Laravel packages today?