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

Utworzony 3y | 24 lut 2022, 16:20:22


Zaloguj się, aby dodać komentarz

Inne posty w tej grupie

New in Symfony 7.3: Messenger Improvements

Symfony Messenger component keeps evolving to meet the needs of complex, modern applications. In Symfony 7.3, we're introducing several powerful features to it.

Run Process Using the Shell… https://s

22 maj 2025, 07:50:11 | Symfony
New in Symfony 7.3: Routing Improvements

The Routing component provides an impressive list of features to map incoming URLs to your application code. Symfony 7.3 pushes it even further with a set of new features that improve developer experi

21 maj 2025, 11:10:07 | Symfony
New in Symfony 7.3: JsonStreamer Component

Contributed by Mathias Arlaud in

20 maj 2025, 09:30:13 | Symfony
Symfony UX CVE-2025-47946: Unsanitized HTML attribute injection via ComponentAttributes

Affected versions

Symfony UX symfony/ux-live-component and symfony/ux-twig-component versions <2.25.1 are affected by this security issue.

The issue has been fixed in the 2.25.1 version of these

19 maj 2025, 12:40:14 | Symfony
New in Symfony 7.3: Yaml Improvements

Symfony has been reducing the need for configuration in applications for several years now. Thanks to PHP attributes, you can now configure most things alongside the relevant code, removing the need f

19 maj 2025, 08:10:09 | Symfony
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 maj 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 maj 2025, 15:10:26 | Symfony