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.
npx skills add Phaedra-Solutions/cursor-rules --skill upgrade-phpgit clone --depth 1 https://github.com/Phaedra-Solutions/cursor-rulesWrote 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.
[](https://agentmods.dev/skills/phaedra-solutions/cursor-rules/upgrade-php)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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.phpandconfig.platform.phpincomposer.json, Dockerfiles (FROM php:…), CI (php-version:), hosting/PaaS settings, and PHPStan/PsalmphpVersion. - List extensions in use (
php -m,ext-*incomposer.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-chaincooldown applies).
Steps
-
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. -
Surface deprecations on the current version: run the tests with
error_reporting=E_ALLand deprecations converted to failures (PHPUnitfailOnDeprecation="true"orconvertDeprecationsToExceptions), and fix them first. -
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, php85vendor/bin/rector process --dry-run vendor/bin/rector processReview the diff; Rector's PHP sets modernize syntax but don't fix every runtime change.
-
Hop one minor version: update
require.php(for example"^8.3"),config.platform.php, Docker, CI and hosting together; runcomposer update --with-all-dependenciesfor packages that need newer versions (one package group at a time); install missing extensions. -
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 andjson_validate; 8.4 implicitly nullable parameter types deprecated (?Type $x = null), newDeprecatedattribute; 8.5 removals listed in its migration guide. -
Verify (next section), show the diff and results, and wait for approval before the next hop. Commit only when asked (
git-commitskill). -
At the target, raise the PHPStan level gradually as a separate change, and switch to
languages/php.
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.
- 3d ago First seen · 75 lines · 132 tokens per session scan A 562c02d85d8d
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.
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.
laravel-security
Laravel security best practices for authn/authz, validation, CSRF, mass assignment, file uploads, secrets, rate limiting, and secure deployment.
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.
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…
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…
llamaindex-development
Expert guidance for LlamaIndex development including RAG applications, vector stores, document processing, query engines, and building production AI applications.