Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Legacy PHP 5/7 to PHP 8 Upgrade Planner

    1

    Move an app off end-of-life PHP to a supported PHP 8: quick scan + PHPCompatibility, Rector batches, Composer and framework blockers, test net, staged rollout. READY / UPGRADE WITH FIXES / HIGH RISK.

    $14

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Legacy PHP 5/7 to PHP 8 Upgrade Planner

    Legacy PHP 5/7 to PHP 8 Upgrade Planner

    Example session with this skill installed

    We have a custom PHP 7.2 app (about 80k lines, Composer, CodeIgniter 3, MySQL via mysqli, some old mcrypt code for encrypted customer notes). After PHP2Shell we need to get to a supported PHP 8. Plan it.

    • Read your context and instructions
    • Compiled the legacy php 5

    PHP upgrade plan: customer-portal (2026-10-23)

    Verdict: HIGH RISK (bounded). The mcrypt-encrypted data and CodeIgniter 3 are the critical path; everything else is routine.
    Current -> Target: PHP 7.2 ->

    8.4 (supported on php.net as checked today; the newest branch the dependencies allow, since one PDF library doesn't support 8.5 yet).
    Framework: CodeIgniter 3.1.x. Its maintainers state partial PHP 8 support, so we pair the upgrade with patches and plan CI4 separately.

    Findings (quick_scan.py, then PHPCompatibility at testVersion 8.4)

    CategoryCountExampleFixAuto/ManualEffort
    mcrypt_*14app/libraries/Notes_crypt.php:22sodium + data migrationManualHigh
    each()37application/helpers/legacy_helper.php:88foreachRectorLow
    create_function6application/models/Report_model.php:140closuresRectorLow
    curly-brace offsets52multiple[]RectorLow
    null passed to internal functions (8.1)~300 (PHPStan)strlen(null) patternsnull checksMixedMedium
    dynamic properties (8.2)41 classesCI3 modelsdeclare propertiesManual + RectorMedium
    implicitly nullable params (8.4)120function x(Foo $a = null)?FooRectorLow

    Dependency blockers (composer why-not php 8.4)

    PackageCurrentNeededNotes
    tecnickcom/tcpdf6.2latest 6.xcheck the changelog for PHP 8.4 notes
    phpoffice/phpexcel1.8 (abandoned)phpoffice/phpspreadsheetAPI changes in 9 files

    Path

    1. Contain now (separate skill): isolate the app behind a VPN or WAF while it runs on PHP 7.2.
    2. Add characterization tests for login, notes, invoices and reports (about 40 tests).

    mcrypt plan: decrypt with the old code in a one-off migration on 7.2, re-encrypt with sodium, verify a row-count and checksum sample, keep an encrypted backup. Exit criterion: zero mcrypt calls.
    4. 7.2 -> 7.4: Rector PHP 7.4 set, tests green.
    5. 7.4 -> 8.4: Rector PHP 8.x sets in batches by directory; fix nulls and dynamic properties by hand; deprecations fail CI.
    6. Staging on 8.4 with production snapshot; canary 10% for 48 h; full rollout with the 7.2 container kept for rollback for 1 week.

    Timeline (estimate): 3-4 developer-weeks. The biggest uncertainty is how much CI3 needs patching.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    After the October 2026 "PHP2Shell" security release, there is no official fix for PHP 8.1 and older. That leaves thousands of apps stuck on PHP 5.6, 7.x or 8.0/8.1 needing to move to a supported PHP 8 release, fast and without breaking production. The usual approach of bumping the version and seeing what breaks turns into weeks of mystery errors, broken plugins and silent behaviour changes.

    This skill gives your coding agent a disciplined upgrade method, a reference of breaking changes for every version step, and a dependency-free quick scanner. It:

    • Picks the target from live data (php.net's supported-versions page), constrained by what your framework and key dependencies support
    • Assesses the app: runtime, framework and CMS versions, plugins, Composer constraints, extensions (mysql, mcrypt, ereg), tests, CI and deployment
    • Triages in seconds with a bundled quick scan for high-impact removed and deprecated features across 7.0-8.4: mysql_*, ereg, the preg /e modifier, mcrypt, create_function, each(), curly-brace offsets, strftime, utf8_encode, "${var}" strings, implicitly nullable parameters and more, with file:line counts
    • Confirms with PHPCompatibility (PHPCS) and static analysis, and maps Composer blockers with composer why-not and composer outdated
    • Plans the path: version steps with exit criteria, framework-first or PHP-first sequencing, replacements for removed extensions (with a safe plan for re-encrypting mcrypt data)
    • Automates safe refactors with Rector in small dry-run-first batches, each committed separately and tested
    • Covers manual fixes for behaviour changes that don't throw errors (PHP 8 string-number comparison, null handling in internal functions, dynamic properties), with deprecations turned into CI failures so nothing hides
    • Builds the rollout: CI matrix on old and new PHP, staging with production-like data, critical-flow smoke tests, canary or blue/green, rollback and monitoring
    • Gives a verdict: READY, UPGRADE WITH FIXES or HIGH RISK, with an effort estimate and the riskiest areas named

    For developers, agencies and IT teams with old Laravel, Symfony, CodeIgniter, WordPress, Drupal, Magento or custom PHP apps.

    Honest by design: scanner limits are stated, "no issues" is claimed only when scans run clean, framework and PHP support dates are cited rather than recalled from memory, and effort figures are labelled estimates. Pairs with the PHP2Shell Patch and Exposure Check skill for containing the app while the upgrade happens.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.

    Quick scanner is triage only and is confirmed with PHPCompatibility and static analysis. Behaviour changes that don't error need tests to catch. Framework support must be checked against current maintainer statements. Effort is an estimate.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 24 days ago

    Software
    Python 3 (quick scanner)ComposerPHP_CodeSnifferPHPCompatibilityRector
    PHPStan
    orPsalm (recommended)

    Permissions

    Terminal / Shell
    Network Access
    Read Files
    Write Files
    Listed24 days ago

    What's inside

    Frequently Asked Questions

    Any agent that supports the SKILL.md standard, including Claude Code, Codex CLI, Cursor, VS Code Copilot and Gemini CLI. It needs terminal access to run the scanners and your tests.

    SKILL.md with the upgrade method, verdict rules and plan format; a reference of high-impact breaking changes for each step from PHP 7.0 to 8.4+; and quick_scan.py, a dependency-free scanner that counts removed and deprecated features by file and line.

    Apps on PHP 5.x, 7.x, 8.0 or 8.1 moving to a supported PHP 8 release. It covers custom code and frameworks or CMSs such as Laravel, Symfony, CodeIgniter, WordPress, Drupal and Magento, checking each one's support matrix rather than assuming it.

    Only in small, reviewed batches. It runs Rector in dry-run mode first, applies one set or directory at a time, runs your tests after each batch and commits separately, so every change is reviewable and reversible.

    Support windows change. It reads the current supported-versions list and your dependencies' compatibility, then picks the newest target that will actually work.

    New in Code Quality & Review