Problem/Motivation

As (soon to be) discovered by mglaman/phpstan-drupal 1.2.0 (see #3383279: Bump mglaman/phpstan-drupal to latest to make daily "updated deps" QA run pass again), 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 #3383279: Bump mglaman/phpstan-drupal to latest to make daily "updated deps" QA run pass again 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

Issue fork drupal-3383316

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

Spokje created an issue. See original summary.

spokje’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Confirmed got this error too. Tests are all green so think this is good.

catch’s picture

spokje’s picture

Status: Needs work » Reviewed & tested by the community

Rerolled with PHPStan baseline suppression removed and re-RTBC-ed, since there were no code changes.

  • catch committed b50ba1f4 on 11.x
    Issue #3383316 by Spokje: Replace deprecated getComposer() of class...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed b50ba1f and pushed to 11.x. Thanks!

Status: Fixed » Closed (fixed)

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