- Issue created by @dydave
- Merge request !46Issue #3463832 by DYdave: Disabled Migrate D7 block_class Kernel tests for D11. → (Merged) created by dydave
- Status changed to Fixed
9 months ago 11:42pm 25 July 2024 - 🇫🇷France dydave
Quick follow-up on this issue:
Found this interesting approach on How to skip tests in PHPunit?: https://stackoverflow.com/a/35288598
With a piece of code in the
setUp()
method to allow skipping tests with a condition, in this case, next major version D11.Note that this could probably have been implemented differently, for example with parameters and variables provided to the PHPUnit CI job, see:
https://drupal.stackexchange.com/questions/263329/how-to-exclude-phpunit...
such as_PHPUNIT_TESTGROUPS
or_PHPUNIT_EXTRA
, to try to filter or exclude specific tests for certain jobs in GitLab CI.However, this method would probably require more code and maintenance setting up in the GitLab CI config file:
We would need to setup/config almost all the jobs ourselves, see for example:
https://git.drupalcode.org/project/reroute_email/-/blob/2.3.x/.gitlab-ci...That's why in this simple case, it was chosen to disable/skip the tests for D11 in code and not at the CI level.
Eventually, the Bartik → and Seven → contrib themes could become D11 compatible, which would allow reverting these changes and allowing the current Kernel tests to run straight on D11.
However, in case there is no further maintenance and compatibility planned for these legacy themes in contrib, we could either consider:
Adapting Migrate D7 tests to work with D11, see:
https://git.drupalcode.org/project/block_class/-/blob/8.x-1.x/tests/src/...
We could try looking for other modules that could have had the same types of issues, for example, migrating from Bartik/Seven D7 to Olivero/Claro D10/11 and adjust fixtures and expected result classes.Otherwise, it could also make sense to create a new development branch that drops this feature and support for D8 to focus support efforts on D9/10/11.
The Migrate D7 block_class code would still be available in the 8.x-1.x branch which would provide an upgrade path for all core versions supported (8.8 to 11).
It should then be possible to upgrade to another release from the new development branch.
Tests seem to be back to passing in MR!46 🟢:
https://git.drupalcode.org/project/block_class/-/pipelines/234214Thus, the changes were merged in the 8.x-1.x branch at #4 and the tests went back green 🟢:
https://git.drupalcode.org/project/block_class/-/pipelines/234219
Following the last successful build of the development branch, the new stable release 8.x-1.4 → was created and marked as supported/recommended.
Since there seems to be almost as many users of the 8.x-1.x branch as for 2.0.x → , it could make sense to try supporting this branch as much as possible, in particular, if it doesn't require "too much" work, as opposed to 2.0.x which seems to generate much more overall maintenance work, with a much larger code base.
We would greatly appreciate to have your feedback on the new stable release 8.x-1.4 → , any of the recent code changes or aspects of this particular comment.
Feel free to let us know if you have any questions or concerns on this ticket or the latest changes in general, we would surely be glad to help.
Thanks in advance! Automatically closed - issue fixed for 2 weeks with no activity.