[RFC] Reduce PHP Language Level for Symfony 6 to 7.4

In #40389 the decision was made to require PHP 8.0 as minimum for the next Symfony major, but not all information given was correct. That’s why I propose to lower the minimal language level to 7.4.

What is wrong with the information in the preceding RFC?

PHP 7.4 is currently bundled by the stable and LTS releases of Debian and Ubuntu.

This is (unfortunately) not true for Debian.

Debian
Stable Debian (buster/10) only packages 7.3 by default, and the next stable release (bullseye/11, expected somewhere in the second quarter of this year) will only package 7.4: they deemed the transition to 8.0 too large, too breaking and too late. That means that 8.0 (maybe 8.1 by that time?) will only be packaged with the release of Sid, which can be expected in the second quarter of 2023 (looking at the release history).

This is relevant Debian thread: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=976811

The PHP packages and Debian versions:

This means that choosing PHP 8.0 for Symfony 6 will close the door for many stable (and thus maintained) Debian users for at least 1.5 years.

Ubuntu
The latest LTS of Ubuntu ships with PHP 7.4, so that is true. But that also means that an LTS with PHP 8.0 cannot be expected before 2022.

This will have less impact compared to Debian, but you can still assume that users won’t be able to upgrade because they only have access to LTS versions of Ubuntu (of which the installation can postponed by whomever is managing the environment…)

Conclusion
In conclusion, bumping the minimum version to 8.0 might be a bit premature. It will restrict a (possibly large) group of users from upgrading to Symfony 6.0, which has (or at least, not for me) never has been blocked by an LTS OS not having the minimum required PHP version.

Note that all this only holds when you cannot (or do not want to) install a custom package repository such as https://deb.sury.org/.

As a final note: I’m just opening this to allow the RFC for reconsideration based on this information. Whether or not this changes anything is up to you 😃

6 thoughts on “[RFC] Reduce PHP Language Level for Symfony 6 to 7.4

  1. On my side, what matters most to make this decision is the minimum version that 6.4LTS will have to support: because 6.4 will be supported until November 2026, I think going with PHP >= 7.4 would put a too high maintenance burden on the LTS promise. In this regard alone, PHP >= 8.0 is a much better choice for me.

  2. IMHO, comparing LTS distro with non-LTS version of Symfony is not fair.

    The next LTS of Symfony is 5.4, released in Nov 2021 (PHP 7.2),
    Then 6.4 in Nov 2023. At that time the LTS distro should support natively the minimal requirements.

  3. The Operating System under which PHP will run is out of scope for Symfony’s requirement recognition. How Debian and Ubuntu are scheduling PHP distribution can’t be a Symfony problem, but would rather be a PHP project’s problem. The PHP project would maintain PHP 7.4 for only another year and only in regards to security issues when Symfony 6.0 releases. It would be the last PHP 7-Version maintained but as Symfony 6.0 would require 7, so would 6.4 LTS, which releases long after the end of life for PHP 7.

    Debian users who rely on end-of-life PHP versions of their operating system’s package maintainers, because “they deemed the transition to 8.0 too large, too breaking and too late”, will still have Symfony 5. On Debian, individual Symfony developers would recommend either to compile PHP for the box, to run it from a trustworthy package source like ondrej’s launchpad, or to run PHP in a virtual environment like Docker containers, anyway. I don’t see the Symfony project issuing official recommendations on that, because, as I said, the operating system is out of scope for the requirement recognition.

  4. I’m going to close here because the decision has been made and I think the new argument is not strong enough to change it. Thanks for opening.

  5. Just to make clear, I’m not against using PHP 8 for Symfony 6: I absolutely agree that it has its advantages over 7.4. I just wanted to share this information and allow everybody to maybe reconsider, as there was an explicit note in the preceding RFC about the bundled PHP versions allowing me to believe it was actually a part of the consideration.

    But, it is now clear that it isn’t, and that is perfectly okay with me 👍🏻


    I am sure most of devs if not all use that PPA over official ones

    I don’t 😄

    btw, Debian 12 is nicknamed “Bookworm”, “Debian Sid” is the nickname for the rolling Debian Unstable release)

    Absolutely true, I choose to keep Sid here as the related Debian sources in this PR currently all use that name to avoid confusion. 👍🏻