modern-php

Guide PHP 8.3-8.5 code with strict types and PSR-12 standards.

1|Updated Aug 6, 2025
One-click install
npx skills add https://github.com/vix-4800/Workstation --skill modern-php
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: modern-php
Source: https://github.com/vix-4800/Workstation/tree/main/roles/ai-tools/files/agents/skills/modern-php
Command: npx skills add https://github.com/vix-4800/Workstation --skill modern-php

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Write robust, modern PHP by applying strict typing, PSR-12 conventions, and a verified toolchain for PHP 8.3-8.5.

Core Features & Use Cases

  • Enforces strict types and modern PHP features as a baseline for new and existing code.
  • Provides framework-pattern guidance for Yii2, Laravel, and Symfony, to align architectures.
  • Integrates a comprehensive verification pipeline (phpcs, phpstan, rector, phpmd, php-cs-fixer, phpunit, Pest) to catch issues early.

Quick Start

Run the modern-php guidance on your codebase to adopt strict types, modern features, and the project tooling.

Frequently Asked Questions about modern-php

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

FAQPage Schema
How do I enforce strict types and PSR-12 in a PHP 8.3 codebase?▼

Apply `declare(strict_types=1)`, PSR-12 conventions, and explicit type declarations to your PHP 8.3 codebase. Constructor promotion is used where appropriate to ensure robust, modern PHP architecture.

What's the best way to set up a PHP verification pipeline with phpstan and phpcs?▼

Build a verification pipeline using phpstan, phpcs, rector, phpmd, and php-cs-fixer. This toolchain enforces strict coding standards and catches issues early in your PHP development workflow.

Does this modern PHP guidance work with Laravel and Symfony frameworks?▼

Yes, the modern PHP guidance applies to Laravel, Symfony, and Yii2. It provides framework-pattern guidance to align architectures while enforcing strict types and modern features across these platforms.

How do I use Rector and PHPUnit in a verification-driven PHP workflow?▼

Integrate Rector for automated code upgrades and PHPUnit or Pest for testing within a verification-driven PHP workflow. This ensures code changes are validated and compliant with strict typing rules.

Why should I use strict_types in PHP 8.5 projects?▼

Use `declare(strict_types=1)` in PHP 8.5 projects to prevent type coercion bugs and enforce explicit type declarations. It establishes a robust baseline for modern PHP features and verification toolchains.