php-pro

Implement type-safe Laravel and Symfony APIs with PHP 8.3 and PHPStan level 9.

Updated Jan 19, 2026
One-click install
npx skills add https://github.com/Reshzy/AgricultureRMS --skill php-pro-reshzy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: php-pro
Source: https://github.com/Reshzy/AgricultureRMS/tree/main/.cursor/skills/php-pro
Command: npx skills add https://github.com/Reshzy/AgricultureRMS --skill php-pro-reshzy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

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.

Frequently Asked Questions about php-pro

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce strict typing and PSR-12 compliance in a Laravel or Symfony project?

To enforce strict typing and PSR-12 compliance, apply declare(strict_types=1) alongside PHP 8.3+ features like readonly properties and enums, then validate code style and architecture using PHPStan level 9 static analysis.

What is the best way to structure a type-safe PHP API endpoint with DTOs?

The best way to structure a type-safe PHP API endpoint is to replace untyped CRUD logic with a typed DTO, constructor-injected service layer, repository pattern, dedicated controller, database migration, and accompanying PHPUnit or Pest tests.

Can I use PHPStan level 9 and PHPUnit to achieve high test coverage in PHP services?

Yes, you can use PHPStan level 9 for rigorous static analysis and PHPUnit or Pest tests to achieve over 80% code coverage, ensuring your PHP services remain maintainable and free from runtime type errors.

Does this workflow support building high-concurrency async PHP endpoints?

Yes, the workflow supports building high-concurrency async PHP endpoints by providing specific guidance for integrating asynchronous frameworks like Swoole, ReactPHP, or Amphp into your application architecture.

What PHP version is required for modern type-safe service development with typed DTOs?

Modern type-safe service development with typed DTOs requires PHP 8.3 or higher to utilize advanced language constructs including readonly properties, enums, and fibers for strict and maintainable code.