php-pro

Enforce strict typing and PHPStan level 9 in Laravel or Symfony projects.

10.9k|1.0k|Updated Oct 20, 2025
One-click install
npx skills add https://github.com/Jeffallan/claude-skills --skill php-pro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: php-pro
Source: https://github.com/Jeffallan/claude-skills/tree/main/skills/php-pro
Command: npx skills add https://github.com/Jeffallan/claude-skills --skill php-pro

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you build PHP applications with modern PHP 8.3+ features, Laravel/Symfony patterns, and enterprise-grade practices to save time and reduce boilerplate.

Core Features & Use Cases

  • Strict typing & quality gates: Enforce declare(strict_types=1) and PHPStan level 9 for robust code.
  • Framework patterns: Implement services, repositories, and controllers with PSR-12.
  • Async patterns: Use Swoole/ReactPHP for concurrent PHP tasks and event-driven flows.

Quick Start

Use the PHP Pro skill to scaffold a Laravel-like service layer and a repository interface for a sample User entity.

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 PHPStan level 9 in a Laravel or Symfony project?

Strict typing in PHP 8.3+ is enforced by adding declare(strict_types=1) at the top of files and configuring PHPStan to level 9 in your phpstan.neon config. This catches type mismatches and null errors before runtime, reducing bugs in Laravel and Symfony applications.

What are modern PHP patterns for enterprise applications?

Modern PHP patterns include domain-driven design, dependency injection, typed entities and repositories, PSR-12 standards, input validation, and comprehensive PHPUnit testing. These patterns structure Laravel and Symfony code for scalability, maintainability, and secure coding practices in PHP 8.3+ environments.

Can I use async patterns like Swoole or ReactPHP in Laravel?

Yes, Swoole and ReactPHP enable concurrent task handling and event-driven flows in Laravel applications. These async patterns improve performance for I/O-bound operations while maintaining the framework's service and repository layers with proper dependency injection.

How do I implement a repository pattern with typed entities in PHP?

Create repository interfaces with typed return types, implement them with dependency injection, and bind typed entity classes to them. PHPStan level 9 validates the types throughout, ensuring consistency in Laravel or Symfony data access layers.

What's the best way to structure a service layer in modern PHP?

Organize services with dependency injection, strict typing, PSR-12 naming conventions, and clear separation from controllers and repositories. Combine with PHPUnit tests and PHPStan analysis to ensure testable, maintainable enterprise PHP 8.3+ architecture.

Do I need PHP 8.3+ to use enterprise PHP patterns?

PHP 8.3+ is required for this Skill's patterns, as it provides strict typing features, named arguments, attributes, and other modern constructs that enable domain-driven design and robust static analysis with PHPStan level 9.