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

Creado 3y | 24 feb 2022, 16:20:22


Inicia sesión para agregar comentarios

Otros mensajes en este grupo.

SymfonyLive Berlin 2025: SEAL: Dive into the sea of search engines

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. 🚨 Enjoy the last day before t

3 mar 2025, 14:50:20 | Symfony
A Week of Symfony #948 (24 February - 2 March 2025)

This week, Symfony 6.4.19 and 7.2.4 maintenance versions were released. In addition, the upcoming Symfony 7.3 version added a helper to render directory trees in the console. Lastly, we welcomed four

2 mar 2025, 11:11:13 | Symfony
SymfonyLive Paris 2025 : Tirez profit de Messenger pour améliorer votre architecture

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.

Al

28 feb 2025, 10:31:15 | Symfony
SymfonyLive Berlin 2025: Building really fast applications

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. 🚨 Enjoy the last few days bef

27 feb 2025, 16:10:03 | Symfony
SymfonyLive Paris 2025 :  Async avec Messenger, AMQP et Mercure

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. 🚨 Tod

26 feb 2025, 14:31:31 | Symfony
Symfony 6.4.19 released

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

bug #59198 [Messenger] Filter out non-consumable receivers when registering ConsumeMessagesComm
26 feb 2025, 12:20:03 | Symfony
Symfony 7.2.4 released

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

bug #59198 [Messenger] Filter out non-consumable receivers when registering ConsumeMessagesComman
26 feb 2025, 12:20:03 | Symfony