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.

Command icon 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

jonathan1055 created an issue. See original summary.

jonathan1055’s picture

Issue summary: View changes

The first step is to undo the recent fix, so that gitlab has something to show.

jonathan1055’s picture

jonathan1055’s picture

Took 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).

jonathan1055’s picture

Rebuilt 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.

jonathan1055’s picture

That'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

   Remaining self deprecation notices (1)
      1x: Passing null to the $typedConfigManager parameter of
    ConfigFormBase::__construct() is deprecated in drupal:10.2.0 and must be an
    instance of \Drupal\Core\Config\TypedConfigManagerInterface in
    drupal:11.0.0. See https://www.drupal.org/node/3404140
        1x in ModuleFilterSettingsFormTest::testModuleFilterSettingsForm from
    Drupal\Tests\module_filter\Kernel\Form

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.

jonathan1055’s picture

Assigned: jonathan1055 » Unassigned
Status: Active » Needs review

Now 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!

smustgrave’s picture

Status: Needs review » Fixed

Relying on your expertise on gitlab for this one.

smustgrave’s picture

jonathan1055’s picture

Thanks 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

composer (next major):
  variables:
    # Modules that we want to simulate as compatible with core 11.x
    LENIENT_ALLOW_LIST: jquery_ui, jquery_ui_autocomplete, jquery_ui_menu

phpunit (next major):
  before_script:
    # The patch command is missing from the php 8.2 image so get it here.
    - sudo apt-get update && sudo apt-get install -y patch
    - *module-filter-core-patches
    # Re-use the reference that the default 'phpunit (next major)' has.
    - !reference [ .amend-core-requirements-drupal-11 ]

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

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.