Entwicklung

PHP Modernization

PHP-8.x-Modernisierung: Type-Safety, Enums, DTOs, PHPStan, Rector.

Letztes Release v1.17.1

Installation

Nimm den Weg, der zu deinem Projekt passt — alle führen zum selben Skill.

  1. Claude Code über diesen Marketplace
    /plugin install php-modernization@netresearch-claude-code-marketplace
  2. npx beliebige Agent-Skills-CLI
    npx skills add https://github.com/netresearch/php-modernization-skill --skill php-modernization

    Universelle Agent-Skills-CLI von skills.sh — funktioniert in Claude Code, Cursor, GitHub Copilot, Codex, Gemini CLI und 30+ weiteren Agents.

  3. composer require PHP-Projekt, als Paket
    composer require netresearch/php-modernization-skill

    Setzt netresearch/composer-agent-skill-plugin voraus — bindet Agent Skills als Composer-Dependencies in PHP-Projekte ein, erkennt Skills automatisch, generiert AGENTS.md.

  4. composer skills:add PHP-Projekt, direkte Quelle
    composer skills:add github:netresearch/php-modernization-skill

    Kommt aus netresearch/composer-agent-skill-plugin — pinnt Skill-Repos direkt ohne Packagist-Veröffentlichung, persistiert in composer.skills.lock.

Wofür du den Skill einsetzt

  • Agent contract: a Python verifier (verify_php_project.py), orchestrator (modernize_loop.py), and cheap profiler (introspect.py). stable structured output (JSON with schema_version 1.0.0, SARIF 2.1.0, or JUnit XML), archetype detection, and machine-readable agent_actions[] recommendations downstream agents can act on without re-reading the prose references.
  • Hard guardrails: five binding refusal cases enforced in SKILL.md (no readonly on Doctrine entities, no Rector without --dry-run, baseline shrink-not-delete, no blanket final on mock targets, no editing generated files).
  • PHP 8.x feature coverage: 8.0–8.3 baseline, dedicated 8.4 reference (released 2024-11: property hooks, asymmetric visibility, lazy objects, array_find / array_any / array_all), and dedicated 8.5 reference (released 2025-11: pipe |>, array_first / array_last, #[\NoDiscard]).
  • Static-analysis stack: PHPStan (level 9+, level 10 recommended), PHPat (architecture testing), Rector (automated refactoring), PHP-CS-Fixer (@PER-CS), Infection (mutation testing in PR-diff mode), composer audit.
  • Type-safety patterns: DTOs and Value Objects over arrays, generic collection typing via PHPDoc, strict typing everywhere, immutability boundaries (readonly vs. property hooks vs. classic mutation).
  • Framework edges: dedicated references for Doctrine 2.x/3.x edges, API Platform resource separation, and PSR-15 middleware architecture.
  • PSR / PER-CS compliance: PSR-1, 3, 4, 6, 7, 11, 13, 14, 15, 16, 17, 18, 20 plus PER Coding Style. PSR-12 superseded by PER-CS.
  • Project-archetype detection: generic-composer, typo3-extension, symfony-app, monorepo-package. The verifier and orchestrator branch on archetype.
  • Regression suite: synthetic fixtures plus golden-output snapshots guard the verifier from contract drift.

Was der Skill im Projekt erwartet

Tags

  • development
  • quality-security