What problem does it solve?
Many PHP projects suffer from inconsistent typing, mixed architectural patterns, missing static analysis, and fragile tests which lead to runtime errors, technical debt, and slow delivery. This Skill provides a repeatable, opinionated workflow to produce strictly typed, PSR-compliant, and well-tested PHP services suitable for production.
Core Features & Use Cases
- Strong typing and modern PHP features: enforce declare(strict_types=1), readonly properties, enums, fibers, and other PHP 8.3+ constructs.
- Framework patterns: scaffold controllers, form requests/DTOs, repositories, service layers, jobs, and API resources for Laravel or Symfony.
- Quality gates: require PHPStan level 9 analysis, PHPUnit/Pest tests with high coverage, PSR-12 code style, and dependency injection best practices.
- Async and performance: guidance for Swoole, ReactPHP, or Amphp when building high-concurrency endpoints.
- Use Case: Replace an untyped CRUD endpoint with a typed DTO, service, repository, controller, migration, and accompanying tests to meet production standards.
Quick Start
Create a typed Laravel API endpoint using PHP 8.3+, add a CreateUser DTO, a constructor-injected UserService, a controller route, PHPStan level 9 checks, and a PHPUnit test demonstrating the happy path.