llaville / php-compatinfo

Library that find out the minimum version and the extensions required for a piece of code to run
https://llaville.github.io/php-compatinfo/7.1/
Other
373 stars 20 forks source link

CompatInfo 5.3.0 is detected as PHP 5.6 #268

Closed llaville closed 4 years ago

llaville commented 4 years ago

Before phpCompatInfo 5.3.0, we used version 3.x of nikic/php-parser package that have PHP bounded context from version 5.2 to 7.2

By upgrading in 5.3.0 to constraint 4.x (4.5.0 or better) the bounded context is now from version 5.2 to 7.4. So we can detect all PHP 5 and 7 features.

When running analyser:run command of phpCompatInfo in src/ folder we get wrong results.

Actual:

Requires PHP 5.6.0 (min), PHP 5.6.0 (all)

Expected at least:

Requires PHP 7.0.0 (min), PHP 7.0.0 (all)
llaville commented 4 years ago

I've added in all php source scripts the declare control structure.

Fix will consist to :