From craft-workspace-webconsulting-skills
Modernizes PHP apps to 8.x+: adds strict types, configures PHPStan/Rector/PHP-CS-Fixer, refactors to enums/DTOs/readonly/property hooks for type safety and PSR compliance.
npx claudepluginhub dirnbauer/webconsulting-skillsThis skill uses the workspace's default tool permissions.
Modernize PHP applications to PHP 8.x with type safety, PSR compliance, and static analysis.
references/adapter-registry-pattern.mdreferences/core-rules.mdreferences/migration-strategies.mdreferences/multi-version-adapters.mdreferences/php-cs-fixer-deprecations.mdreferences/php8-features.mdreferences/phpstan-compliance.mdreferences/psr-per-compliance.mdreferences/request-dtos.mdreferences/static-analysis-tools.mdreferences/symfony-patterns.mdreferences/type-safety.mdreferences/typo3-psr-patterns.mdscripts/verify-php-project.shModernizes PHP apps to 8.1+ with strict types, enums, DTOs, readonly properties, property hooks; configures PHPStan, Rector, PHP-CS-Fixer for type safety and PSR compliance.
Guides step-by-step PHP upgrades from 8.0 to 8.4+ using Rector for refactoring, PHPCompatibility for audits, and strategies for deprecations, extensions, and testing.
Reviews PHP 8.x code for modern patterns, PSR standards, SOLID principles, type safety, error handling, performance, and security. Detects version via composer.json for feature-appropriate advice.
Share bugs, ideas, or general feedback.
Modernize PHP applications to PHP 8.x with type safety, PSR compliance, and static analysis.
#[Override], typed constants, #[SensitiveParameter], property hookstreatPhpDocTypesAsCertain: false), PHPat, Rector, PHP-CS-Fixer| Topic | Reference File |
|---|---|
| PHP 8.0-8.5 features | references/php8-features.md |
| PSR/PER compliance | references/psr-per-compliance.md |
| PHPStan levels | references/phpstan-compliance.md |
| Static analysis tools | references/static-analysis-tools.md |
| PHP-CS-Fixer deprecations | references/php-cs-fixer-deprecations.md |
| Type safety, DTOs | references/type-safety.md |
| Request DTOs | references/request-dtos.md |
| Adapter registry | references/adapter-registry-pattern.md |
| Multi-version adapters | references/multi-version-adapters.md |
| Symfony patterns | references/symfony-patterns.md |
| TYPO3 PSR patterns | references/typo3-psr-patterns.md |
| Migration planning | references/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.
Verify a project: scripts/verify-php-project.sh /path/to/project
| Tool | Requirement |
|---|---|
| PHPStan | Level 9 minimum, level 10 recommended |
| PHPat | Required for defined architectures |
| Rector | Required for automated modernization |
| PHP-CS-Fixer | Required with @PER-CS ruleset |
See references/core-rules.md for code examples and scoring criteria.
declare(strict_types=1) in all files@PER-CS) with no deprecated aliasestreatPhpDocTypesAsCertain: false, level 10 for new projects)#[Override] on overridden methods (PHP 8.3+)#[SensitiveParameter] on password/secret params (PHP 8.2+)Contributing: https://github.com/netresearch/php-modernization-skill
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