Compatibility fix merge request testing
mradcliffe @mradcliffe@nokoto.org
If you maintain a Drupal module and are reviewing your “Automated Drupal 12 compatibility fixes” merge requests, remember to trigger the “composer (next major)” step manually so you can actually test the changes on Drupal 12.
If you are also thinking about keeping Drupal 10 support, trigger that “composer (previous major)” job too. However, from my experience, I have not been able to maintain compatibility between all three (or more) versions when trying to go without deprecated messages. This is probably because I rely heavily on tests using the dataProvider annotation (now DataProvider attribute).
A few things that I have run into, some of which are no longer relevant as of this week thanks to the improvements from Björn (bbrala) and feedback provided by the amazing maintainers.
- Bump my initial dependencies to the latest Drupal 10 and 11 minor:
^10.6 || ^11.3.- I don’t normally opt-in to the “composer (next minor)” job so I have been postponing issues where the changes will be introduced in 11.4.0. This has happened to me for a couple of projects, and so I need to create a new branch to drop Drupal 10 support completely:
^11.4 || ^12.
- I don’t normally opt-in to the “composer (next minor)” job so I have been postponing issues where the changes will be introduced in 11.4.0. This has happened to me for a couple of projects, and so I need to create a new branch to drop Drupal 10 support completely:
- Fix
phpstan.neon.distbecause phpstan had a breaking changed toexcludePathsthat now requires directories to be specified with a trailing/*. - Update PHPUnit deprecations:
Annotations to Attributes- Removal of
$this->any()and$this->expects(), which were just boilerplate before.
- Since I am usually removing Drupal 10 support, I get rid of
LegacyHookattribute and remove theDeprecationHelper::backwardsCompatibleCallcalls, which usually break 12 quality and unit tests anyway. And of course updating any existing core annotations to attributes.
Then at this point, I can finally focus on any real test failures, which still may be occurring.
If you don’t have the picture shiny cool button to trigger the “composer (next major)” job, think about adding a or modifying the .gitlab-ci.yml file in your repository.