- Can I use this package in a Laravel 10+ project with PHP 8.5?
- Yes, the package explicitly supports Laravel 10+ and PHP 8.5+. The backport in PR #112 ensures compatibility without introducing breaking changes, making it safe for modern Laravel stacks.
- Will this conflict with existing PHP-CS-Fixer or Pint configurations?
- The package generates a default `grumphp.yml` but allows full customization. If you’re using Pint, you can override the PHP-CS-Fixer tasks or exclude them entirely in the generated config.
- How do I customize the PHPStan rules for Laravel-specific false positives?
- Use the generated `phpstan-baseline.neon` to baseline Laravel-specific issues (e.g., dynamic Eloquent properties). Extend with `phpstan/extension-installer` for Laravel’s ruleset.
- Does this package add Laravel-specific tasks like `route:list` checks?
- No, it focuses on generic code quality. You’ll need to manually add custom tasks in `grumphp.yml` (e.g., for `route:list` or `migrate:status`) or use third-party packages like `spatie/laravel-phpstan-rules`.
- Is this package safe for CI/CD pipelines without slowing them down?
- Yes, but optimize performance by enabling parallel execution (`parallel: true` in `grumphp.yml`) and excluding `vendor/` from scans. Test in CI first to validate speed.
- How do I remove TYPO3-specific rules since I’m using Laravel?
- Edit the generated `grumphp.yml` to disable or remove TYPO3-related tasks (e.g., `grumphp-xliff-task`). The package doesn’t enforce TYPO3 rules by default, but manual cleanup may be needed.
- What happens if I update to a newer version with undocumented changes?
- Compare outputs with the previous version (e.g., 10.2.7) in a staging environment. The package’s backport strategy minimizes risks, but always test critical workflows post-update.
- Can I integrate this with Laravel’s Telescope or other dev tools?
- Yes, add custom tasks in `grumphp.yml` to run `telescope:check` or other Artisan commands. The package doesn’t include these by default but supports extensions.
- Should I run GrumPHP in pre-commit hooks or only in CI?
- For local devs, pre-commit hooks improve feedback loops, but CI-only is safer to avoid performance overhead. Use `parallel: true` and exclude heavy directories if running locally.
- Are there alternatives for Laravel-specific code quality tools?
- For Laravel-native solutions, consider `spatie/laravel-phpstan-rules` (PHPStan) or `nunomaduro/larastan` (pre-configured PHPStan). This package is broader (TYPO3/PHP-agnostic) but requires manual Laravel tweaks.