-
Notifications
You must be signed in to change notification settings - Fork 8
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 PHP, PHPUnit, DataValues, Interfaces #91
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PHP upstream doesn’t support any versions older than 7.2. (In fact even 7.2 is barely supported anymore, but we still expect to use it in Wikimedia production for a while, so the library should stay compatible for the time being.)
This is a lot of changes at once, but I don’t think they can be split. The most important changes are: * The DataValueTest class was removed from DataValues. The release notes advise to “refactor away the bad design”, so I tried to rewrite the tests in a way that makes sense to me: instead of having one test per method (where many tests will end up calling other methods anyways, e. g. most test methods will also effectively test the constructor), test scenarios of how methods might be used in conjunction, e. g. serialize+unserialize. * The ValueFormatterTestBase class was removed from Interfaces. Its use can be substituted in the individual test classes relatively easily. * PHPUnit_Framework_TestCase is now PHPUnit\Framework\TestCase. PHPUnit_Framework_MockObject_Matcher_Invocation seems to have no replacement that’s not marked @internal, so leave that parameter untyped. * getMock() is now createMock(). * @ExpectedException or setExpectedException() is now expectException().
Removed from DataValues in 3.0.0.
lucaswerkmeister
force-pushed
the
modernize
branch
from
September 25, 2020 13:54
f0d8075
to
c1f33d7
Compare
@@ -16,22 +18,37 @@ | |||
* @license GPL-2.0+ | |||
* @author Jeroen De Dauw < jeroendedauw@gmail.com > | |||
*/ | |||
class MonolingualTextValueTest extends DataValueTest { | |||
class MonolingualTextValueTest extends TestCase { |
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.
👍
If we want to declare compatibility with older DataValues versions, we need to keep them around. Mark them as deprecated instead. This reverts commit c1f33d7.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update PHP versions and dependencies on PHPUnit, DataValues and Interfaces. See individual commit messages for details.
I assume this will fail in CI until the new versions of DataValues and Interfaces have been released – I tested this locally by symlinking my Git checkouts into
vendor/data-values/
.