fzaninotto / Faker

Faker is a PHP library that generates fake data for you
MIT License
26.8k stars 3.57k forks source link

Enhancement: Add support for PHP 8.0 #2063

Closed chris-doehring closed 3 years ago

chris-doehring commented 3 years ago

ThiHey there,

as you may know, php 8 will be released on the 26th of November 2020. Unfortunately, this package does not allow php 8, so I simply tried to change the composer version constraint to >=5.3.3, but then no unit tests would work under php 8, as only phpunit ^9.0 would allow php 8. Setting something like ^5.3.3 || ^7.0 || ^8.0 is no option either, as phpunit 8 introduced some backward incompatible changes which would require different tests for different phpunit and php versions.

So the logical conclusion for me was to set the same version constraint as in phpunit 9 (>=7.3). This also means, that a new major release of Faker (as of now v2.0.0) would be required, as it now drops support for older php versions. I know that's a hard step to take, and I know that there is indeed an ongoing planning and working going on for the "next Faker version", but as far as I can tell, these works are not going to be finished before php 8 has been released. And this package is included in many projects require-dev section. It is required for those projects to have a php 8 compatible Faker version in order to upgrade to php 8. This is the reason why I created this pull request for the master branch, instead of the "next" release branch.

I was able to get everything running for php 7.3, 7.4 and 8.0. What’s your thought on this?

GrahamCampbell commented 3 years ago

For Laravel we'll need Faker to run on PHP 7.2, 7.3, 7.3 & 8.0 (preferable in Faker v1.10 f that's possible). So I think the current state of the PR reflects that?

Yeh, exactly. I don't think trying to support PHP 5 a valid position to take in 2020, given that older versions of this package can just be used on PHP 5. It should be easily possible to also support PHP 7.1, if we support PHP 7.2, but it's not a big deal. I'd be happy with any of the following minimum versions: 7.1.0, 7.2.0, 7.2.5.

GrahamCampbell commented 3 years ago

but don't push on their PR without their consent, this is rude.

I disagree with this. The PR author has the option to specify if they want people to be able to push to their PR branch. They opted-in, so they did consent. It certainly wasn't rude!

driesvints commented 3 years ago

Just want to say thank you to all involved in trying to get this to land. Hope we can get this merged soon! :)

chris-doehring commented 3 years ago

I considered it rude to the point that I didn't knew what the plan of @localheinz was. So it felt like I got pushed into a direction I didn't really understood. But never mind now. Let's focus on the topic: I'm happy with the current state of it and I'm also happy about all three options that @localheinz summarized. And also from my side: Thank you to all people involved! I didn’t expect it to be such a active discussion. :)

localheinz commented 3 years ago

Since I unfortunately haven't kept @chris-doehring original commit hashes around to revert all of the changes made in this pull request, how about this:

This way we have both:

If anyone runs into problems running 1.9.2 on PHP 8.0, we will eventually find out and can still drop support for older PHP versions on master and apply the original changes made by @chris-doehring to master, and actually run tests for PHP 8.0 on master.

What do you think?

chris-doehring commented 3 years ago

Sounds good :) I created a new branch in my fork with only my changes, which will stay there in case there is need for it like you described: https://github.com/chris-doehring/Faker/tree/feature/v1-php8-test-compatibility

localheinz commented 3 years ago

Thank you, @chris-doehring!

For reference, see #2090.

GrahamCampbell commented 3 years ago

Sounds like a bad idea to allow 8.0 without CI testing on 8.0, if that is the suggestion for 1.9.x.

What is stopping dropping old PHP in 1.10.0 and backporting bug fixes to 1.9.x for those who cannot upgrade?

fzaninotto commented 3 years ago

Hi all,

And thanks a lot for your contributions in this PR.

I understand that there are different strategies to move Faker forward, and that I might not be the best person to decide which strategy is the best one.

Yet I don't want to pass over Faker to another organization because I don't want to lose the benefit of a repo with 20+ stars. It's not just about vanity, it helps me get a better visibility in my job.

So I came to the conclusion that the best solution is to sunset fzaninotto/Faker. As far as I'm concerned, the project is complete. If you want to modify it, you can fork it and republish it under another organization - that's the beauty of open-source.

This decision is effective immediately. I'll publish a blog post to explain it in more details.

As far as this PR is concerned, I'll close it because 2.0 will never be published.

driesvints commented 3 years ago

@fzaninotto understandable. I'll talk this over with the rest of the team to see how we're going to proceed.

Thanks for all your work over the years and good luck with future plans :)

pimjansen commented 3 years ago

@driesvints i also sent an email to Graham about future things. Would be good to have a chat about it as well?

