Problem/Motivation

#3162228: Composer 2 Fatal error Call to undefined method Composer\DependencyResolver\Operation\UpdateOperation::getJobType() in /home/mysite/public_html/core/lib/Drupal/Core/Composer/Composer.php:170 adds a build test that copies a fair bit of logic from an existing build test in core (Drupal\BuildTests\Composer\Template\ComposerProjectTemplatesTest). That issue is a critical upgrade path blocker for Drupal 10, so the copypasta doesn't need to block commit, but the shared logic should be moved into a trait or base class.

Additionally, Automatic Updates will need similar functionality for its build tests. The time is now.

Steps to reproduce

N/A

Proposed resolution

Move certain methods -- whichever ones have been duplicated wholesale -- from both tests into a trait or base class.

Remaining tasks

Do it.

User interface changes

None.

API changes

There will be a new trait or base class for use by build tests.

Data model changes

None.

Release notes snippet

TBD

Comments

phenaproxima created an issue. See original summary.

Version: 10.0.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.