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
Improve PHP cross-version support and testing #166
Conversation
See #165 for limiting php version 7.2+ |
$preparation = new Force_Single_Plugin_Preparation( 'foo-plugin/foo-plugin.php' ); | ||
|
||
$this->expectException( 'Exception' ); | ||
$this->expectExceptionMessage( 'Invalid plugin akismet/akismet.php: Plugin file does not exist.' ); | ||
$this->expectExceptionMessage( 'Invalid plugin foo-plugin/foo-plugin.php: Plugin file does not exist.' ); | ||
$preparation->prepare(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was inaccurate because in some environments like wp-env Akismet does exist, so there wouldn't be an exception.
It's more robust to use a slug that definitely does not exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @swissspidy looks great, approved
"lint": "phpcs --standard=phpcs.xml.dist", | ||
"format": "phpcbf --standard=phpcs.xml.dist", | ||
"lint": [ | ||
"composer --working-dir=build-cs install", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we make this another script, maybe pre-cs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems overkill do me, I don't see harm in this tiny bit of repetition. This way it's more connected with the next script and more readable, plus I don't see a reason why someone would want to run this command on its own.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is nearly there, just a couple of questions and nitpics. After that, i would approve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @swissspidy. It looks good to me. I have left some minor suggestions (nitpicks). I noticed there is one pending task mentioned in the PR description. Will it be addressed as part of this PR or in a follow-up PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with some nicpics.
Great question! IMHO that's better addressed in a follow-up issue / PR because it requires some investigation. It could be a bad test or an actual bug in the plugin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @swissspidy, for the update. The changes look good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work @swissspidy!
@swissspidy, can you please open a follow-up issue to ensure it doesn't get missed? |
Opened #169 |
Description of the Change
concurrency
setting for GitHub Actions workflowsuse
statementsTo-do
Closes #164
Credits
Checklist: