Agent skill

PHP Tooling

PHP ecosystem tooling, dependency management, and static analysis.

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/tooling

Metadata

Additional technical details for this skill

labels
php composer toolchain static-analysis
triggers
{
    "files": [
        "composer.json"
    ],
    "keywords": [
        "composer",
        "lock",
        "phpstan",
        "xdebug"
    ]
}

SKILL.md

PHP Tooling

Priority: P2 (MEDIUM)

Structure

text
project/
├── composer.json
├── phpstan.neon
└── .php-cs-fixer.php

Implementation Guidelines

  • Composer Lock: Commit composer.lock for environment parity.
  • PSR-4: Strictly map namespaces to src/ and tests/.
  • Static Analysis: Integrate PHPStan (level 5+) in CI.
  • Linting: Automate PSR-12 enforcement via PHP CS Fixer.
  • Debugging: Use Xdebug for profiling; avoid var_dump.
  • Scripts: Define lint, analyze, test in composer.json.

Anti-Patterns

  • Manual Requires: No Manual Require: Rely on Composer autoload.
  • Blind Updates: No Blind Updating: Review composer.lock diffs.
  • Production Debug: No Prod Xdebug: Disable debugging in live env.
  • Vendor Commits: No Vendor Check-in: Exclude vendor/ from git.

Code

json
{
  "autoload": {
    "psr-4": { "App\\": "src/" }
  },
  "scripts": {
    "analyze": "phpstan analyze"
  }
}

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results