File tree Expand file tree Collapse file tree 4 files changed +2
-44
lines changed
e2e/composer-version-named-args Expand file tree Collapse file tree 4 files changed +2
-44
lines changed Original file line number Diff line number Diff line change @@ -391,9 +391,6 @@ jobs:
391391 cd e2e/composer-version-config
392392 composer install
393393 ../../bin/phpstan analyze test.php --level=0
394- - script : |
395- cd e2e/composer-version-named-args
396- ../../bin/phpstan analyze test.php --level=0
397394
398395 steps :
399396 - name : " Checkout"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3434final class ConstantResolver
3535{
3636
37- public const PHP_MIN_ANALYZABLE_VERSION_ID = 50207 ;
38-
3937 /** @var array<string, true> */
4038 private array $ currentlyResolving = [];
4139
@@ -143,7 +141,7 @@ public function resolvePredefinedConstant(string $resolvedConstantName): ?Type
143141 return $ this ->createInteger ($ minRelease , $ maxRelease );
144142 }
145143 if ($ resolvedConstantName === 'PHP_VERSION_ID ' ) {
146- $ minVersion = self :: PHP_MIN_ANALYZABLE_VERSION_ID ;
144+ $ minVersion = 50207 ;
147145 $ maxVersion = null ;
148146 if ($ minPhpVersion !== null ) {
149147 $ minVersion = max ($ minVersion , $ minPhpVersion ->getVersionId ());
Original file line number Diff line number Diff line change 5252use PHPStan \Parser \NewAssignedToPropertyVisitor ;
5353use PHPStan \Parser \Parser ;
5454use PHPStan \Php \PhpVersion ;
55- use PHPStan \Php \PhpVersionFactory ;
5655use PHPStan \Php \PhpVersions ;
5756use PHPStan \PhpDoc \Tag \TemplateTag ;
5857use PHPStan \Reflection \Assertions ;
@@ -6236,10 +6235,8 @@ public function getIterableValueType(Type $iteratee): Type
62366235
62376236 public function getPhpVersion (): PhpVersions
62386237 {
6239- $ overallPhpVersionRange = IntegerRangeType::fromInterval (ConstantResolver::PHP_MIN_ANALYZABLE_VERSION_ID , PhpVersionFactory::MAX_PHP_VERSION );
6240-
62416238 $ constType = $ this ->getGlobalConstantType (new Name ('PHP_VERSION_ID ' ));
6242- if ($ constType !== null && ! $ constType -> equals ( $ overallPhpVersionRange ) ) {
6239+ if ($ constType !== null ) {
62436240 return new PhpVersions ($ constType );
62446241 }
62456242
You can’t perform that action at this time.
0 commit comments