Skip to content

Commit

Permalink
disable CheckDirectDependencyUse
Browse files Browse the repository at this point in the history
  • Loading branch information
diosmosis committed Jun 12, 2024
1 parent 0838c66 commit b8a266d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions resources/core-scoper.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <<<PHP
\$plugin = \$this->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;
},
],
Expand Down

0 comments on commit b8a266d

Please sign in to comment.