How to display the current and parent category in WordPress
Need to show the category hierarchy in your theme? Learn how to get the current category and its parent using get_the_category() and get_category_parents().
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.
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:
| Branch | Initial release | Active support until | Security support until |
|---|---|---|---|
| 8.2 | 8 December 2022 | 31 December 2024 | 31 December 2026 |
| 8.3 | 23 November 2023 | 31 December 2025 | 31 December 2027 |
| 8.4 | 21 November 2024 | 31 December 2026 | 31 December 2028 |
| 8.5 | 20 November 2025 | 31 December 2027 | 31 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.
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 --lockedThe 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.
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-baselineThat 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.
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:
| Version | Deprecated, from the migration guide | What to search for |
|---|---|---|
| 8.1 | Passing null to non-nullable parameters of built-in functions | str_contains($x, null) and similar |
| 8.1 | Serializable without __serialize() and __unserialize() | Classes implementing Serializable |
| 8.1 | strftime() and gmstrftime() | Date formatting helpers |
| 8.1 | FILTER_SANITIZE_STRING | Input filtering code |
| 8.2 | Dynamic properties | Properties assigned that were never declared |
| 8.2 | ${var} string interpolation | Old templates and mail builders |
| 8.2 | utf8_encode() and utf8_decode() | Import and export code |
| 8.3 | Increment or decrement on empty or non-alphanumeric strings | Counters built on string ++ |
| 8.3 | assert_options() | Old test helpers |
| 8.4 | Implicitly nullable parameters | function f(T $a = null) |
| 8.4 | E_USER_ERROR in trigger_error() | Custom error handlers |
| 8.5 | Non-canonical casts such as (integer) and (boolean) | Old casting style |
| 8.5 | curl_close() | HTTP client wrappers |
| 8.5 | Backtick operator | Shell 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.
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.
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.
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.
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.
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.
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).

Photo: Arild Vågen, CC BY-SA 4.0, Wikimedia Commons.
Examples of my work.
Ogloszenia.osemka.pl is a classifieds portal that operated as a subdomain of the social platform Osemka.pl, designed and implemented in 2006-2007. The goal w...
Olsztyn.com.pl is one of the key projects in my WordPress developer portfolio, serving as a comprehensive city portal dedicated to the residents of Olsztyn. ...
A package of various special banners for the osemka.pl website
Describe your project by e-mail. I reply within 24 hours.
Describe your projectNeed to show the category hierarchy in your theme? Learn how to get the current category and its parent using get_the_category() and get_category_parents().
Need to get the URL of the first image or link in an article? Prefer DOMDocument over regex. Ready-made WordPress PHP for developers.
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.
Custom WordPress engineering and architecture.
Scalable headless, ERP, and AI architecture for enterprise.
Stores, checkout flow, and sales logic.
Stability, updates, and post-launch support.
What the monthly care fee covers and what changes it.
Business process automation around WordPress and company systems.
Headless WordPress, Sanity, Strapi, and Contentful with Astro or Next.js.
Astro, MDX, edge delivery, and Core Web Vitals measured on real traffic.

How to start as a WordPress developer in 2026. Local environment, theme and plugin development, REST API and headless paths, security and Core Web Vitals. A practitioner playbook that does not waste your first month.

WordPress 7.0 with AI Client against Astro 7 with the Rust compiler and Vite 8. Speed, cost, SEO and security compared, plus the real bill for my own Astro 6 to 7 migration.

A detailed comparison table of EmDash CMS and WordPress across architecture, security, plugins, AI features, content model, hosting, and ecosystem maturity.