Skip to content
Muhammet Şafak
tr
8 min read

Upgrade Target Version: Two Dates, Not One

The newest PHP version doesn't set the target. Compare the candidate's security end with your next upgrade window, then with the chain's slowest link.

TL;DR

The upgrade target isn't the newest version: it's the nearest version whose support carries you past the next planned upgrade window and which the dependency chain allows today. The effective horizon is the shorter of the runtime's and the framework's security ends; as long as PHP 8.3 stays on Laravel 12, it hits its ceiling in February 2027. The ceiling is set by the chain's slowest link.

Brass tag carrying a PHP version ceiling date, hanging from a cable loop in a rack

PHP 8.3’s security support runs until December 2027; Laravel 12’s ends on 24 February 2027.

If you won’t upgrade Laravel, the horizon 8.3 gives you is February 2027, not December. When you choose the target, read the two dates and the chain’s slowest link together.

The matrix in Part 3 ranked the system with PHP 8.2 + Laravel 12 + FROM php:8.2-fpm-bookworm first. The order is settled, the version isn’t: 8.3, 8.4 or 8.5?

There are two easy answers, and both come with a bill. Pick the newest and a link in the chain may not be ready: an extension, a package or the base image doesn’t support that version yet. Pick the nearest and on the day you finish the upgrade you’ve also written the calendar for the next one; a year later you’re back at the top of the same table.

The example system stays the same: the PHP 8.2 system the matrix ranked first. The method runs once per system.

The First Date: Does It Outlast the Window

The first of the two dates is the candidate’s own security end date, and it doesn’t decide alone: it means something only when you set it next to the system’s next planned upgrade window.

The next planned window is the first date by which you could finish another upgrade after finishing this one. If the team’s upgrade rhythm is yearly, it’s 12 months after the day this upgrade ends. If your rhythm is different, write your own; the method doesn’t change, only the date shifts.

The rule: if the candidate’s security end doesn’t reach beyond that window, the second upgrade is already on the calendar. php.net gives these dates for the four candidates:

  • PHP 8.2: 31 December 2026
  • PHP 8.3: 31 December 2027
  • PHP 8.4: 31 December 2028
  • PHP 8.5: 31 December 2029

All four dates are the last day of the year; there are exactly 12 months between them. So the question comes down to a plain comparison: is the window date before the candidate’s security end, or after?

PHP 8.6 isn’t on this list. wiki.php.net gives its GA date as 19 November 2026; that is, it comes out four days after this post’s publication day. On top of that, neither Laravel 12 nor Laravel 13 supports 8.6 (in the second-date section). It isn’t a candidate today.

The cost of a “safe short step” that doesn’t reach the window shows up here too. If you move to 8.3 and your rhythm is yearly, the second upgrade is on the calendar the day you finish the first. The second isn’t half the work of the first: you rebuild the inventory, rerun the test round, replan the rollout. The inventory and the test round get paid for twice.

A short step doesn’t have to be a wrong choice. What’s wrong is choosing it because it’s “cheap” and not writing down the second bill. If you did write it down, that is, if you put the second upgrade on the calendar together with its budget, 8.3 is a defensible target.

The Second Date: The Framework’s Horizon

The runtime’s horizon can’t be longer than the horizon of the framework above it. As long as the system stays on Laravel 12, the effective date is the shorter of the two.

Laravel 12 supports PHP 8.2–8.5 and ships security fixes until 24 February 2027. Laravel 13 supports PHP 8.3–8.5 and its security fixes continue until 17 March 2028. 8.6 isn’t in the range either version supports.

Back to the opening example: 8.3 + Laravel 12. The PHP side runs to December 2027, the framework side to February 2027. The effective horizon is February 2027; that is, this combination hits its own ceiling just 55 days after 8.2’s end on 31 December 2026.

There are two ways out:

  1. Make the framework upgrade part of the target. With 8.3 + Laravel 13 the horizon extends to March 2028. But this work gets added next to the runtime upgrade as a second job; the scope grows.
  2. Write the horizon as February 2027. If you’ve decided not to upgrade the framework, that is the target’s real horizon. Recording it openly is cheaper than being surprised later.

There’s no hidden option: either the framework enters the target or the horizon shortens. If you chose the second, write the shorter of the two dates in your table’s “security end” column, not PHP’s; otherwise the table shows a horizon longer than it really is, from the first row on. A single “PHP 8.3” row squeezes the two into the same date.

The counter-intuitive part: the newest version gives the longest support, but it doesn’t set the target. The chain’s slowest link does.

The chain in Part 2 ran from the bottom up: runtime, extensions, framework, packages, container image, CI. The candidate version has to work at every link. If one link doesn’t support the candidate, the candidate is out; it doesn’t matter how long its support is.

So the check runs in reverse:

  • Does every extension have a release for the candidate version?
  • Does the php constraint of the packages in composer.json cover the candidate? composer check-platform-reqs reads this for you when run with the candidate PHP (for example inside the candidate image).
  • Is the base image tag published for the candidate version? In the example system, instead of php:8.2-fpm-bookworm you need a tag like php:8.4-fpm-bookworm.
  • Can the CI matrix run the candidate version?

The slowest link is the first row in the list that stops the candidate; it sets the order, not you. If several links stop it, the one furthest behind sets the ceiling.

The newest version the chain allows is the target’s upper bound. Downward, the two dates do the limiting: a candidate that doesn’t reach far enough is out.

Before you pick 8.4, look at your extension list: if one isn’t ready, your target is 8.3, not 8.4. A link that isn’t ready is a blocker, but it’s also a date: the day that link moves to 8.4 is the day the target can shift to 8.4. If you own the link (a package you wrote, an extension you compile yourself), you set the date; if not, there’s nothing to do but watch it.

Target Selection Table

One row per candidate; the two dates and the chain get a column each:

CandidateSecurity endNext windowChain allowsDecision
8.331 December 2027End of December 2027YesDoesn’t outlast the window, out
8.431 December 2028End of December 2027YesTarget
8.531 December 2029End of December 2027NoChain blocks it, out

The security end column is from php.net. The window and chain columns are my example assumption, not a case: I assumed the upgrade ends at the end of 2026, the rhythm is yearly, the framework is upgraded to Laravel 13, and the slowest link (in the example, an extension) doesn’t support 8.5 yet. Your rows fill with your own dates.

Under those assumptions the table says: 8.3’s PHP horizon lands on the same day as the window, with no margin; with Laravel 12 the horizon drops to February 2027. 8.5 is the best on horizon, but the chain doesn’t allow it. That leaves 8.4: together with Laravel 13 its horizon reaches March 2028, it outlasts the window and the chain allows it.

The rule fits in one sentence: the nearest version that outlasts the window and that the chain allows.

“Nearest” matters. If several candidates pass both conditions, pick the smaller one: a version further ahead brings along links the chain hasn’t prepared yet. As the chain matures, that version becomes a candidate again in the next window, with its own dates.

The Limit of This Framework

The table gives the target. It doesn’t tell you whether you’re ready: your tests, your way back and your prerequisites are in Part 5.

The target coming out as 8.4 doesn’t mean you can start today. The chain saying “allows” doesn’t mean that link has been tested with the candidate; it means only that it supports it.

The table isn’t a one-off either. If the window shifts, a link gets ready earlier than expected, or the framework’s calendar changes, the rows are read again; the target is written once, but retested against the dates in every planning round.

The dates are the calendar php.net publishes. What happens after a version’s support ends depends on your source: if you install PHP from your distribution’s package, the distribution may backport its own security fixes; its calendar can differ from php.net’s. Saying “no fix will ever come” once you pass the date would be wrong, but saying “I can count on a fix” is also a decision, and it should go on the record.

Write the Target on One Line

Back to the opening question: is 8.3’s horizon December or February? February, as long as you stay on Laravel 12. December only if the framework enters the target too; even then the target doesn’t have to be 8.3.

Two dates and a link don’t leave “which version?” to guesswork. Part 3 gave the order, this post the version, and the inventory in Part 2 the input for both.

For the system the matrix ranked first, write the candidate versions into the table, compare their security ends with your next window and your chain’s slowest link, and note the target as a single line.

Sources

Related

Comments

Sign in with your GitHub account to join the discussion. Comments are stored in GitHub Discussions.

Search the site

Start typing to search posts, projects and pages.

Esc to close Powered by Pagefind