Replace deprecated getComposer() of class Composer\Command\BaseCommand in ComposerScaffoldCommand

Created on 25 August 2023, 10 months ago
Updated 26 August 2023, 10 months ago

Problem/Motivation

As (soon to be) discovered by mglaman/phpstan-drupal 1.2.0 (see πŸ“Œ Bump mglaman/phpstan-drupal to latest to make daily "updated deps" QA run pass again Fixed ), we are using some deprecated functionality throughout Drupal core.

This issue is for dealing with:

 ------ ----------------------------------------------------------------------------------------------------------------------
  Line   ComposerScaffoldCommand.php
 ------ ----------------------------------------------------------------------------------------------------------------------
  51     Call to deprecated method getComposer() of class Composer\Command\BaseCommand:
         since Composer 2.3.0 use requireComposer or tryComposer depending on whether you have $required set to true or false

in \Drupal\Composer\Plugin\Scaffold\ComposerScaffoldCommand.

Note: Depending on the landing of πŸ“Œ Bump mglaman/phpstan-drupal to latest to make daily "updated deps" QA run pass again Fixed before the landing of this issue, we also might need to remove a suppression from core/phpstan-baseline.neon

Steps to reproduce

Proposed resolution

Replace the deprecated call with the proposed one.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

11.0 πŸ”₯

Component
ComposerΒ  β†’

Last updated about 21 hours ago

No maintainer
Created by

πŸ‡³πŸ‡±Netherlands Spokje

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024