Problem/Motivation
#2684095: Convert field kernel tests to KernelTestBaseTNG converted \Drupal\field\Tests\FieldUnitTestBase to the new phpunit-based kernel base test class and it didn't leave the old class for BC. This poses a problem for contrib projects which cannot use the same test class for core 8.0.x and 8.1.x.
Proposed resolution
Bring back a copy of the old class and keep it until 8.2.0 is released.
Remaining tasks
Agree/review.
User interface changes
Nope.
API changes
Tests are not considered APIs, so.. nope :)
Data model changes
Nope.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | interdiff.txt | 610 bytes | amateescu |
| #6 | 2692223-6.patch | 7.43 KB | amateescu |
| #4 | FUTB-diff-against-8.0.x-interdiff.txt | 2.27 KB | berdir |
| #2 | 2692223.patch | 7.44 KB | amateescu |
Comments
Comment #2
amateescu commentedHere it is.
Comment #3
amateescu commentedNote that we have to duplicate the code instead of extending the current
\Drupal\Tests\field\Kernel\FieldKernelTestBasebecause test classes that extend the old FieldUnitTestBase class will not run with phpunit.Comment #4
berdirLooks good to me.
We did the same in other cases (EntityUnitTestBase, still has implementations in core though, views base classes, ..), not sure if we did it for migrate or not.
Attaching a diff against 8.0.x, to be sure that we're not introducing a bug here. It's the same except the deprecation notice, entity_create() calls and the router table that was removed from installSchema().
Comment #5
berdiroh, missed that.
Comment #6
amateescu commentedOpps! Silly me :)
Comment #7
berdirBetter :)
Comment #8
mile23I'm not sure core needs to move backwards on it. I'll just be the same problem in 6 months.
The main practical problem is that D.O won't let you specify which version of core to use in tests, so you have to wait for it to finish failing, and then restart the test using 8.0.x.
Comment #9
berdirWhen 8.1.0 comes out then 8.0.x is unsupported and does not need to work anymore. So by then, it will be safe for modules to update to use the new base classes and only support 8.1 and 8.2
Yes, the testbot situation is unfortunate but not really relevant. This is about allowing contrib to easily support the two relevant minor versions.
Comment #10
alexpottCommitted 57436e1 and pushed to 8.1.x. Thanks!
The differences to 8.0.x look totally sane...
Comment #12
alexpott