SemanticResultFormats
SemanticResultFormats copied to clipboard
Tests against MW master are broken
https://travis-ci.org/SemanticMediaWiki/SemanticResultFormats/builds/642565636
Broken since last September.
https://travis-ci.org/SemanticMediaWiki/SemanticResultFormats/builds/642565636 Broken since last September.
Well, this isn't surprising as one can see from the error message "Fatal error: Declaration of SMW\Tests\DatabaseTestCase::setUpBeforeClass() must be compatible with PHPUnit\Framework\TestCase::setUpBeforeClass(): void" with typing being enforced because master uses PHPUnit 7 (or 8 or 9, I don't know I stopped following what happens on master) which means those methods need to be updated.
I don't know whether adding : void to all required methods (setUp, tearDown etc.) breaks PHPUnit 6.5 or not but SRF should first switch to PHPUnit 6.5 as a minimum and take it from there.
To be honest it is kind of silly to add those typings to ~1000 test classes in SMW alone hence it is not on my priority list.
Uh yeah. I'm not a fan of :void myself and think there have been a number of dubious breaking changes like that in PHPUnit over the years. Please don't let that scare you of types in general :)
Maybe the tool Rector can be used to add ": void" ? https://github.com/rectorphp/rector/issues/962
@JeroenDeDauw I'm working on #570. In this context, I'd update .travis.yaml to install a compatible Mermaid version.
Shall I temp. disable
include:
#- env: DB=mysql; MW=master; SMW=~3.1@dev; TYPE=coverage
# php: 7.3
to avoid Travis reporting errors because of #567?
Just replace master with the most recent working version. Then we keep the coverage build
Maybe the tool Rector can be used to add ": void" ?
No need, this can be done with a simple search and replace. Or rather 4 of them (setUp, tearDown, setUpBeforeClass, ...) but this is still easy/quick.
No need, this can be done with a simple search and replace. Or rather 4 of them (setUp, tearDown, setUpBeforeClass, ...) but this is still easy/quick.
There is nothing to fix on the SMW side (because I already did that #4465, #4566 which could have been done by anyone else but again ...) and if everyone would take a closer look on why and where the failing happens then it should become obvious that MW master can only run with SMW master while any other version is incompatible.