php-upgrade

php-upgrade is a skill for Claude Code from krzysztofsurdy/code-virtuoso. It costs 58 tokens per session (2,365 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 frameworks-virtuoso plugin — 6 skills shipped together

Good fit 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.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/krzysztofsurdy/code-virtuoso/php-upgrade
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.

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 frameworks-virtuoso, the plugin that ships this one along with the rest of its 6 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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for php-upgrade

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,365 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00058 $0.02365
Opus 5.5 $0.00023 $0.00946
Sonnet 5.5 $0.00012 $0.00473
Haiku 4.5 $0.00006 $0.00236

Measured 3d ago against content hash 5845be68ec12, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3d 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/frameworks/php/php-upgrade/SKILL.md · 175 lines

How it starts

The opening of the file, as written. The whole thing — 175 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 and 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 each hop, fetch the official php.net migration guide for that hop. Never rely on a static list in this skill or in model memory
One version at a time Upgrade 8.2 -> 8.3 -> 8.4 -> 8.5 in sequence. Skipping versions makes it impossible to isolate breakage
Fix deprecations before upgrading Deprecations in version N become errors in version N+1, so 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 An upgrade is not complete until the test suite passes 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 migration guide

Before touching any code, read the official guide for every hop between the current and target version. Each hop has its own page, named migrationXY after the target version:

Hop Page
7.4 -> 8.0 https://www.php.net/manual/en/migration80.php
8.4 -> 8.5 https://www.php.net/manual/en/migration85.php

Each guide has sub-pages: migrationXY.incompatible.php (backward incompatible changes), migrationXY.deprecated.php, and migrationXY.removed-extensions.php where it exists. Read at least the first two.

How to fetch them:

  1. Use the docs-lookup skill. For PHP it resolves to the Context7 library ID /websites/php_net_manual_en. Ask for "Migrating from PHP X.Y to X.Z, backward incompatible changes and deprecated features"
  2. Fallback: fetch the php.net URLs above directly, or ask the user for the release notes
  3. Write down what applies. Grep the codebase for each listed item and keep the hits as the work list for the Automate and manual-fix steps

Read the full file on GitHub · 175 lines

Files

What ships with it

1 file 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. 3d ago Changed · -1 lines 5845be68ec12
  2. 8d ago Changed · +11 lines · -41 tokens per session 2f03ff04c64b
  3. 2mo 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 (36 stars, last pushed 3d ago), licensed MIT. It adds 58 tokens to every session and 2,365 once invoked, about $0.0002 per session on Opus 5.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

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

yao-geoflow-template

Use only for explicit legacy GEOFlow template skill questions, old PHP template-package contracts, or historical outputs using root index.php/article.php/category.php/archive.php and includes/.php. Route current Laravel Blade themes, reference-site cloning, homepage modules, leadform, theme editor, channel frontend…

yaojingang/yao-geo-skills · 94 tokens

loom-php

PHP language expertise for idiomatic, production-quality code.

cosmix/loom · 15 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

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-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