Skip to content

Commit

Permalink
[BCB] Removed bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Sep 12, 2021
1 parent f67b48a commit 1baa294
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
2 changes: 0 additions & 2 deletions conf/config.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
includes:
- config.stubFiles.neon
parameters:
bootstrap: null
bootstrapFiles:
- ../stubs/runtime/ReflectionUnionType.php
- ../stubs/runtime/ReflectionAttribute.php
Expand Down Expand Up @@ -177,7 +176,6 @@ extensions:
parametersSchema: PHPStan\DependencyInjection\ParametersSchemaExtension

parametersSchema:
bootstrap: schema(string(), nullable())
bootstrapFiles: listOf(string())
excludes_analyse: listOf(string())
excludePaths: schema(anyOf(
Expand Down
2 changes: 1 addition & 1 deletion phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ parameters:

-
message: "#^Anonymous function has an unused use \\$container\\.$#"
count: 2
count: 1
path: src/Command/CommandHelper.php

-
Expand Down
13 changes: 0 additions & 13 deletions src/Command/CommandHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,19 +308,6 @@ public static function begin(
throw new \PHPStan\Command\InceptionNotSuccessfulException();
}

$bootstrapFile = $container->getParameter('bootstrap');
if ($bootstrapFile !== null) {
if ($manageMemoryLimitFile) {
$errorOutput->writeLineFormatted('⚠️ You\'re using a deprecated config option <fg=cyan>bootstrap</>. ⚠️️');
$errorOutput->writeLineFormatted('');
$errorOutput->writeLineFormatted('This option has been replaced with <fg=cyan>bootstrapFiles</> which accepts a list of files');
$errorOutput->writeLineFormatted('to execute before the analysis.');
$errorOutput->writeLineFormatted('');
}

self::executeBootstrapFile($bootstrapFile, $container, $errorOutput, $debugEnabled);
}

foreach ($container->getParameter('bootstrapFiles') as $bootstrapFileFromArray) {
self::executeBootstrapFile($bootstrapFileFromArray, $container, $errorOutput, $debugEnabled);
}
Expand Down

0 comments on commit 1baa294

Please sign in to comment.