Repository navigation
2.4.0
Improvements
Custom Linter Tasks System
Added a flexible linter system for running project-specific code quality checks that don't fit into standard static analysis tools (phpcs, phpstan, rector).
Run them in locally and in your CI.
Key Highlights:
- Extensible: Create custom tasks in App\Command\Linter\Task\
- Fast: Designed for quick validation (completes in seconds)
- Configurable: Enable/disable tasks via FQCN-based config
Included Default Tasks
Four production-ready linter tasks are included and enabled by default:
- no-mixed-in-templates - Enforce specific type annotations in templates (not mixed)
- use-orm-query - Detect incorrect Cake\Database\Query imports (should be Cake\ORM\Query\SelectQuery)
- use-base-migration - Flag deprecated AbstractMigration/AbstractSeed usage
- single-request-per-test - Validate controller tests have only one request per method
Usage Examples
# Run all tasks
bin/cake linter
# Run with verbose output (shows paths)
bin/cake linter -v
# Run specific task
bin/cake linter --task use-orm-query
# List available tasks
bin/cake linter --list
Configuration
Customize tasks in config/app.php:
'TestHelper' => [
'Linter' => [
'tasks' => [
// Add custom tasks
\App\Command\Linter\Task\MyCustomTask::class,
// Disable default tasks
\TestHelper\Command\Linter\Task\UseOrmQueryTask::class => false,
],
],
],Full Changelog: 2.3.0...2.4.0