From b50ba1f4a9e690af1d3316a1c3d76171068edf06 Mon Sep 17 00:00:00 2001 From: catch Date: Sat, 26 Aug 2023 09:14:31 +0100 Subject: [PATCH] Issue #3383316 by Spokje: Replace deprecated getComposer() of class Composer\Command\BaseCommand in ComposerScaffoldCommand --- composer/Plugin/Scaffold/ComposerScaffoldCommand.php | 2 +- core/phpstan-baseline.neon | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/composer/Plugin/Scaffold/ComposerScaffoldCommand.php b/composer/Plugin/Scaffold/ComposerScaffoldCommand.php index c1b34ca503b..13a6aa7d32b 100644 --- a/composer/Plugin/Scaffold/ComposerScaffoldCommand.php +++ b/composer/Plugin/Scaffold/ComposerScaffoldCommand.php @@ -48,7 +48,7 @@ EOT * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output): int { - $handler = new Handler($this->getComposer(), $this->getIO()); + $handler = new Handler($this->requireComposer(), $this->getIO()); $handler->scaffold(); return 0; } diff --git a/core/phpstan-baseline.neon b/core/phpstan-baseline.neon index 65371e0904c..42efef5132f 100644 --- a/core/phpstan-baseline.neon +++ b/core/phpstan-baseline.neon @@ -1,13 +1,5 @@ parameters: ignoreErrors: - - - message: """ - #^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$# - """ - count: 1 - path: ../composer/Plugin/Scaffold/ComposerScaffoldCommand.php - - message: "#^Variable \\$data_path in empty\\(\\) always exists and is not falsy\\.$#" count: 1