freekmurze commented 3 years ago

@fzaninotto Thanks for all your work on this repo over the years! Greatly enjoyed working with this package πŸ‘

drupol commented 3 years ago

Thanks for your work!

bram-pkg commented 3 years ago

Very useful library, thanks for the effort!

mehdirochdi commented 3 years ago

thank you so much for this package, it's very useful

GrahamCampbell commented 3 years ago

I will be creating fork and inviting collaborators to the organisation.

GrahamCampbell commented 3 years ago

I will also setup a slack so we can chat on there.

PovilasKorop commented 3 years ago

@fzaninotto I've used faker thousands of times over multiple projects, so can't thank you enough for everything.

reinink commented 3 years ago

@fzaninotto Thank you so much for all your work over the years on this project! I've used it a ton, and it's been extremely useful. 🀟

VladimirBerezkin commented 3 years ago

@fzaninotto Thank you for your work!

PhillipMwaniki commented 3 years ago

Thanks @fzaninotto for everything. Your repo is one of the best things to ever happen in the php eco system. Shukran

fallback commented 3 years ago

Thanks, @fzaninotto

atouiahmed commented 3 years ago

@fzaninotto Thank you for your efforts

svenluijten commented 3 years ago

@fzaninotto Thank you for the work you put into this. I don't think I'm overreacting when I say this has had a massive impact on the PHP ecosystem as a whole. Good luck with your next endeavors, whether that's in open source, or outside of it! ❀️

seunoyebode commented 3 years ago

@fzaninotto Thank you for all the efforts over the years

carnevalle commented 3 years ago

Thank you for your efforts and good luck with future endeavors!

localheinz commented 3 years ago

I have just published ergebnis/faker:1.9.2 for people who need support for PHP 8.0 immediately.

elishaukpong commented 3 years ago

@fzaninotto Thank you a lot for the efforts you put into this project, I sincerely enjoyed using it over my development journey.

chris-doehring commented 3 years ago

Thank you for your work @fzaninotto. As I already said, I'm using this package plenty of times and it helped me making my tests more reliable and therefor my applications more secure :)

mazraara commented 3 years ago

Thanks for your work!

fourstacks commented 3 years ago

To chime in with the others in this thread - thanks so much for your work on Faker over the years. It's been a fantastic tool and I hope it continues in some shape or form in the future.

joecampo commented 3 years ago

Thank you for all your hard work throughout the years!

ruslanashaari commented 3 years ago

@fzaninotto thanks for your efforts over the years!

negoziator commented 3 years ago

I want to thank you very much for all the work you've done. I've been using faker heavily through the years.

Thank you! 😎

GrahamCampbell commented 3 years ago

https://github.com/FakerPHP

ssmusoke commented 3 years ago

@fzaninotto Faker has been invaluable to the community thank you for all you have done.

Your approach to sunsetting the project has also opened a path for handling of open source projects too, thank you for pioneering this too

hotmeteor commented 3 years ago

Thanks for all your work on this great package, @fzaninotto

Cannonb4ll commented 3 years ago

Understandable, thank you for your work on this @fzaninotto πŸ’ͺ

techguydev commented 3 years ago

Thanks a lot for your effort and great work!, thanks for sharing this project with all of us. Best wishes in your endeavors.

sjelfull commented 3 years ago

Thank you for all the hard work, and good luck!

taytus commented 3 years ago

Francois, thank you so much for your work.

lostdesign commented 3 years ago

Even if most of the time I've been actually typing or filling fields in the DB by hand, Faker saved me a lot of time when I used it. Been such a lovely package, thanks for all your effort and love that went into this.

amitavroy commented 3 years ago

Thank you for your effort... @fzaninotto I would like to tell you that you package has helped me a lot. As a member of the community, I guess I respect your decision and wish you luck. I hope, someone picks it up and continue this wonderful package.

thijsvdanker commented 3 years ago

Thank you @fzaninotto for all your hard work on this great package πŸ‘πŸ‘πŸ‘

lukio3 commented 3 years ago

Thank you so much @fzaninotto for your work on getting faker to where it is today.

luigircruz commented 3 years ago

Thank you for the years of hard work that you've put on this package @fzaninotto! You've created a tool that is so beneficial to the PHP community.

SeoFood commented 3 years ago

WoW thanks man for that amazing package πŸ’•

fgilio commented 3 years ago

Thanks for all your work, it's been immensely helpful πŸ™Œ

cyrildewit commented 3 years ago

@fzaninotto Thank you for your work!

Hasnayeen commented 3 years ago

@fzaninotto thank you for all your work!