php-upgrade

php-upgrade is a skill for Claude Code from krzysztofsurdy/code-virtuoso. It costs 99 tokens per session (1,827 once invoked), scanned A, original, MIT.

A step-by-step guide for upgrading PHP, the programming language, between supported versions from PHP 8.0 through 8.4 and later. It covers compatibility checks, automated code changes, dependency checks, and testing.

In plain words
What is it for?
Use it to plan or perform PHP upgrades, check compatibility, fix deprecation warnings, run Rector and PHPCompatibility, set the deployment PHP version, and verify the result with tests.
Why use it?
It helps reveal deprecations and breaking changes one version at a time, reducing the chance that an upgrade fails without a clear cause.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the playbooks-virtuoso plugin — 5 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/krzysztofsurdy/code-virtuoso/php-upgrade
Any agent
npx skills add krzysztofsurdy/code-virtuoso --skill php-upgrade
Clone the repo
git clone --depth 1 https://github.com/krzysztofsurdy/code-virtuoso

Made for: Claude Code.

Or install playbooks-virtuoso, the plugin that ships this one along with the rest of its 5 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for php-upgrade

README.md
[![agentmods](https://agentmods.dev/badge/skills/krzysztofsurdy/code-virtuoso/php-upgrade.svg)](https://agentmods.dev/skills/krzysztofsurdy/code-virtuoso/php-upgrade)
Your own site
<a href="https://agentmods.dev/skills/krzysztofsurdy/code-virtuoso/php-upgrade"><img src="https://agentmods.dev/badge/skills/krzysztofsurdy/code-virtuoso/php-upgrade.svg" alt="Measured on agentmods" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,827 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00099 $0.01827
Opus 5 $0.00049 $0.00914
Sonnet 5 $0.00020 $0.00365
Haiku 4.5 $0.00010 $0.00183

Measured 6d ago against content hash 0d554b514677, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

php-upgrade scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/playbooks/php-upgrade/SKILL.md · 165 lines

How it starts

The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PHP Version Upgrade

Upgrade one minor version at a time. Never skip versions - each step surfaces deprecations that become errors in the next release. Every upgrade follows the same cycle: audit, automate, test, deploy.

Core Principles

Principle Meaning
Changelog first Before any upgrade, search the web for the official PHP migration guide (php.net/migration) or ask the user for the changelog - never rely on static knowledge alone
One version at a time Upgrade 8.1 -> 8.2 -> 8.3 -> 8.4 sequentially - skipping versions makes it impossible to isolate breakage
Fix deprecations before upgrading Deprecations in version N become errors in version N+1 - treat them as mandatory fixes
Automate first, manual second Run Rector and PHPCompatibility before touching code by hand - they catch 80%+ of required changes
Prove it with tests Never consider an upgrade complete without a passing test suite on the target version
Pin your platform Set config.platform.php in composer.json to match your lowest deployment target

Upgrade Process Overview

Phase 0: Read the Changelog

Before touching any code, obtain the actual changelog for the target PHP version:

  1. Search the web for PHP X.Y migration guide (e.g., PHP 8.4 migration guide php.net)
  2. Or ask the user to provide the changelog / release notes
  3. Read the official migration page at https://www.php.net/manual/en/migrationXY.php

This is non-negotiable. Each version has unique changes that static skill knowledge cannot fully capture.

Phase 1: Audit

Before changing any code, understand the scope of the upgrade.

  1. Run PHPCompatibility against the target version to identify incompatible code
  2. Run php-parallel-lint with the target PHP binary to catch syntax errors
  3. Run composer outdated to check if all dependencies support the target version
  4. Review the official migration guide at php.net for the target version
  5. Check PHP extensions for compatibility (ext-intl, ext-mbstring, etc.)

Read the full file on GitHub · 165 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 165 lines · 99 tokens per session scan A 0d554b514677

Subscribe to this mod's changes

php-upgrade is a skill published in the GitHub repository krzysztofsurdy/code-virtuoso (20 stars, last pushed 3mo ago), licensed MIT. It adds 99 tokens to every session and 1,827 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

auditing-php-applications

Audit PHP web application source for critical vulnerabilities using PHP's specific sink and footgun catalog — object injection via unserialize and phar:// POP chains, type-juggling and magic-hash auth bypass, LFI/RFI through php:// and phar:// wrappers, dynamic includes and extract()/superglobal trust, SQL injection…

trilwu/secskills · 129 tokens

xml-config-migrating

Use this skill when a Shopware plugin or app-server extension needs its XML configuration migrated to PHP — phrases like "migrate services.xml", "convert my plugin config to PHP", "xml to php migration", "fix the XML deprecation", "prepare my plugin for Shopware 6.8 / Symfony 8", or when a deprecation like "The XML…

shopwareLabs/ai-coding-tools · 106 tokens

phpunit-unit-test-reviewing

Internal sub-skill. Do not auto-activate. Use only when explicitly invoked by name by another skill or agent.

shopwareLabs/ai-coding-tools · 31 tokens

mvc-expert

Expert guidelines to refactor legacy PHP codebases into clean, modern, and scalable MVC-structured projects / Pedoman ahli untuk merefaktor codebase PHP lama menjadi proyek terstruktur MVC yang bersih, modern, dan skalabel.

roedyrustam/vibes-plug · 51 tokens

phpunit-integration-test-generation

Use this skill when the user asks to generate, write, or create integration tests for a Shopware 6 source class whose contract requires wired-up code — phrases like "generate integration tests for X", "write an integration test for this controller", "test this indexer", "create an integration test for the message…

shopwareLabs/ai-coding-tools · 184 tokens

phpunit-unit-test-writing

Use this skill when the user asks to write, generate, create, or add PHPUnit unit tests for a Shopware 6 source class — phrases like "write unit tests for X", "generate tests for ClassName", "create PHPUnit tests", "add test coverage", "test this class", "cover this with tests", "I need tests for", "unit test this"…

shopwareLabs/ai-coding-tools · 187 tokens