As a developer, I want to be able to work on the data-values libraries using the newest PHP version.
Problem:
Some of our data-values libraries still use PHPUnit 4. WikibaseRepo has very clear words for this:
/** * Awful hack: several tests extend DataValues test classes. DataValues works on PHPUnit4 only, hence * it uses setExpectedException (amongst other things). But Wikibase requires PHP 7.2+ and PHPUnit6+, * where setExpectedException doesn't exist anymore. This was resolved by using the PHPUnit4And6Compat * trait provided by core, but that's deprecated as of 1.34. * * @todo Get rid of this trait as soon as DataValues moves away from withered PHPUnit. */ trait PHPUnit4CompatTrait {
PHPUnit 4 doesn’t even work under PHP 7.4 anymore, so it’s not possible to test these libraries under the latest released PHP version.
Example:
wmde/Time#149 is an attempt to pull data-values/time into the present day but it’s kicking and screaming and generally being annoying about it.
Note: Except https://github.com/wmde/Time, https://github.com/wmde/Number libraries involved here are not maintained by WMDE, therefore WMDE will only be able to provide updates and will not be in charge of releasing new versions.
Acceptance criteria:
- The DataValues libraries use recent versions of PHPUnit (such as 8.5+)
- https://github.com/DataValues/Geo
- https://github.com/DataValues/DataValues (Uses PHPUnit 8 here already)
- https://github.com/DataValues/Interfaces
- https://github.com/DataValues/Common
- https://github.com/DataValues/Serialization
- https://github.com/DataValues/Validators
- https://github.com/DataValues/Iri
- https://github.com/wmde/Time
- https://github.com/wmde/Number
- https://github.com/DataValues/DataValues/pull/59
- https://github.com/DataValues/Common/pull/91
- https://github.com/DataValues/Serialization/pull/42
- https://github.com/DataValues/Interfaces/pull/53
- https://github.com/DataValues/Geo/pull/190
- https://github.com/DataValues/Validators/pull/21
- https://github.com/wmde/Time/pull/153
- https://github.com/wmde/Number/pull/130
- https://github.com/DataValues/Iri/pull/2
- …