-
Notifications
You must be signed in to change notification settings - Fork 59
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
PHP8 support. PHPUnit 9. Update Travis. Update test config #139
PHP8 support. PHPUnit 9. Update Travis. Update test config #139
Conversation
d4790a5
to
37b0fa4
Compare
37b0fa4
to
8e1dfb8
Compare
@chrispenny We're almost there, please add the following config to the <file>src</file>
<file>tests</file> |
Here is an example of phpcs file: https://github.com/silverstripe/silverstripe-versioned-snapshots/blob/1/phpcs.xml.dist |
9799914
to
170acc0
Compare
All ticks are green :D Nice one @chrispenny |
Thank you for all of the help, @mfendeksilverstripe! I've gone through my own regression tests for the project I'm working on, and I'm feeling pretty happy that the existing features that we rely on are still functioning. |
Hey @chrispenny , I noticed the following warning in the CI run:
This is coming from the PHPUnit 9 and we should be able to fix it by updating the |
Thanks, @mfendeksilverstripe! I added allowed plugins (for composer v2), and ran the |
@@ -1,57 +1,9 @@ | |||
language: php | |||
version: ~> 1.0 |
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 you replace this with https://github.com/silverstripe/gha-ci - we're replacing travis with this
You may need to do this in a separate PR that we merge before this one
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.
I've raised #140
Can this happen after this 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.
yeah after is fine
"silverstripe/recipe-plugin": true, | ||
"silverstripe/vendor-plugin": true | ||
} | ||
} |
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.
Please remove the branch-alias from composer.json
I've created new 5
and 5.1
branches from master
and retargetted this PR to 5
Please also create a follow up PR to remove the branch alias from the master
branch
You'll want to check relevant projects that they're requiring this as ^5
rather than dev-master
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.
I don't really understand what the consequences of those changes are, but they kinda sound like general house keeping? Does this all need to part of this PHP 8 upgrade 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.
Preferably now .. we're targeting this at the 5
branch (which should have always existed), so if we keep the existing branch-alias's in the 5
and master
branches there' a chance that requesting 5.x-dev
will mistakenly fetch from the master
branch when it shouldn't
Co-authored-by: Steve Boyd <emteknetnz@gmail.com>
Co-authored-by: Steve Boyd <emteknetnz@gmail.com>
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.
Happy with changes here
Fixes #135
Fixes #138
PHP Unit 9
Not too much had to update here. Just the usual missing
: void
declarations, and I needed to update some deprecated methods andassertContains
to the newassetStringContainsString
.Travis update
I'm not 100% across all of the settings that used to be there (in particular the cache dir settings). I've really just grabbed what is the latest "template" from some other Silverstripe modules. 🤞
Updated yml config
--prefer-source
can successfully run its own unit tests without these missing classes throwing an error (as described in 5.1: SapphireTestState config forces you to prefer-source for development/testing #138)Practical test