Php modernization

From dirnbauer/webconsulting-skills · View interactive version

Php modernization is an AI agent skill from the GitHub repository dirnbauer/webconsulting-skills. Use when modernizing PHP code: PHP 8.1-8.5 features, PSR/PHP-FIG/PER-CS compliance, PHPStan/Rector/PHP-CS-Fixer/PHPat tooling, DTOs/enums/readonly/property hooks, type safety. Triggers: PHP modernization, type safety, PHPStan, Rector, PHP-CS-Fixer, enum, DTO, readonly, strict_types, property hooks,

How to use this skill

Skill file

PHP Modernization

Agent contract

  1. Discover: uv run ${CLAUDE_SKILL_DIR}/scripts/introspect.py (cheap), or verify_php_project.py --summary (full, with agent_actions[]).
  2. Drill: ... --check PM-XX per finding. Full output when triaging >3.
  3. Apply: uv run ${CLAUDE_SKILL_DIR}/scripts/modernize_loop.py --mode dry-run. Review transcript before applying.
  4. References: load on demand; do not pre-load.

Reference routing

| Need | Read |

|---|---|

| PHP 8.0-8.3 baseline | references/php8-features.md |

| PHP 8.4 | references/php-8.4.md |

| PHP 8.5 | references/php-8.5.md |

| PSR / PER-CS | references/psr-per-compliance.md |

| PHPStan config | references/phpstan-compliance.md |

| Static analysis | references/static-analysis-tools.md |

| PHP-CS-Fixer deprecations | references/php-cs-fixer-deprecations.md |

| DTOs / VOs / inputs | references/type-safety.md, references/request-dtos.md |

| Adapter / registry | references/adapter-registry-pattern.md |

| Multi-version compat | references/multi-version-adapters.md |

| Symfony patterns | references/symfony-patterns.md |

| PSR-15 middleware | references/psr15-middleware-architecture.md |

| Doctrine edges | references/doctrine-modernization-edges.md |

| API Platform | references/api-platform-edges.md |

| Immutability | references/immutability-boundaries.md |

| Contracts & invariants | references/contracts-and-invariants.md |

| Mutation testing | references/mutation-testing.md |

| Migration planning | references/migration-strategies.md |

| PHPUnit 12→13, mock vs stub | references/phpunit-modernization.md |

| Multi-agent dispatch hazards | references/multi-agent-pitfalls.md |

Hard guardrails

Migration checklist


Credits & Attribution

This skill is based on the excellent work by

Netresearch DTT GmbH.

Original repository: https://github.com/netresearch/php-modernization-skill

Copyright (c) Netresearch DTT GmbH — Methodology and best practices (MIT / CC-BY-SA-4.0)

Special thanks to Netresearch DTT GmbH for their generous open-source contributions to the TYPO3 community, which helped shape this skill collection.

Adapted by webconsulting.at for this skill collection

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.