PHP developer in Stockholm

How I upgrade a legacy PHP application: supported versions from php.net, deprecations per migration guide, Composer checks and a PHPStan baseline. Remote, written.

PHP developer

My place in the WordPress community

  • I have had a wordpress.org account since 2006.
  • I contributed to WordPress core for versions 7.0 and 7.1.
  • I maintain 30 plugins on wordpress.org.
  • I organise and speak at WordCamps.
  • I have attended every WordCamp Europe from 2017 to 2026.
  • Local WordPress meetup: WordPress Stockholm

My WordPress.org profile

Most PHP upgrade requests come down to the order of the steps. This page describes how I move a legacy PHP application to a supported version, using only the php.net migration guides, the Composer manual and the PHPStan documentation. I am Mariusz Szatkowski, one developer in Gdynia, Poland, with work done remotely and documented in writing.

#Where the supported versions stand

The php.net supported versions page states the policy: each branch gets two years of active support from its initial release, then two more years of critical security fixes only. As listed on 18 November 2026:

BranchInitial releaseActive support untilSecurity support until
8.28 December 202231 December 202431 December 2026
8.323 November 202331 December 202531 December 2027
8.421 November 202431 December 202631 December 2028
8.520 November 202531 December 202731 December 2029

The php.net news page matters for planning. On 21 October 2026 the project published a security advisory for two critical remote code execution vulnerabilities, fixed in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, and stated that PHP 8.1 and older no longer receive updates. New security releases are announced in advance on the same page, so check it before you plan an upgrade window.

So the practical position is: 8.1 is out of support, 8.2 leaves security support at the end of this year, and the target for a legacy application is 8.4 or 8.5.

#Step 1: find out what blocks the move

Before touching code I read composer.json, the lock file and the server’s PHP version. Two Composer commands answer most questions:

composer prohibits php 8.4
composer audit --locked

The Composer manual describes prohibits as telling you which packages block a given package or platform requirement from being installed, with a PHP example. audit checks the installed packages against security advisories on Packagist and also reports abandoned packages, and it exits with code 1 when it finds packages matching the dependency policies. The first list shows which libraries must be replaced or upgraded before PHP can move. The second shows which of them are a security question today.

#Step 2: freeze the current state with static analysis

The PHPStan rule levels run from 0 to 10, are cumulative, and default to 0. Level 10 was added in PHPStan 2.0 and is stricter about implicit mixed types. For a legacy codebase I start low and use the baseline:

vendor/bin/phpstan analyse --level 5 --configuration phpstan.neon src/ --generate-baseline

That writes phpstan-baseline.neon with the errors and their count per file. You include it in the configuration, and later runs report only new errors. The PHPStan documentation warns that a baseline suits a few dozen to a few hundred errors; with thousands, the better move is a lower level or more configuration. If an ignored error disappears, PHPStan reports it, and --fix removes the entry. I run this in CI so that new code cannot add to the pile.

#Step 3: climb one minor version at a time

Each php.net migration guide has a “Deprecated Features” page. Reading them in order gives the work list. These are the entries I search for first, taken from those pages:

VersionDeprecated, from the migration guideWhat to search for
8.1Passing null to non-nullable parameters of built-in functionsstr_contains($x, null) and similar
8.1Serializable without __serialize() and __unserialize()Classes implementing Serializable
8.1strftime() and gmstrftime()Date formatting helpers
8.1FILTER_SANITIZE_STRINGInput filtering code
8.2Dynamic propertiesProperties assigned that were never declared
8.2${var} string interpolationOld templates and mail builders
8.2utf8_encode() and utf8_decode()Import and export code
8.3Increment or decrement on empty or non-alphanumeric stringsCounters built on string ++
8.3assert_options()Old test helpers
8.4Implicitly nullable parametersfunction f(T $a = null)
8.4E_USER_ERROR in trigger_error()Custom error handlers
8.5Non-canonical casts such as (integer) and (boolean)Old casting style
8.5curl_close()HTTP client wrappers
8.5Backtick operatorShell calls

Two of these are common in older code. Dynamic properties are fixed by declaring the property, which the 8.2 guide calls preferred, or by adding #[\AllowDynamicProperties] to the class. Implicit nullable parameters are fixed by writing the type explicitly:

// before: deprecated in PHP 8.4
function find(Customer $c = null) {}

// after
function find(?Customer $c = null) {}

The guides for 8.1, 8.2, 8.3, 8.4 and 8.5 have the full lists. The 8.6 guide exists as well, while release candidates are being tested.

After each minor version, I run the test suite and PHPStan, and I raise error_reporting to include deprecations on staging so that nothing stays silent.

#Step 4: switch production

The cutover is a deployment, not an event. I prepare the same release on the new PHP version on staging, run through the application’s key paths with you in writing, and switch the runtime with a rollback path to the previous version. After the switch I read the error log for new deprecations and notices.

#What I do not promise

I do not quote speed gains from an upgrade. Whether a version is faster for your application is a measurement on your workload, and I report what I measure. For Core Web Vitals on the front end I use only the official thresholds from web.dev.

#Personal data and IMY

IMY is the Swedish authority for data protection. Its page for organisations says that data controllers must report certain personal data breaches to IMY. A PHP application that holds names, addresses or login data needs logs that show who changed what and when.

When I receive access to personal data we put a written Art. 28 GDPR processor arrangement in place first. I work alone and do not subcontract development.

#Staging before go-live

PHP version, dependency and database changes run on a copy first. I check login, the critical business paths and form writes. Without written sign-off on that copy I do not switch production. That keeps a failed experiment off Stockholm production data.

#How an upgrade project runs

You send a written description: the application, how it is hosted, the current PHP version, the framework or its absence, and whether tests exist. I reply with written questions and then a written scope with assumptions. Work happens on a branch with staging, every milestone has a short written note, and I hand over a README and the PHPStan configuration. More on my offer is on the PHP developer page and the WordPress developer page for Stockholm.

Visual design is not part of this work, and nothing in it needs a call.

#Send me the application

Write through the contact page with the repository or a description, the PHP version in production and your deadline. The written first estimate is free of charge. I reply within 24 hours on working days (CET).

Börshuset on Stortorget in Gamla stan, Stockholm

Photo: Arild Vågen, CC BY-SA 4.0, Wikimedia Commons.

See also in Sweden

Need this service: PHP developer in Stockholm?

Describe your project by e-mail. I reply within 24 hours.

Describe your project

Latest PHP developer articles

Dec 2, 2026

Laravel Rust: what does it mean for PHP apps?

On 1 December 2026 Taylor Otwell shipped the Laravel Rust beta, and Laravel Go followed a day later. What the framework contains, what the 18x benchmark really measures, what happens to Laravel PHP and WordPress, and when a rewrite makes sense.

Explore other WordPress services and knowledge base