Skip to content

Commit 9a1ba60

Browse files
janedbalondrejmirtes
authored andcommitted
scopeClass parameter is deprecated, warn about that
1 parent aa35eec commit 9a1ba60

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Command/CommandHelper.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Nette\Schema\ValidationException;
1212
use Nette\Utils\AssertionException;
1313
use Nette\Utils\Strings;
14+
use PHPStan\Analyser\MutatingScope;
1415
use PHPStan\Command\Symfony\SymfonyOutput;
1516
use PHPStan\Command\Symfony\SymfonyStyle;
1617
use PHPStan\DependencyInjection\Container;
@@ -472,6 +473,12 @@ public static function begin(
472473
$errorOutput->writeLineFormatted(sprintf('Parameter <fg=cyan>excludes_analyse</> has been deprecated so use <fg=cyan>excludePaths</> only from now on.'));
473474
}
474475

476+
if ($container->hasParameter('scopeClass') && $container->getParameter('scopeClass') !== MutatingScope::class) {
477+
$errorOutput->writeLineFormatted('⚠️ You\'re using a deprecated config option <fg=cyan>scopeClass</>. ⚠️️');
478+
$errorOutput->writeLineFormatted('');
479+
$errorOutput->writeLineFormatted(sprintf('Please implement PHPStan\Type\ExpressionTypeResolverExtension interface instead and register it as a service.'));
480+
}
481+
475482
$tempResultCachePath = $container->getParameter('tempResultCachePath');
476483
$createDir($tempResultCachePath);
477484

0 commit comments

Comments
 (0)