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

Move to PHP 8.1 minimum version, add typing #97

Merged
merged 33 commits into from
Feb 25, 2023

Conversation

NicolasCARPi
Copy link
Sponsor Collaborator

As discussed in #63, here is a set of changes to bring this lib into modern PHP.

I'll leave this as a draft for now, as it's not 100% complete, but this gives you an opportunity to start the review process and leave comments.

~Nico

@NicolasCARPi NicolasCARPi marked this pull request as ready for review December 23, 2022 11:48
@NicolasCARPi
Copy link
Sponsor Collaborator Author

Hello,

I have tested the new version in my application, it works fine. While there is still some types to add here and there, I think this could already be reviewed and merged, the changeset is big enough as it is.

@willpower232
Copy link
Collaborator

great stuff, I need to upgrade my doodad that uses this library so I'll give it a go next week 🙏

@RobThree
Copy link
Owner

I'm having a Christmas vacation currently; I hope to be able to spend some time on this next week.

Merry Christmas, happy holidays everyone! Thank you all so much for contributing! 🎅🎄

Copy link
Collaborator

@willpower232 willpower232 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Predictably, this works for me which is nice to see. I think there are some readability improvements and consistency factors to address as I've requested changes on.

I haven't duplicated my comments but most of them apply to more than just the file I wrote them on.

I'd also like to see the screws turned up on the static analysis and linting to make it really chefs kiss. It might be worth looking at Easy Coding Standards to combine the lint and code quality part.

composer.json Show resolved Hide resolved
lib/Providers/Qr/BaconQrCodeProvider.php Outdated Show resolved Hide resolved
lib/Providers/Qr/BaconQrCodeProvider.php Show resolved Hide resolved
lib/Providers/Qr/BaseHTTPQRCodeProvider.php Show resolved Hide resolved
lib/Providers/Qr/EndroidQrCodeProvider.php Show resolved Hide resolved
lib/Providers/Time/NTPTimeProvider.php Show resolved Hide resolved
lib/TwoFactorAuth.php Show resolved Hide resolved
phpstan.neon Outdated Show resolved Hide resolved
tests/MightNotMakeAssertions.php Outdated Show resolved Hide resolved
tests/Providers/Qr/IQRCodeProviderTest.php Show resolved Hide resolved
@NicolasCARPi
Copy link
Sponsor Collaborator Author

Thanks for your comments @willpower232. I have adressed them.

@NicolasCARPi
Copy link
Sponsor Collaborator Author

Hello @willpower232 and @RobThree. Shall we proceed with this?

@RobThree
Copy link
Owner

@NicolasCARPi We should First of all, thank you for your work. I've just been swamped at work and haven't had the energy to look into this a little deeper. I will do so ASAP, promised.

@NicolasCARPi
Copy link
Sponsor Collaborator Author

Hello, this is a gentle ping :)

@RobThree
Copy link
Owner

RobThree commented Feb 12, 2023

I was gonna take this up this weekend. Guess what? My ESXi server's HDD decided to die on me last fridaynight 😡 So now I'm spending the weekend restoring VM's. Thank God I make regular backups etc. and I have disks ready on the shelf, but this weekend is gone. I promise to try to take a look next week. AFAIK there weren't many, if any at all, issues so it should be quite quick and easy.

Current state of ESXi host
Current state of ESXi host

@RobThree
Copy link
Owner

RobThree commented Feb 20, 2023

Ok. It took a little longer than I had hoped but I think I'm ok with calling this a 2.0. What would you guys recommend? I was thinking (for now) to branch the current to a 1.X branch and merge this PR to master?

Also @NicolasCARPi and @willpower232 : I would be honoured to put your names in the composer.json file under authors. Would you be ok with that and, if so, please provide me with the details you'd like me to put there (or make a PR with the suggested values)?

@NicolasCARPi
Copy link
Sponsor Collaborator Author

branch the current to a 1.X branch and merge this PR to master?

Sounds good to me!

Just pushed a commit for authors ;)

Copy link
Collaborator

@willpower232 willpower232 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds like a plan 😎

@NicolasCARPi would you mind adding my details in the same style as yours? linking to github is fine.

also CI is sad because its now using phpunit 10, could you set it to 9 or 10 instead of @stable in composer.json (and if you go with 10, you'll need to vendor/bin/phpunit --migrate-configuration)

@NicolasCARPi
Copy link
Sponsor Collaborator Author

@willpower232, I added you. Didn't realize the phpunit dependency was set to @stable, which is not a good idea! I set it to 9 for now.

Copy link
Collaborator

@willpower232 willpower232 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great, thanks!

@RobThree version 2.0 makes sense since the composer.json requirements have changed dramatically

lib/Providers/Qr/BaconQrCodeProvider.php Outdated Show resolved Hide resolved
testsDependency/BaconQRCodeTest.php Outdated Show resolved Hide resolved
.github/workflows/test-endroid.yml Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@RobThree
Copy link
Owner

I'll make a release soon; I hate to say it (and keep saying it) but I'm a bit busy... I'll try to get around to this in a few days (though the weekend is fully booked by the misses... again... 🙄 )

@willpower232
Copy link
Collaborator

@RobThree I can "push the button" for this and #101 if you like

@RobThree
Copy link
Owner

You know what, that would be great. If you'd be so kind, then please, go ahead.

@willpower232 willpower232 merged commit 27cd1e1 into RobThree:master Feb 25, 2023
@NicolasCARPi NicolasCARPi deleted the php8 branch February 25, 2023 11:42
@willpower232
Copy link
Collaborator

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

Successfully merging this pull request may close these issues.

None yet

4 participants