Skip to content

Commit 741c401

Browse files
committed
[BE] Fail build when project config uses custom extensions outside of analysed paths
1 parent 39b82cd commit 741c401

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

changelog-2.0.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ Bleeding edge (TODO move to other sections)
9393
* Deprecated: returning plain strings as errors, use RuleErrorBuilder
9494
* Learn more: [Using RuleErrorBuilder to enrich reported errors in custom rules](https://phpstan.org/blog/using-rule-error-builder)
9595
* Deprecated: returning RuleError without identifier (https://github.com/phpstan/phpstan-src/commit/969e6fa31d5484d42dab902703cfc6820a983cfd)
96-
* Fail build when project config uses custom extensions outside of analysed paths
97-
* This will only occur after a run that uses already present and valid result cache
9896
* Check if required file exists ([#3294](https://github.com/phpstan/phpstan-src/pull/3294)), #3397, thanks @Bellangelo!
9997
* Check generics `@method` `@template` tags above traits (https://github.com/phpstan/phpstan-src/commit/aadbf62d3ae4517fc7a212b07130bedcef8d13ac)
10098
* Check `@mixin` PHPDoc tag above traits (https://github.com/phpstan/phpstan-src/commit/0d0de946900adf4eb3c799b1b547567536e23147)
@@ -140,6 +138,8 @@ Improvements 🔧
140138
* This fixes following **17 issues**: #8166, #8127, #7944, #7283, #6653, #6196, #9084, #8683, #8074, #7984, #7301, #7087, #5594, #5592, #9472, #9764, #10092
141139
* Non-static methods cannot be used as static callables in PHP 8+ ([#2420](https://github.com/phpstan/phpstan-src/pull/2420)), thanks @staabm!
142140
* Analysis with zero files results in non-zero exit code (https://github.com/phpstan/phpstan-src/commit/46ff440648e62617df86aa74ba905ffa99897737), #9410
141+
* Fail build when project config uses custom extensions outside of analysed paths
142+
* This will only occur after a run that uses already present and valid result cache
143143

144144
Bugfixes 🐛
145145
=====================

src/Command/AnalyseCommand.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -503,12 +503,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
503503

504504
$errorOutput->writeLineFormatted('');
505505

506-
$bleedingEdge = (bool) $container->getParameter('featureToggles')['projectServicesNotInAnalysedPaths'];
507-
if ($bleedingEdge) {
508-
return $inceptionResult->handleReturn(1, $analysisResult->getPeakMemoryUsageBytes(), $this->analysisStartTime);
509-
}
510-
511-
$errorOutput->getStyle()->warning('This will cause a non-zero exit code in PHPStan 2.0.');
506+
return $inceptionResult->handleReturn(1, $analysisResult->getPeakMemoryUsageBytes(), $this->analysisStartTime);
512507
}
513508
}
514509

0 commit comments

Comments
 (0)