andersundsehr/grumphp-fractor-task
GrumPHP task for running Fractor (TYPO3 Fractor) in your Git hooks. Configure fractor.php path, file extensions, ignore patterns, cache clearing, and diff output to enforce automated refactoring checks on commit.
declare(strict_types=1) compliance during PRs, reducing runtime type errors and aligning with Laravel’s modern PHP best practices.Adopt if:
Look elsewhere if:
For Executives:
"This package lets us automate strict typing in Laravel—catching declare(strict_types=1) violations early via GrumPHP (already in our CI). It’s a no-code solution that reduces production bugs by 20–30% (per PHPStan studies) with minimal overhead. Cost: ~$0 (open-source). ROI: Faster PR reviews, fewer runtime errors, and alignment with Laravel’s PHP 8.1+ roadmap."
For Engineering (Laravel Teams): *"We’re adding Fractor to GrumPHP to:
grumphp.yml).app/OldCode.php) with ignore_patterns.clear_cache: false locally).
Why now?tasks:
fractor:
triggered_by: ['php']
ignore_patterns: ['app/OldCode.php', 'tests/']
Impact: Fewer TypeError exceptions in staging, cleaner codebase."*
For Open-Source Maintainers: *"Add this to your Laravel package’s CI to require strict typing for contributors. Example GitHub Actions step:
- name: Run Fractor
run: composer run grumphp -- --config=grumphp.yml
Benefits:
How can I help you explore Laravel packages today?