PHP Modernization Skill plugin
Skill for upgrading code to PHP 8.x: types, attributes, PHPStan, Rector and verification scripts reporting in JSON.
- 63 ★ on the repository
- Last commit
Extended access
Why this level
- Tools run analysis and may change project code; by the skill's rules Rector runs with `--dry-run` first.
Install
- Works in
Manual install
/plugin marketplace add netresearch/claude-code-marketplaceThe first README command adds the marketplace; then `/plugin install php-modernization@netresearch-claude-code-marketplace`.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Tools run analysis and may change project code; by the skill's rules Rector runs with `--dry-run` first.
This is third-party code. Review the repository files before installing.
What it does
PHP Modernization Skill guides an agent through upgrading an application to PHP 8.x with a focus on type safety, PSR and PER-CS standards and static analysis. It ships executable tools: the verifier `verify_php_project.py`, the loop `modernize_loop.py` and the quick profiler `introspect.py`. They write machine-readable reports in JSON, SARIF or JUnit with a list of recommended actions. References cover PHP 8.0 to 8.5 features, PHPStan up to level 10, PHPat, Rector, PHP-CS-Fixer, Infection and `composer audit`, along with Doctrine, API Platform and PSR-15 middleware. The skill detects the project type: generic package, TYPO3 extension, Symfony app or monorepo.
Who it is for. PHP developers and tech leads moving a legacy codebase to the modern language who want every step verified.
Good fit when
- A PHP 7 project is migrated to 8.x and the agent must move in small verified steps.
- Doctrine entities stay mutable and the model must not put `readonly` on them.
- CI needs a SARIF report on the project state.
- A PHPStan baseline is shrunk rather than deleted.
- A TYPO3 extension is checked against rules common to such projects.
Not a fit when
- The project is not PHP.
- Refactoring is wanted without static analysis and tests, which the tools assume.
- The environment cannot run Python for the checks.
Example request
Profile this PHP project, find outdated spots and propose a migration to PHP 8.4 in small steps with PHPStan checks.Limitations
The tools are written in Python, so its runtime is needed next to PHP. The license is mixed: code is MIT while the skill text is CC-BY-SA-4.0, which limits reuse of the texts. `SKILL.md` records five hard refusals: `readonly` on Doctrine entities, Rector without `--dry-run`, deleting the baseline instead of shrinking it, blanket `final` on mock targets and editing generated files. Large refactors still deserve human review.
How to disable. Remove the plugin through `/plugin` or the skill folder from the skills directory. Delete PHPStan and Rector configuration added to the project by hand.
FAQ
What is the agent contract?
Four steps: read `SKILL.md` and profile the project, narrow the scope, apply a fix and verify. Cheap commands go first and expensive analysis only when needed.
Which report formats exist?
JSON with schema version 1.0.0, SARIF 2.1.0 and JUnit XML. The JSON holds an `agent_actions[]` array with recommendations for downstream agents.
Which agents are supported?
Claude Code, Cursor, GitHub Copilot and other agents using the Agent Skills standard.
Can it be used without a marketplace?
Yes. Since Claude Code 2.1.157 a plugin directory under the personal skills folder loads on its own; the README describes the steps.
Why a regression suite?
Synthetic fixtures and golden snapshots guard the verifier against accidental output format drift.
Discussion
No questions or reviews yet.
Related
PluginsA Symfony plugin for Claude Code: 44 skills, 7 subagents and 13 commands for API Platform, Doctrine, TDD, Messenger and DDD
Four skills with Spatie's standards for Laravel, PHP, JavaScript, git and security, installed via Laravel Boost or skills.sh
A set of 14 skills for Java Spring Boot, from requirements analysis and code generation to tests, review and Docker deployment.
Laravel API Architecture Skill
Laravel API Production-Ready Architecture Skill
A skill that keeps an agent within a layered Laravel API architecture: JSON:API v1.1, strict types, PHPStan level 8 and tests
Skills for Java projects: code review, Spring Boot, JPA, concurrency, Java version migration, Maven audits and security
Prisma 8 skill
prisma-8
The official Prisma 8 skill installed from your project's packages: data contract, migrations, queries and version upgrades
README in short
A skill, references and an executable agent contract, with fixture projects, eval scenarios and drift protection.