Problem/Motivation
GitLab pipeline tests currently do not show deprecation messages. For example the error in #3414135: Deprecation notice in tests: Passing null to the $typedConfigManager parameter of ConfigFormBase::__construct() is deprecated in drupal:10.2.0 was not discovered on Gitlab testing, so when DrupalCI testing default moved from 10.1 to 10.2 the phpunit tests failed.
Issue fork module_filter-3414272
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
jonathan1055 commentedThe first step is to undo the recent fix, so that gitlab has something to show.
Comment #4
jonathan1055 commentedThere is relevant discussion on #3400979: Is SYMFONY_DEPRECATIONS_HELPER: weak correct for contrib deprecation testing needs?
Comment #5
jonathan1055 commentedTook a while to get there but we now have a failing test at 10.2 for the deprecation error
https://git.drupalcode.org/issue/module_filter-3414272/-/jobs/623167#L170
Now fix the error and it should be green.
I have also added a test at next_minor (which is currently 10.2.x but will become 10.3.x when that branch is created) and next_major (which is 11.x).
Comment #6
jonathan1055 commentedRebuilt the branch locally, as the gitlab UI 'rebase' button is no longer available. The "resolve conflicts" button added the latest commits into this branch, and made the 'changes' confusing. So I trashed the branch, re-created locally and force-pushed. It is now a clean MR again.
Comment #7
jonathan1055 commentedThat's good, as we can see that the "next minor" phpunit job reports the deprecation.
https://git.drupalcode.org/issue/module_filter-3414272/-/jobs/658013#L112
I have set this job to have 'allow_ failure:false' so that the pipeline ends amber not red. That is enough to alert us of deprecations that we can then fix.
Comment #8
jonathan1055 commentedNow that I have removed the forced deprecation, the latest pipeline is all green
https://git.drupalcode.org/issue/module_filter-3414272/-/pipelines/79754
But the previous pipeline shows the amber warning for 'next minor' when the deprecation was not fixed
https://git.drupalcode.org/issue/module_filter-3414272/-/pipelines/79460
Currently 'phpunit next minor' is running core 10.2.3-dev which is the same as the plain 'phpunit' job. But the Gitlab Templates project maintains this setting and when 10.3.x-dev is created this will be used in the 'next minor' job. So we do not need to do anything, the core version will automatically test the newer realese when it is available.
Ready for review!
Comment #10
smustgrave commentedRelying on your expertise on gitlab for this one.
Comment #11
smustgrave commentedComment #12
jonathan1055 commentedThanks for the commit, and the confidence. :-)
Just for reference, if we come back here in future to try adding the 'next major' job, the code needed is
I did not add this here, because "phpunit next major" cannot currently run due to none of our dependency modules declaring compatibility with core ^11.x. When those modules are compatible with 11.x or they have MRs/patches which add that, then it would be possible to test against 11.x