php-expert

Enforce PHP 8.4 expert practices with strict typing and PSR-12 style.

2|Updated Feb 28, 2024
One-click install
npx skills add https://github.com/coagus/php-api-builder --skill php-expert-coagus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: php-expert
Source: https://github.com/coagus/php-api-builder/tree/main/.claude/skills/php-expert
Command: npx skills add https://github.com/coagus/php-api-builder --skill php-expert-coagus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides developers in adopting expert-level PHP 8.4 practices to improve code quality, safety, and maintainability.

Core Features & Use Cases

  • Property hooks and asymmetric visibility to enforce encapsulation and data integrity.
  • Attribute-driven design, strict typing, and PSR-12 style guidance for readable, safer code.
  • Clear guidelines for header declarations, exception design, and immutable patterns to reduce bugs.

Quick Start

Start a PHP 8.4 project by enabling strict types, applying property hooks and asymmetric visibility, and annotating code with attributes to enforce correctness.

Frequently Asked Questions about php-expert

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

FAQPage Schema
How do I enforce strict type safety and PSR-12 coding standards in a PHP 8.4 project?

Apply strict type header declarations, property hooks, asymmetric visibility, and attribute-driven metadata across modules to enforce strict type safety and PSR-12 guidelines for readable, safer PHP 8.4 code.

What is the best way to implement immutable patterns and asymmetric visibility in PHP 8.4?

Implement immutable patterns and asymmetric visibility in PHP 8.4 by utilizing property hooks to enforce encapsulation and data integrity, reducing bugs while maintaining robust error handling and strict typing.

How do I use attribute-based metadata to improve PHP 8.4 code quality?

Use attribute-based metadata to improve PHP 8.4 code quality by annotating code structures to enforce correctness, applying clear guidelines for header declarations and exception design to prevent common pitfalls.

Does PHP 8.4 require strict type declarations for robust error handling and refactoring?

Yes, PHP 8.4 requires strict type declarations to support robust error handling and refactoring, applying expert-level development practices to prevent common pitfalls and improve code safety and maintainability.

When do I need property hooks and asymmetric visibility for PHP refactoring?

You need property hooks and asymmetric visibility during PHP refactoring when enforcing encapsulation and data integrity across modules and packages is required to achieve strict type safety and immutable patterns.