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

Update Package to Support PHP 8.0+ (v1.2) #13

Merged
merged 19 commits into from
Feb 3, 2023
Merged

Conversation

justinyost
Copy link
Collaborator

@justinyost justinyost commented Jan 31, 2023

Remove support for PHP 5/7.

Updated CircleCI builds to install, test and code-sniff correctly on PHP 8.

Updated all sub-classes for updated CodeSniffs, removes deprecation warnings for PHP 8, updated PHPUnit support to PHPUnit 9.0.

Post this PR being merged, we're going to increment the version number to 1.2.

@justinyost justinyost added the wip Work in Progress label Jan 31, 2023
@justinyost justinyost self-assigned this Jan 31, 2023
@justinyost justinyost force-pushed the fully-support-php8 branch 2 times, most recently from 18a2b61 to 7f4756a Compare February 1, 2023 21:36
@justinyost justinyost changed the title Test Multiple PHP Build Versions Update Package to Support PHP 8.0+ Feb 1, 2023
@justinyost justinyost changed the title Update Package to Support PHP 8.0+ Update Package to Support PHP 8.0+ (v1.2) Feb 1, 2023
@justinyost justinyost added dependencies PR that updates or adds new dependencies to the project. feature This PR adds a new feature to the codebase. review This PR can be reviewed by the team. and removed wip Work in Progress labels Feb 1, 2023
@justinyost justinyost requested review from lisavogtsf and a team February 1, 2023 21:45
@justinyost justinyost marked this pull request as ready for review February 1, 2023 21:49
Methods were sending deprecation warnings as we had issues on PHP 8

Signed-off-by: Justin Yost <[email protected]>
Signed-off-by: Justin Yost <[email protected]>
Copy link

@lisavogtsf lisavogtsf left a comment

Choose a reason for hiding this comment

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

Do we worry at all about staying in sync with Amazon? This feels like a lot of changes to something that is fundamentally Amazon's code.

Also is it expected that all the tests are 'Risky' or This test did not perform any assertions in local? Or am I possibly running them wrong?

@@ -28,21 +28,21 @@
}
],
"require": {
"php": ">=5.5",
"php": "^8.0",

Choose a reason for hiding this comment

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

Is this upgrade considered a breacking change (thus we need to bump version to 2.0.0)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@enricobono I don't think so based upon my understanding, referring to this post that sums up how I'm thinking about it https://medium.com/@sampart/semantic-versioning-when-you-change-the-required-programming-language-version-16a3a3555c95.

The short version is: We're not changing the actual API for the package in any breaking way, merely the required PHP version and Composer will handle that if you don't have PHP 8 available on your machine you'll get the last version that does work for you.

Choose a reason for hiding this comment

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

Make sense, thanks.

@justinyost
Copy link
Collaborator Author

@lisavogtsf

I don't necessarily want to be out of synch with Amazon's code, but also we need code that works for us and is easily installable. I'll include some documentation to note more explicitly that this package is not a 1:1 copy of Amazon's code in the Readme.

Yes, that is indeed what the tests are reporting, I think it's a place we should look at making some improvements again beyond what Amazon have done, but not really in scope for our current work.

Based upon feedback here: #13 (review)

Signed-off-by: Justin Yost <[email protected]>
@justinyost
Copy link
Collaborator Author

@lisavogtsf Commit that adds explicit notes about what's changed from Amazon's original code: 5ab2c8f

Copy link

@lisavogtsf lisavogtsf left a comment

Choose a reason for hiding this comment

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

Thank you for the clarifications, this looks good to me, and I agree on the minor version change.

Noted as an issue here: #12 (comment)

Signed-off-by: Justin Yost <[email protected]>
@justinyost justinyost merged commit e70d2ca into main Feb 3, 2023
@justinyost justinyost deleted the fully-support-php8 branch February 3, 2023 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies PR that updates or adds new dependencies to the project. feature This PR adds a new feature to the codebase. review This PR can be reviewed by the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants