upgrade-php

upgrade-php is a skill for Claude Code, Codex from Phaedra-Solutions/cursor-rules. It costs 132 tokens per session (1,232 once invoked), scanned A, original, MIT.

A guided process for moving a project's PHP interpreter through newer minor releases, updating Composer dependencies and runtime settings, and checking extensions and tests.

In plain words
What is it for?
Use it to upgrade PHP one minor release at a time, update Composer and deployment configuration, run static analysis, and verify the application.
Why use it?
It prevents PHP version settings from disagreeing across local development, containers, CI, and hosting, while exposing deprecated code and incompatible packages.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to upgrade PHP one minor release at a time, update Composer and deployment configuration, run static analysis, and verify the application.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/phaedra-solutions/cursor-rules/upgrade-php
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 Phaedra-Solutions/cursor-rules --skill upgrade-php
Clone the repo
git clone --depth 1 https://github.com/Phaedra-Solutions/cursor-rules

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/phaedra-solutions/cursor-rules/upgrade-php/github.svg)](https://agentmods.dev/skills/phaedra-solutions/cursor-rules/upgrade-php)
Your own site
<a href="https://agentmods.dev/skills/phaedra-solutions/cursor-rules/upgrade-php"><img src="https://agentmods.dev/badge/skills/phaedra-solutions/cursor-rules/upgrade-php/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 upgrade-php

Your own site · 80×15
<a href="https://agentmods.dev/skills/phaedra-solutions/cursor-rules/upgrade-php"><img src="https://agentmods.dev/badge/skills/phaedra-solutions/cursor-rules/upgrade-php.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 132 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,232 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.00132 $0.01232
Opus 5.5 $0.00053 $0.00493
Sonnet 5.5 $0.00026 $0.00246
Haiku 4.5 $0.00013 $0.00123

Measured 3d ago against content hash 562c02d85d8d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

upgrade-php 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/upgrade-php/SKILL.md · 75 lines

How it starts

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

Upgrade PHP

When to use

  • The user asks to upgrade PHP, or the project runs PHP 8.2 or older (see legacy/php-legacy).
  • A dependency (Laravel 13 needs 8.3+) requires a newer PHP.

Before you start

  • List every place that pins PHP: require.php and config.platform.php in composer.json, Dockerfiles (FROM php:…), CI (php-version:), hosting/PaaS settings, and PHPStan/Psalm phpVersion.
  • List extensions in use (php -m, ext-* in composer.json) and check they exist for the target (PECL extensions lag).
  • Working tree clean; new branch (chore/php-8.4).
  • Ask the user:
    • the target: 8.4 (security support to Dec 2028) or 8.5 (to Dec 2029); default 8.4 for existing apps;
    • whether to stop for review after each minor hop;
    • whether network installs are approved (core/supply-chain cooldown applies).

Steps

  1. Baseline on the current version: composer install, PHPStan, tests, and the app starting. Record failures. If PHPStan isn't set up, add it at a level the code passes and generate a baseline (vendor/bin/phpstan analyse --generate-baseline), so new errors stand out.

  2. Surface deprecations on the current version: run the tests with error_reporting=E_ALL and deprecations converted to failures (PHPUnit failOnDeprecation="true" or convertDeprecationsToExceptions), and fix them first.

  3. Add Rector (composer require --dev rector/rector) with a config that targets the next minor only:

    // rector.php
    use Rector\Config\RectorConfig;
    
    return RectorConfig::configure()
        ->withPaths([__DIR__ . '/src', __DIR__ . '/app', __DIR__ . '/tests'])
        ->withPhpSets(php83: true);   // the hop's target: php82, php83, php84, php85
    
    vendor/bin/rector process --dry-run
    vendor/bin/rector process
    

    Review the diff; Rector's PHP sets modernize syntax but don't fix every runtime change.

  4. Hop one minor version: update require.php (for example "^8.3"), config.platform.php, Docker, CI and hosting together; run composer update --with-all-dependencies for packages that need newer versions (one package group at a time); install missing extensions.

  5. Fix runtime changes from the PHP migration guide for that version (backward-incompatible changes and deprecations). Examples: 8.2 dynamic properties deprecated (#[\AllowDynamicProperties] only as a temporary bridge); 8.3 typed class constants and json_validate; 8.4 implicitly nullable parameter types deprecated (?Type $x = null), new Deprecated attribute; 8.5 removals listed in its migration guide.

  6. Verify (next section), show the diff and results, and wait for approval before the next hop. Commit only when asked (git-commit skill).

  7. At the target, raise the PHPStan level gradually as a separate change, and switch to languages/php.

Read the full file on GitHub · 75 lines

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 First seen · 75 lines · 132 tokens per session scan A 562c02d85d8d

Subscribe to this mod's changes

upgrade-php is a skill published in the GitHub repository Phaedra-Solutions/cursor-rules (4 stars, last pushed 2d ago), licensed MIT. It adds 132 tokens to every session and 1,232 once invoked, about $0.0005 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-11-01.

Related

Other skills, from other repositories

laravel-patterns

Laravel architecture patterns, routing/controllers, Eloquent ORM, service layers, queues, events, caching, and API resources for production apps.

hashgraph-online/awesome-codex-plugins · 32 tokens

laravel-security

Laravel security best practices for authn/authz, validation, CSRF, mass assignment, file uploads, secrets, rate limiting, and secure deployment.

hashgraph-online/awesome-codex-plugins · 34 tokens

laravel-plugin-discovery

Discover and evaluate Laravel packages via LaraPlugins.io MCP. Use when the user wants to find plugins, check package health, or assess Laravel/PHP compatibility.

hashgraph-online/awesome-codex-plugins · 37 tokens

php

Use when writing, reviewing or modernizing PHP (8.3-8.5) outside Laravel — strict types, union and intersection types, readonly classes, backed enums, property hooks and asymmetric visibility, the pipe operator and clone-with, Composer with PSR-4, PER-CS style, PSR interop, and the quality toolchain (PHPStan, Pint…

ericrisco/rsc-harness · 97 tokens

laravel

Use when building or extending a Laravel 11/12 app — Eloquent models, migrations and relationships, routing with controllers and Form Requests, queues and background jobs, framework-native security (validation, mass-assignment, policies, signed URLs, rate limiting), and Pest/PHPUnit feature tests. NOT pure PHP…

ericrisco/rsc-harness · 76 tokens

llamaindex-development

Expert guidance for LlamaIndex development including RAG applications, vector stores, document processing, query engines, and building production AI applications.

Mindrally/skills · 32 tokens