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
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:
- 3383316-replace-deprecated-getcomposer
changes, plain diff MR !4643
Comments
Comment #3
spokjeComment #4
smustgrave commentedConfirmed got this error too. Tests are all green so think this is good.
Comment #5
catchWill need a re-roll after #3383339: Replace implementing deprecated interface Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface with ValueResolverInterface
Comment #6
spokjeRerolled with PHPStan baseline suppression removed and re-RTBC-ed, since there were no code changes.
Comment #8
catchCommitted b50ba1f and pushed to 11.x. Thanks!