Skillquality 0.46

php-modernization

Use when working with ANY PHP modernization task: upgrading PHP 8.1+ (TYPO3 v14.3 LTS accepts 8.2-8.5), adding strict types, configuring PHPStan/Rector/PHP-CS-Fixer, refactoring to enums/DTOs/readonly/property hooks (PHP 8.4), improving type safety, reviewing PHP code quality. Tr

Price
free
Protocol
skill
Verified
no

What it does

PHP Modernization Skill

Modernize PHP applications to PHP 8.x with type safety, PSR compliance, and static analysis.

Expertise Areas

  • PHP 8.x: Constructor promotion, readonly, enums, match, attributes, union/intersection types, #[Override], typed constants, #[SensitiveParameter], property hooks
  • PSR/PER Compliance: Active PHP-FIG standards (PSR-3/4/6/7/11/14/15/16/17/18/20, PER-CS)
  • Static Analysis: PHPStan (level 9+, treatPhpDocTypesAsCertain: false), PHPat, Rector, PHP-CS-Fixer
  • Type Safety: DTOs/VOs over arrays, generics via PHPDoc, copy-on-write awareness
  • Pitfalls: DOMDocument UTF-8 encoding, PHP-CS-Fixer deprecated aliases

Reference Documentation

TopicReference File
PHP 8.0-8.5 featuresreferences/php8-features.md
PSR/PER compliancereferences/psr-per-compliance.md
PHPStan levelsreferences/phpstan-compliance.md
Static analysis toolsreferences/static-analysis-tools.md
PHP-CS-Fixer deprecationsreferences/php-cs-fixer-deprecations.md
Type safety, DTOsreferences/type-safety.md
Request DTOsreferences/request-dtos.md
Adapter registryreferences/adapter-registry-pattern.md
Multi-version adaptersreferences/multi-version-adapters.md
Symfony patternsreferences/symfony-patterns.md
TYPO3 PSR patternsreferences/typo3-psr-patterns.md
Migration planningreferences/migration-strategies.md

Always run vendor/bin/php-cs-fixer fix --dry-run 2>&1 | grep -A 20 "Detected deprecations" to check for deprecated rules.

Running Scripts

Verify a project: scripts/verify-php-project.sh /path/to/project

Required Tools

ToolRequirement
PHPStanLevel 9 minimum, level 10 recommended
PHPatRequired for defined architectures
RectorRequired for automated modernization
PHP-CS-FixerRequired with @PER-CS ruleset

Core Rules

  • DTOs required over arrays for structured data
  • Backed enums required for fixed value sets (not constants)
  • PSR interfaces for type-hinting dependencies (PSR-3, PSR-6, PSR-7, PSR-11, PSR-14, PSR-18)

See references/core-rules.md for code examples and scoring criteria.

Migration Checklist

  • declare(strict_types=1) in all files
  • PER Coding Style via PHP-CS-Fixer (@PER-CS) with no deprecated aliases
  • PHPStan level 9+ (treatPhpDocTypesAsCertain: false, level 10 for new projects)
  • PHPat architecture tests for layer boundaries
  • Return types and parameter types on all methods
  • DTOs for data transfer, no array params/returns
  • Backed enums for all status/type values
  • Type-hint against PSR interfaces, not implementations
  • #[Override] on overridden methods (PHP 8.3+)
  • #[SensitiveParameter] on password/secret params (PHP 8.2+)
  • Typed class constants (PHP 8.3+)

Contributing: https://github.com/netresearch/php-modernization-skill

Capabilities

skillsource-netresearchskill-php-modernizationtopic-agent-skillstopic-ai-agenttopic-open-standard

Install

Quality

0.46/ 1.00

deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 14 github stars · SKILL.md body (3,007 chars)

Provenance

Indexed fromgithub
Enriched2026-04-22 13:03:27Z · deterministic:skill-github:v1 · v1
First seen2026-04-19
Last seen2026-04-22

Agent access