php-quality

Run PHPStan level-8 analysis, Pint formatting, and PHPUnit/Pest tests.

8|2|Updated Oct 28, 2025
One-click install
npx skills add https://github.com/morodomi/tdd-skills --skill php-quality
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: php-quality
Source: https://github.com/morodomi/tdd-skills/tree/main/plugins/tdd-php/skills/php-quality
Command: npx skills add https://github.com/morodomi/tdd-skills --skill php-quality

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

PHP projects often suffer from inconsistent code quality and brittle tests. This Skill centralizes quality checks by integrating PHPStan static analysis, Pint formatting, and PHPUnit/Pest test runs to catch issues early and maintain a healthy codebase.

Core Features & Use Cases

  • Static Analysis: Run PHPStan at a strict level (e.g., 8) to identify type issues and code smells.
  • Code Formatting: Use Pint to enforce consistent code style across the project.
  • Test Execution: Run PHPUnit or Pest to validate behavior and ensure test reliability.
  • Use Case: Before merging a PHP feature branch, run the full quality checks to guarantee no regressions and style drift.

Quick Start

Use the php-quality skill to perform a full quality audit of a PHP project by invoking the configured commands in your CI or local environment.

Frequently Asked Questions about php-quality

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

FAQPage Schema
How do I enforce PHP code quality with PHPStan and PHPUnit before merging?

To enforce PHP code quality before merging, you can run a full quality audit using PHPStan static analysis at level 8, Pint formatting, and PHPUnit or Pest tests to prevent regressions and style drift.

Can I run PHPStan static analysis and Pint formatting on non-Laravel PHP apps?

Yes, you can run PHPStan static analysis and Pint formatting on non-Laravel PHP applications. These quality checks apply across both Laravel and non-Laravel projects in local development and CI pipelines.

What is the best way to run Pest and PHPStan checks consistently?

The best way to run Pest and PHPStan checks consistently is to centralize quality controls by integrating PHPStan level-8 analysis, Pint style formatting, and PHPUnit or Pest test execution into your pre-merge checks.

Does PHPStan level 8 analysis catch brittle tests and code smells?

PHPStan level 8 analysis identifies type issues and code smells to improve code consistency, while running PHPUnit or Pest tests validates behavior to catch brittle tests and ensure test reliability.

Why does PHP code style drift happen and how do I prevent it?

PHP code style drift happens due to inconsistent formatting across contributors, and you can prevent it by applying Pint formatting to enforce a consistent code style across the entire project.