- What Laravel and Filament versions does FilaCheck support?
- FilaCheck is designed specifically for Filament v4 and v5 projects. It requires PHP 8.1+ due to Filament’s version constraints. If you’re using Filament v6 or earlier versions, this package won’t work without potential rule updates.
- How do I install FilaCheck in my Laravel project?
- Run `composer require laraveldaily/filacheck --dev` to install it as a development dependency. This ensures it’s excluded from production builds. No additional Laravel configuration is needed beyond publishing the config if you want to customize rules.
- Can FilaCheck replace Laravel Pint or PHP-CS-Fixer for Filament-specific checks?
- Yes, but it’s complementary. FilaCheck focuses on Filament-specific deprecations and patterns (e.g., `reactive()` → `live()`), while tools like Pint handle general code style. Run both in CI for comprehensive static analysis—FilaCheck can be added to your existing linting pipeline.
- What’s the difference between the free and Pro versions of FilaCheck?
- The free version includes 16 rules covering deprecated Filament methods and basic best practices. The Pro version adds rules for performance, security, and UX issues (e.g., inefficient queries, accessibility warnings). If your project prioritizes these areas, Pro may be worth the cost.
- How does FilaCheck’s performance compare to PHPStan or Pest in CI?
- FilaCheck is lightweight for static analysis but may add 10–30 seconds to CI pipelines for large Filament codebases. Use the `--dirty` flag to scan only uncommitted files, reducing runtime. Benchmark it alongside your existing tools to optimize pipeline speed.
- Is the auto-fix feature (`--fix`) safe to use in CI?
- The `--fix` feature is in beta and should be used cautiously in CI. Start by running `--dry-run` to preview changes locally, then enable it in CI only after validating fixes. Avoid enabling it in CI for critical branches until you’re confident in its stability.
- How do I configure FilaCheck to ignore specific rules?
- Publish the config file with `php artisan vendor:publish --tag=filacheck-config`, then edit `config/filacheck.php` to disable rules. For example, set `'deprecated-reactive' => ['enabled' => false]` to skip checks for `reactive()` deprecations if you’re migrating incrementally.
- Will FilaCheck work with AI-generated Filament code (e.g., GitHub Copilot)?
- Absolutely. FilaCheck is ideal for catching Filament-specific anti-patterns in AI-generated code, such as deprecated methods or incorrect component namespaces. Run it post-generation (e.g., in a pre-commit hook) to catch issues early.
- Are there any false positives/negatives I should be aware of?
- Some rules, like `deprecated-test-methods`, are marked as ‘Partial’ due to incomplete coverage. False positives can occur with custom Filament extensions. Test FilaCheck locally first and adjust rule configurations as needed. The `--detailed` flag helps diagnose edge cases.
- Can I extend FilaCheck with custom rules for my team’s Filament patterns?
- Yes, FilaCheck’s modular architecture allows you to add custom rules. Contribute them to the package or extend it locally by creating a custom rule class following the existing pattern. Check the GitHub repository for extension guides or open an issue for support.