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

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


Accedi per aggiungere un commento

Altri post in questo gruppo

A Week of Symfony #959 (May 12–18, 2025)

This week, development activity focused on polishing Symfony 7.3 ahead of its final release in two weeks. We also continued publishing articles highlighting the new features of Symfony 7.3 and shared

18 mag 2025, 08:50:08 | Symfony
SymfonyOnline June 2025:  Keynote “Symfony in 2025, Scaling to Zero.”

SymfonyOnline June 2025 is almost here, starting in a few weeks on:

June 10-11: Workshop days. June 12-13: Online conference days in English. All talks will be available for replay as soon as

16 mag 2025, 15:10:26 | Symfony
New in Symfony 7.3: Dependency Injection Improvements

Symfony 7.3 introduces several enhancements to the DependencyInjection component that simplify service configuration, make autoconfiguration more flexible, and enable environment-specific aliasing.

S

16 mag 2025, 08:10:11 | Symfony
New in Symfony 7.3: Namespaced Caches

Contributed by Nicolas Grekas in

15 mag 2025, 08:50:14 | Symfony
SymfonyOnline June 2025: Building an Automated Trading System with Symfony

SymfonyOnline June 2025 is almost here, starting in almost 2 months on:

June 10-11: Workshop days. It is possible to attend 1 two-day training or 2 one-day trainings. June 12-13: Online confe

14 mag 2025, 14:30:11 | Symfony
New in Symfony 7.3: Security Improvements

Symfony security includes several significant improvements and new features in Symfony 7.3.

Deprecate eraseCredentials() Method… https://symfony.com/blog/new-in-symfony-7-3-security-improvements?utm_

14 mag 2025, 09:50:05 | Symfony
SymfonyOnline June 2025: Demystify the Magic of the Container🪄

SymfonyOnline June 2025 is almost here, starting in almost 2 months on:

June 10-11: Workshop days June 12-13: Online conference days in English. All talks will be available for replay as soon

13 mag 2025, 15:20:17 | Symfony