Symfony 6.1 will require PHP 8.1

Historically, we've always tried to keep the minimum PHP version for a new major Symfony version (X.0) for all its minor versions (X.Y). But recently, we've faced a challenge with PHP preloading (issue, tentative fix). To make a long story short, prior to PHP 8.1 property types must be available when preloading a class. That's an issue for Symfony when a property references the type of an optional dependency. We have considered several options to fix it: preventing non-autoloadable classes from being preloaded (but the more typed properties Symfony uses, the less classes would be preloaded), removing property types (that doesn't work for non-Symfony classes that can still use property types). But then, preloading itself is going to be almost useless as of PHP 8.1. So, why would we want to bother maintaining some complex logic to workaround this issue in PHP and limit ourselves in adopting property types just to support PHP 8.0 for the next 4 years (Symfony 6.0 supports PHP 8.0+)? Now that you better understand the context, we considered one last option: bumping the minimum PHP requirement to PHP 8.1 in Symfony 6.1. According to Packagist, more than 70% of framework bundle installations are using PHP 8.1, and it grows fast. So, we are confident that the vast majority of our users will be using PHP 8.1 when 6.1 will be released at the end of May 2022. And the new Ubuntu LTS will support PHP 8.1 as well. Even if community support is massive, we understand that they are special situations which will forbid some projects to be upgraded in a timely manner. So, to mitigate the minimum PHP version bump, we are extending Symfony 6.0 maintainance by an additional 6 months. So, end of life for both Symfony 6.0 and 6.1 will happen at the same time. We have been thinking about this decision a lot during the last few weeks, and it seems like this is the only viable option that is sustainable for the project. We are aware that this might be inconvenient for some and we want to reassure you that bumping the minimum PHP version for a minor Symfony version will be considered only as a last resort option in the future. We have documented this change to make the process clear and transparent. You can think of this exception as being the equivalent of breaking backward compatiblity to be able to fix a security issue.

                Sponsor the Symfony project.

https://symfony.com/blog/symfony-6-1-will-require-php-8-1?utm_source=Symfony%20Blog%20Feed&utm_medium=feed

Établi 3y | 24 févr. 2022 à 16:20:22


Connectez-vous pour ajouter un commentaire

Autres messages de ce groupe

SymfonyLive Paris 2025 : Reveal of workshop topics!

SymfonyLive Paris 2025, conference in French language only, will take place from March 27 to 28! The schedule is currently being revealed as we go along. More details are available here.

💻

30 janv. 2025 à 08:50:03 | Symfony
Get Symfony news on your favorite social network

Symfony has been active on X, Mastodon, and Bluesky for some time, but until recently, not all platforms received equal attention. Since Twitter (now X) was our first social network, all blog posts we

29 janv. 2025 à 14:20:10 | Symfony
SymfonyLive Berlin 2025: Demystify the magic of the Container

SymfonyLive Berlin 2025, conference held in English, will take place from April 1 to 4! The schedule is being revealed gradually. More details are available here.

As we are now unveiling th

29 janv. 2025 à 14:20:10 | Symfony
Twig CVE-2025-24374: Missing output escaping for the null coalesce operator

Affected versions

Twig versions >=3.16.0,<3.19.0 are affected by this security issue.

The issue has been fixed in Twig 3.19.0.

Description

When using the null coalesce operator (??), output esc

29 janv. 2025 à 09:40:06 | Symfony
Symfony 6.4.18 released

Symfony 6.4.18 has just been released. Here is the list of the most important changes since 6.4.17:

bug #58889 [Serializer] Handle default context in Serializer (@Valmonzo)

bug #59631 [HttpClient

29 janv. 2025 à 09:40:05 | Symfony
Symfony 7.1.11 released

Symfony 7.1.11 has just been released. Here is the list of the most important changes since 7.1.10:

bug #58889 [Serializer] Handle default context in Serializer (@Valmonzo)

bug #59631 [HttpClient

29 janv. 2025 à 09:40:05 | Symfony
Symfony 7.2.3 released

Symfony 7.2.3 has just been released. Here is the list of the most important changes since 7.2.2:

bug #58889 [Serializer] Handle default context in Serializer (@Valmonzo)

bug #59631 [HttpClient]

29 janv. 2025 à 09:40:04 | Symfony