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:
391
391
cd e2e/composer-version-config
392
392
composer install
393
393
../../bin/phpstan analyze test.php --level=0
394
- - script : |
395
- cd e2e/composer-version-named-args
396
- ../../bin/phpstan analyze test.php --level=0
397
394
398
395
steps :
399
396
- name : " Checkout"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 34
34
final class ConstantResolver
35
35
{
36
36
37
- public const PHP_MIN_ANALYZABLE_VERSION_ID = 50207 ;
38
-
39
37
/** @var array<string, true> */
40
38
private array $ currentlyResolving = [];
41
39
@@ -143,7 +141,7 @@ public function resolvePredefinedConstant(string $resolvedConstantName): ?Type
143
141
return $ this ->createInteger ($ minRelease , $ maxRelease );
144
142
}
145
143
if ($ resolvedConstantName === 'PHP_VERSION_ID ' ) {
146
- $ minVersion = self :: PHP_MIN_ANALYZABLE_VERSION_ID ;
144
+ $ minVersion = 50207 ;
147
145
$ maxVersion = null ;
148
146
if ($ minPhpVersion !== null ) {
149
147
$ minVersion = max ($ minVersion , $ minPhpVersion ->getVersionId ());
Original file line number Diff line number Diff line change 52
52
use PHPStan \Parser \NewAssignedToPropertyVisitor ;
53
53
use PHPStan \Parser \Parser ;
54
54
use PHPStan \Php \PhpVersion ;
55
- use PHPStan \Php \PhpVersionFactory ;
56
55
use PHPStan \Php \PhpVersions ;
57
56
use PHPStan \PhpDoc \Tag \TemplateTag ;
58
57
use PHPStan \Reflection \Assertions ;
@@ -6236,10 +6235,8 @@ public function getIterableValueType(Type $iteratee): Type
6236
6235
6237
6236
public function getPhpVersion (): PhpVersions
6238
6237
{
6239
- $ overallPhpVersionRange = IntegerRangeType::fromInterval (ConstantResolver::PHP_MIN_ANALYZABLE_VERSION_ID , PhpVersionFactory::MAX_PHP_VERSION );
6240
-
6241
6238
$ constType = $ this ->getGlobalConstantType (new Name ('PHP_VERSION_ID ' ));
6242
- if ($ constType !== null && ! $ constType -> equals ( $ overallPhpVersionRange ) ) {
6239
+ if ($ constType !== null ) {
6243
6240
return new PhpVersions ($ constType );
6244
6241
}
6245
6242
You can’t perform that action at this time.
0 commit comments