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

Increasing the minimum PHP version #37

Open
kudashevs opened this issue Dec 19, 2024 · 5 comments
Open

Increasing the minimum PHP version #37

kudashevs opened this issue Dec 19, 2024 · 5 comments

Comments

@kudashevs
Copy link
Contributor

kudashevs commented Dec 19, 2024

Hello @Donatello-za ,

I tested the package on PHP 7.1, 7.2, 7.3 and higher (it works). I wasn't able to test it on 7.0 and lower.
So, I would like to suggest increasing the minimum supported version to 7.4. Ideally to 8.0 or 8.1.
This will give the possibility to use some new PHP features and make code base more strict and type oriented.

If you're up to, I can help in this process. Let me, please know, about your decision.

@Donatello-za
Copy link
Owner

Hi @kudashevs,

Thanks for your input and your pull request. Sorry for only coming back to you now.

I'm happy to go up to PHP 8.1 as a minimum requirement and I'd also like to do some refactoring on the code to go along with that, including implementing strict type checking etc. I would like to also keep supporting the older versions. What I'm struggling to decide is whether I should turn this into a major version change, eg. 2.0.0. or perhaps 1.1.0. I'm using Semantic versioning MAJOR.MINOR.PATCH.

From your perspective, would you be happy for it to become v2.0.0 or do you think it should go to 1.1.0? Currently it is at v1.0.19 and personally I'm leaning towards using v2.0.0 to make it easier for Composer users to decide which version to use.

@kudashevs
Copy link
Contributor Author

kudashevs commented Feb 5, 2025

Hi @Donatello-za

Thank you for getting back to me on this issue.

It should be a major version (2.0.0) to me. Implementing new PHP features like typed properties, arrow functions, etc. is going to introduce breaking changes. Even if the breaking changes are not introduced by the code, dropping support for old versions (platforms in my interpretation) is equal to a breaking change. There is a very interesting discussion on this topic.

If you ask personally me, I would do it incrementally in two steps using two different milestones:
milestone 2.0.0 - drop support for very old versions and make PHP 7.4 the minimum required version. Thus, the people who don't use and don't plan to use the latest PHP versions (for whatever reason) will be able to use an updated and refactored version.
milestone 3.0.0 - when the 2.0.0 is released, it can be updated with the latest features and then PHP 8.1 can be set as the minimum supported version for the new 3.0.0 release.

@Donatello-za
Copy link
Owner

Thanks for your feedback and suggestions @kudashevs, it makes perfect sense and I think the appropriate way would indeed be to proceed with two milestones, being PHP 7.4 for v2.0.0 and 8.1 for v3.0.0. I will probably start working on the migration tomorrow (Friday, 7 Feb) if I find the time and should be able to finish at least with v2.0.0. if I can start early enough. :)

@kudashevs
Copy link
Contributor Author

kudashevs commented Feb 6, 2025

You are welcome @Donatello-za. Could you please create both milestones with short descriptions?
We can start assigning issues to them. In addition, people will see the plans and will be able to provide feedback.

@Donatello-za Donatello-za added this to the v2.0.0 Release Milestone milestone Feb 7, 2025
@Donatello-za
Copy link
Owner

Ok, I have created and pushed a new v2.0.0. branch with the initial refactoring's for PHP 7.4. All unit tests runs successfully and if there are any other code enhancements you'd like to see feel free to mention those.

Here are links to Milestone v2.0.0 and Milestone v3.0.0 and branch v2.0.0.

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

No branches or pull requests

2 participants