php-expert

Provide expert PHP 8+ guidance with Laravel, Composer, and PSR standards.

41|9|Updated Jan 13, 2026
One-click install
npx skills add https://github.com/personamanagmentlayer/pcl --skill php-expert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: php-expert
Source: https://github.com/personamanagmentlayer/pcl/tree/main/stdlib/languages/php-expert
Command: npx skills add https://github.com/personamanagmentlayer/pcl --skill php-expert

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance and examples for modern PHP development, enabling developers to build robust, efficient, and maintainable applications using the latest features and best practices.

Core Features & Use Cases

  • PHP 8+ Features: Detailed explanations and code examples for new language constructs like union types, named arguments, attributes, match expressions, and the nullsafe operator.
  • Object-Oriented PHP: Covers core OOP concepts, namespaces, autoloading, and type declarations.
  • Modern PHP Practices: Demonstrates strict types, enums, readonly properties, and other modern syntax.
  • Laravel Framework: Provides examples for Models, Controllers, Form Requests, API Resources, Eloquent Queries, Migrations, Jobs, and Events/Listeners.
  • Testing: Illustrates feature and unit testing with PHPUnit, including factories.
  • Best Practices: Highlights type safety, dependency injection, PSR standards, and anti-patterns to avoid.

Quick Start

Use the php-expert skill to generate a basic Laravel controller for managing posts.

Frequently Asked Questions about php-expert

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

FAQPage Schema
How do I use PHP 8 features like union types and match expressions in my code?

PHP 8 features like union types, match expressions, and the nullsafe operator enable stricter type safety and cleaner control structures. Modern PHP practices utilize these constructs alongside readonly properties and enums to build robust, maintainable applications.

What's the best way to structure Laravel controllers and models for a scalable application?

Structuring Laravel controllers and models for scalable applications involves leveraging Form Requests for validation, API Resources for responses, and Eloquent Queries for data access. This approach ensures separation of concerns and maintainable code.

How do I write feature and unit tests in Laravel using PHPUnit?

Writing feature and unit tests in Laravel using PHPUnit involves utilizing factories to generate test data and asserting responses. Testing methodologies focus on verifying application behavior to ensure robust and maintainable PHP applications.

Does this PHP guidance cover Composer and PSR standards?

Yes, this PHP guidance covers Composer for dependency management and strict adherence to PSR standards. Following these standards alongside object-oriented programming and type safety ensures highly maintainable and scalable applications.

How do I implement dependency injection and avoid anti-patterns in modern PHP?

Implementing dependency injection in modern PHP prevents tight coupling and avoids common anti-patterns. By applying strict types, namespaces, and autoloading, developers achieve scalable and maintainable object-oriented applications.

Can I use this to generate code examples for Laravel jobs and events?

Yes, you can generate code examples for Laravel Jobs and Events/Listeners. The guidance provides specific implementations for background processing and event-driven architectures to build robust PHP applications.