From b8a266d704c5e74cd07c2ec709cd0cabff4ce58d Mon Sep 17 00:00:00 2001 From: diosmosis Date: Tue, 11 Jun 2024 19:17:09 -0700 Subject: [PATCH] disable CheckDirectDependencyUse --- resources/core-scoper.inc.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/resources/core-scoper.inc.php b/resources/core-scoper.inc.php index c8bf07e..eb7c76b 100644 --- a/resources/core-scoper.inc.php +++ b/resources/core-scoper.inc.php @@ -216,6 +216,20 @@ static function (string $filePath, string $prefix, string $content) use ($isRena $content = str_replace('it(', 'it.skip(', $content); } + if ($filePath === __DIR__ . '/plugins/TestRunner/Commands/CheckDirectDependencyUse.php') { + $replacementCode = <<getInput()->getOption('plugin'); +\$this->usesFoundList[\$plugin] = [ + 'Symfony\Component\Console' => [ + \$plugin . '/tests/System/CheckDirectDependencyUseCommandTest.php' + ], +]; +return 0; +PHP; + + $content = preg_replace('/protected\s+function\s+doExecute\(\)\s+:\s+int\s+\{/', '$0' . $replacementCode, $content); + } + return $content; }, ],