yiisoft / yii2-symfonymailer

Yii 2 Symfony mailer extension.
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
43 stars 22 forks source link

Drop support for php 7.4 and 8.0 #53

Closed SamMousa closed 8 months ago

SamMousa commented 1 year ago

Both php 7.4 and 8.0 are EOL.

I propose dropping support for these versions (note that old code bases can happily use version 3.x of this library).

mtangoo commented 1 year ago

@samdark @cebe @SamMousa @machour @bizley @rhertogh @arogachev @SilverFire @terabytesoftw @yiisoft/core-developers @yiisoft/core-developers

This have been a difficult decision in Yii 2.2 but since we can branch and bug/security fix old 2.x and move with 8.1+ with 3.x starting with the next release.

What are your thoughts?

terabytesoftw commented 1 year ago

In my opinion it would be great to have all the small packages in 8.1, the yii2 versions will still be backward compatible, and the new 2.2 branch will benefit from this change, making maintenance easier.

mtangoo commented 1 year ago

Thanks @terabytesoftw Do you mean we drop complately the support for EOL versions, right?

terabytesoftw commented 1 year ago

Thanks @terabytesoftw Do you mean we drop complately the support for EOL versions, right?

Yeah that's right.

winternet-studio commented 9 months ago

Removing backward compatibility often causes dependency headaches for developers - I would discourage dropping 7.4 and 8.0. It's not like 8.1+ has critical new features that should be used.

SamMousa commented 9 months ago

The headaches should belong with those developers. Not the developers spending free time to contribute on projects and simply won't do it if they have to take into account unsupported versions. The argument for critical features doesn't really apply to any turing complete language... From a DX perspective just new or better support for typing is worth it especially for code that isn't constantly maintained. Anyway; for me it's simple, I won't contribute if we're keeping support for old version in just to please non contributors.

winternet-studio commented 9 months ago

The headaches should belong with those developers. Not the developers spending free time to contribute on projects and simply won't do it if they have to take into account unsupported versions.

What exactly creates so much more work for you to do in 7.4 than in 8.1+?

Anyway; for me it's simple, I won't contribute if we're keeping support for old version in just to please non contributors.

So Yii2 is not for providing a good solid platform for everyone to use? It's only for those that actively and ongoing contribute?? -- Besides, it's not about pleasing non-contributors - it's about systems that are in use in critical production environments which aren't just easily upgradable to a new version. But it sounds like maybe Yii2 doesn't want to be used in real-world business critical systems...

SamMousa commented 9 months ago

What exactly creates so much more work for you to do in 7.4 than in 8.1+?

Manually managing types, thinking about what exactly is allowed in 7.4 and not in 8.1? I don't remember exactly when we got backed enums or void return type, do you?

So Yii2 is not for providing a good solid platform for everyone to use? It's only for those that actively and ongoing contribute??

I don't speak for Yii2, I speak as an open source contributor, I don't make the decisions.

But it sounds like maybe Yii2 doesn't want to be used in real-world business critical systems...

I'm skeptical of this point. If you are using 7.4, which no longer has security issues fixed how do you deal with that? In practice continuously updating to a supported PHP version should not be a lot of work for any code base with the automated tools that we have nowadays. So in my own code bases that are actually business critical we make it a point to update early, so we don't get into this issue in the first place. Let me turn the question around: if you claim to do serious software development, should you really be building it on software versions that are no longer maintained, like 7.4?

Also please remember you're always free to maintain a fork that doesn't have the strict version requirement and make the fixes you like if you find that important. Or you could look into automating it and thereby contributing something that benefits you as well as other developers stuck on 7.4 for non obvious reasons.

In case you'd like to upgrade your code instead of holding back external libraries: https://github.com/rectorphp/rector

winternet-studio commented 9 months ago

What exactly creates so much more work for you to do in 7.4 than in 8.1+?

Manually managing types, thinking about what exactly is allowed in 7.4 and not in 8.1? I don't remember exactly when we got backed enums or void return type, do you?

Easy to document in PHPDoc style.

But it sounds like maybe Yii2 doesn't want to be used in real-world business critical systems...

I'm skeptical of this point. If you are using 7.4, which no longer has security issues fixed how do you deal with that? In practice continuously updating to a supported PHP version should not be a lot of work for any code base

I don't know which theoretical world you are living in but I live in a practical world where things are always different and more troublesome than in theory. I'm not saying security issues won't be applied but they can't always happen as fast as you'd like. It's not so problematic to update your own code bases between PHP versions - but the problem is if you have dependencies where you don't control the source - they might not be available for your updated system. It takes time for that to happen and sometimes more time than you wish.

I would be really sad for PHP to end up in the dependency hell that we have with npm (which is something that everybody I talk to agree on!). Trying to keep these "thousands of packages" all working nicely together through upgrades can be a real pain. So much time is wasted on just trying to get things to work rather than spending time creating business logic and value for the customer. Which the customer of course doesn't like, or even have the money, to pay for.

I have enjoyed PHP being so stable and easy to deal with over many years. I have code bases that I started back in 2003 which is still running perfectly fine today - they have just needed a little bit of maintenance over the years as new PHP versions have come out.

In case you'd like to upgrade your code instead of holding back external libraries: https://github.com/rectorphp/rector

Interesting. Will take a look at that.

winternet-studio commented 8 months ago

https://github.com/rectorphp/rector isn't of much use! Just does all kinds of changes to your code that isn't really necessary. Haven't found a single change it did yet that was necessary for newer PHP versions!

mtangoo commented 8 months ago

@winternet-studio, can you share what stops you from updating for example to 8.1 from 7.4? Yii2 already supports 8.1-8.3 with little effort. Did you try to migrate? What issues if any stopped you from moving? That would be interesting to know and help in making decisions

winternet-studio commented 8 months ago

@mtangoo, can you share what stops you from updating for example to 8.1 from 7.4?

It's other Yii2 extensions installed through composer and other dependencies that can be the problem. Yii2 itself is not the problem. A system of course doesn't comprise of just a single package like Yii2. And since everything has to move along together when changing a PHP version it can be challenging.

mtangoo commented 8 months ago

Are those Extensions still being maintained? I mentioned Yii because all of the ecosystem somehow revolves around it. Maintained extensions should have moved to upper versions of Yii (IMHO). Sometimes all it takes is an issue and version bump. Sometimes few fixes

Can you mention some of those extensions? There might be alternatives out there, better maintained.

mtangoo commented 8 months ago

Done on #54. If need arises and be justified we can maintain a new feature frozen branch 3x. v4.0 is going to drop support for <=8.0