Php Modernization
ListedThis skill automatically modernizes PHP codebases by upgrading to newer versions and best practices, boosting performance & security.
Install on your platform
Showing Claude Code. One command installs this skill into any of the agents below.
- 1
Run this in your project
terminal$ npx skills add dirnbauer/webconsulting-skills --skill php-modernization -a claude-code Uses the open-source
skillsCLI and needs Node.js. Add-gto install it for your user instead of this project.
What we know about this skill
Publisher
dirnbauer
Taken from the source listing. We haven't verified who controls this account.
Install target
Live repository
Not pinned. Installing fetches whatever the repository holds at the time you run the command.
Automated safety checks
This skill failed 1 of 6 checks. A failure is not proof of bad intent; it means something in the code needs a human to look at it before you run it.
No undeclared network calls: failed
Contacts 2 hosts that are neither well-known infrastructure nor declared in the skill's frontmatter: docs.astral.sh, docs.oasis-open.org.
Every host the skill dials — from its scripts, its config endpoints or the commands it tells the agent to run — is either well-known package and API infrastructure or declared in its own frontmatter. Links in documentation are not counted.
Hosts contacted
docs.astral.shundeclareddocs.oasis-open.orgundeclaredgithub.comsource hostWhat it found
- skills/php-modernization/scripts/verify-php-project.sh:33contacts docs.astral.sh
echo "ERROR: 'uv' is required to run this tool (install: https://docs.astral.sh/uv/)" >&2 - skills/php-modernization/scripts/verify_php_project.py:50contacts docs.oasis-open.org
SARIF_SCHEMA_URI = "https://docs.oasis-open.org/sarif/sarif/v2.1.0/cos02/schemas/sarif-schema-2.1.0.json"
Declares what it does: passed
SKILL.md parses and declares a name and a description.
SKILL.md exists, its frontmatter parses, and it declares a name and a description.
No obfuscated payloads: passed
No encoded or obfuscated payloads.
No base64, hex or compressed blob is decoded and then executed, and no encoded shell commands.
No credential access: passed
Reads no keys, tokens, keychains or credential files.
Neither the code nor the SKILL.md instructions read SSH keys, cloud credentials, keychains, token stores, browser cookie databases or dotfiles that hold secrets.
No pipe-to-shell installers: passed
No pipe-to-shell or download-and-run installers.
No `curl … | sh` pattern, in the code or in the instructions, that runs code fetched at run time.
Pinned to a commit: passed
Scanned dirnbauer/webconsulting-skills at 98b562d70f.
The exact upstream commit SHA that was scanned is recorded, so the result refers to specific bytes.
- Commit
- 98b562d70f
- Scanned
- 32 files, 11,381 lines
About this skill
What it does
This skill modernizes PHP applications by automatically upgrading them to PHP 8.x versions and implementing best practices. It focuses on incorporating type safety, adhering to PSR/PER compliance standards, and utilizing static analysis tools like PHPStan, PHPat, Rector, and PHP-CS-Fixer. The goal is to improve performance and security through code modernization.
When to use it
- You need to upgrade a legacy PHP codebase to a newer version (PHP 8.x).
- Your project requires adherence to PSR/PER coding standards.
- You want to improve the type safety of your application by using DTOs instead of arrays.
- You're looking for automated code modernization and static analysis capabilities.
Key capabilities
- Upgrades PHP applications to version 8.x.
- Implements PSR/PER compliance (PSR-3/4/6/7/11/14/15/16/17/18/20, PER-CS).
- Utilizes static analysis tools: PHPStan (level 9+), PHPat, Rector, and PHP-CS-Fixer.
- Promotes the use of DTOs over arrays for structured data.
- Implements backed enums instead of constants where appropriate.
Example prompts
- "Modernize this PHP project to version 8.x."
- "Check this code for PSR compliance and fix any issues."
- "Run static analysis on my codebase using PHPStan level 9."
- "Convert arrays to DTOs in this file."
Tips & gotchas
- PHPStan requires a minimum level of 9, with level 10 being recommended.
- PHPat is required for projects with defined architectures.
- Always run
vendor/bin/php-cs-fixer fix --dry-run 2>&1 | grep -A 20 "Detected deprecations"to check for deprecated rules before applying changes.