Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropping support for EOL PHP versions #754

Open
HoldYourWaffle opened this issue Nov 23, 2023 · 4 comments
Open

Dropping support for EOL PHP versions #754

HoldYourWaffle opened this issue Nov 23, 2023 · 4 comments

Comments

@HoldYourWaffle
Copy link
Contributor

Lodata v5 still supports EOL PHP versions 7.3, 7.4 and (very soon) 8.0.
Dropping support for these outdated versions would give access to modern language features that make using, maintaining and improving Lodata a lot easier.

Dropping PHP 7.3 (EOL 2 years ago) would give access to...

  1. Typed properties
  2. Arrow functions
  3. Null coalescing assignment operator

Dropping PHP 7.4 (EOL 1 year ago) would give access to...

  1. Named arguments
  2. Attributes
  3. Constructor property promotion
  4. Union types
  5. match expression
  6. Nullsafe operator
  7. mixed type

Dropping PHP 8.0 (EOL in 3 days) would give access to...

  1. Enumerations
  2. First class callables
  3. readonly properties

Anecdotally...

  1. Earlier PHP versions seem to be extra problematic in the context of Tests broken on Windows #747.

This requires a major version bump of course, which is the perfect opportunity for batching some more rigorous refactors that might involve breaking changes.
In particular I'd like to simplify and reduce coupling in the operations system (#751), and I've seen similar opportunities for improvement in other systems.

Dropping these PHP versions would also drop Laravel 8, which has been EOL for almost a year.
I think it's worth seriously considering dropping support for Laravel 9 as well, considering it'll also be EOL in 3 months. I don't know enough about the codebase (or Laravel) to know if this would bring any immediate benefits, but given that it'll be EOL in 3 months I think it'd be silly if we have to support it for another major version cycle.

I'd love to hear your thoughts on this!
Suffice to say I would love to help with the effort, I'll be using Lodata in production for the foreseeable future, so I'd love to help maintain it :)

@27pchrisl
Copy link
Contributor

Hi @HoldYourWaffle, thanks for the comments! Yes I think at this point it would be reasonable to have another major version that was PHP 8.1+ only. There's certainly enough functionality in v5 for older versions.

@HoldYourWaffle
Copy link
Contributor Author

HoldYourWaffle commented Feb 20, 2024

Hi @27pchrisl, it's been quite a while, but I'm finally able to get back on #751.
While I could probably get that working on the 5.x branch without breaking changes, starting a 6.x branch now would likely make things a lot easier, allowing for more thorough modernizing refactors.

How do you feel about this?

@27pchrisl
Copy link
Contributor

Yes I'd be fine with a 6.x branch that dropped PHP versions earlier than 8.1.

@HoldYourWaffle
Copy link
Contributor Author

Sweet!
As far as I know I can't create a PR for a new branch, so if you could get that started (perhaps with just a message in the README) I can take it from there :)

As for more rigorous refactors, I thoroughly enjoy cleaning up, refactoring and modernizing code, but I realize a lot of people prefer a more 'timid' approach of only changing the things that absolutely need changing. What's your stance on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants