Legacy PHP modernization, without breaking production.
I'm Daniel Kisantal, a freelance PHP developer who has spent years inside old Symfony, Laravel, CodeIgniter and in-house codebases. I upgrade them to PHP 8 step by step behind a test suite, and fix the security problems old PHP code almost always carries. Remote, for teams anywhere from Europe and the US to Australia.
$r = mysql_query("SELECT * FROM users WHERE id = " . $_GET['id']);$user = mysql_fetch_assoc($r);$stmt = $pdo->prepare('SELECT * FROM users WHERE id = :id');$stmt->execute(['id' => (int) $request->query->get('id')]);$user = $stmt->fetch();
mysql_query was removed in PHP 7.0, and this line is also an SQL injection. Most legacy upgrades are hundreds of small fixes like this one.Is your PHP version still supported?
Once a PHP version reaches end-of-life, newly found vulnerabilities in it are never fixed. Most legacy applications I see run on PHP 5.6 or 7.4, years past that date.
| Version | Security fixes until | Status |
|---|---|---|
| PHP 5.6 | End of life | |
| PHP 7.4 | End of life | |
| PHP 8.0 | End of life | |
| PHP 8.1 | End of life | |
| PHP 8.2 | Security fixes only | |
| PHP 8.3 | Security fixes only | |
| PHP 8.4 | Active support | |
| PHP 8.5 | Active support | |
| PHP 8.6 | Active support |
The usual target today is PHP 8.5: actively supported until the end of 2027. PHP 8.6 works too once all your dependencies support it. How a PHP 8 upgrade works. All dates and what they mean: PHP end-of-life dates.
Security problems I find in legacy PHP
Old PHP code was written before frameworks handled escaping, tokens and password hashing for you. The same ten problems show up again and again. Each is fixable without a rewrite.
- SQL injectionQueries built by string concatenation, often with
mysql_*or earlymysqli. - Prepared statements or a query builder, one query at a time, with tests around the risky ones.
- Cross-site scripting (XSS)Request data echoed into HTML without escaping.
- Context-aware escaping, a template engine with auto-escaping, and a Content Security Policy.
- Cross-site request forgery (CSRF)Forms and state-changing GET links without tokens.
- CSRF tokens, POST for every change, and
SameSitesession cookies. - Weak password storagePasswords hashed with
md5()orsha1(), sometimes without a salt. password_hash()with Argon2id or bcrypt, upgraded silently at the next login.- PHP object injection
unserialize()called on cookies, form fields or cache data an attacker can touch. - JSON instead of serialized objects, or
allowed_classeswhere serialization must stay. - File upload and include holesUploads saved in the web root, or code like
include $_GET['page']. - Allow-lists, storage outside the web root, and no user input in paths.
- Session handlingNo ID regeneration after login, cookies without
SecureandHttpOnly. - Session fixation fixed, hardened cookie flags, sensible timeouts.
- Vulnerable dependenciesOld Composer packages with published CVEs, or copied libraries nobody updates.
composer audit, upgrades or replacements, and a lock file that is actually used.- Secrets in the repositoryDatabase passwords and API keys committed in
config.php. - Environment-based configuration, rotated credentials, history cleaned if needed.
- End-of-life PHPA runtime that gets no security fixes at all.
- A planned upgrade to a supported PHP 8 version. See the table above.
How I work
The order matters more than the tools. Nothing changes before there is a way to prove it still works.
Audit
I read the code and run static analysis (PHPStan, a Rector dry run, PHP compatibility checks) and
composer audit. You get a short written report: what is risky, what blocks the upgrade, and a fixed-scope plan.Safety net
Before touching anything, I write end-to-end tests for the flows that make you money: sign-up, login, checkout, the admin screens your staff use daily. This is how I upgraded a large e-learning platform without surprises.
Upgrade in small steps
One PHP version or one framework layer at a time. Mechanical changes go through Rector, the rest is done by hand and reviewed. Every step is deployable on its own.
Hand-over
You keep the test suite, an upgraded dependency tree, a reproducible Docker setup if you want one, and notes on what changed and why. Your team can take it from there, or I stay on for maintenance.
Selected work
Client names stay private. The problems are typical.
E-learning platform
Upgraded a large legacy PHP codebase. A full end-to-end suite (WebdriverIO, Jasmine) came first, then the migration ran step by step against it.
PHP 5 to PHP 8, many times over
Upgrades of CodeIgniter apps and custom in-house frameworks: fixes, new features and modernization on code nobody wanted to touch.
Insurance systems
Rebuilt a legacy insurance system on an API Platform backend with an Angular frontend, and later built a new Laravel application from the first commit.
Hospitality hardware product
Rewrote a legacy PHP system for a custom hardware product with Laravel and Symfony components, in a US-based team.
Electronic components marketplace
Maintained and extended several large Symfony applications in production.
Privacy and compliance startup
Profiled a production service and removed its performance bottlenecks. About performance work
Services
PHP 8 upgrade
From PHP 5.x or 7.x to PHP 8.5, with tests first and no big-bang release.
Legacy PHP security audit
A written report of real, exploitable problems in your code, ranked, with the fixes.
PHP performance optimization
Profile a slow application, fix the queries and settings that cost the most, and prove it with numbers.
Framework migration
CodeIgniter, old Symfony or an in-house framework to a current Symfony or Laravel, route by route.
Questions clients ask first
Do we need a full rewrite?
Almost never. A rewrite stops feature work for months and throws away years of business rules hidden in the old code. I upgrade in place, in small steps, and only replace the parts that are too risky or too costly to keep.
Can the application stay online during the upgrade?
Yes. Every step is small enough to deploy on its own, and the test suite I write first tells us before release if a step changed behaviour. Your team can keep shipping features in parallel.
How long does a PHP 5 or PHP 7 to PHP 8 upgrade take?
It depends on the size of the codebase, test coverage and the number of dependencies. After a short audit you get a written plan with a fixed scope and price. Small applications are often done in a few weeks, large ones in planned phases.
Which frameworks do you work with?
Symfony (from version 2 up), Laravel, CodeIgniter, API Platform, and plenty of in-house frameworks and plain procedural PHP. On the frontend side I also work with TypeScript, Vue, Angular and React.
Is PHP 8.2 still safe to run?
PHP 8.2 gets security fixes until 31 December 2026, after that it is end-of-life like PHP 8.1 and older. If you are on 8.2 now, plan the move to 8.5 or newer.
Should we hire a freelancer or an agency for a legacy PHP upgrade?
For most legacy upgrades one experienced developer is the faster and cheaper choice: the person who audits the code is the one who changes it, with no hand-offs and no junior learning on your codebase. An agency makes sense when you need several people full-time for a long period.
Do you work with our existing team?
Yes. I work in your repository and your workflow, sign an NDA if you need one, and leave behind tests and notes your developers can keep using. I work in English and Hungarian.

Tell me what you are running
Send the PHP version, the framework, roughly how big the codebase is, and what worries you most. I reply personally, with the first questions I would ask and a rough plan.
daniel@kisasztal.comOr find me on LinkedIn.