Closed LucasKovacs closed 4 years ago
Thanks for reporting (with details: I appreciate a lot), but the situation is already known !
To resume, all versions until 5.3.0 are not yet ready to detect all PHP 7 features. This is the main goal of future 5.4.0 that will come soon now.
Branch 5.4 is currently under huge refactoring to avoid monolithic architecture (legacy) code, enhance maintainibility, and allow to add easily fix about detection/feature missing.
I may be available to push to repository in few hours a running v5.4 that you can test !
With test script added by commit e89de39, future 5.4 will give such result :
bin/phpcompatinfo analyser:run tests/fixtures/gh273.php
Data Source Analysed
Directories 1
Files 1
Errors 0
Extensions Analysis
Extension Matches REF EXT min/Max PHP min/Max PHP all
Core Core 4.0.0 4.0.0
standard standard 4.0.0 4.0.0
Total [2] 4.0.0
Namespaces Analysis
Namespace Matches REF EXT min/Max PHP min/Max PHP all
user 7.1.0
Total [1] 7.1.0
No interface found
No trait found
No class found
Functions Analysis
Function Matches REF EXT min/Max PHP min/Max
test user 7.1.0
testReturn1 user 7.1.0
testReturn2 user 7.1.0
var_dump standard 4.0.0 4.0.0
Total [4] 7.1.0
Constants Analysis
Constant Matches REF EXT min/Max PHP min/Max
null Core 4.0.0 4.0.0
Total [1] 4.0.0
No condition found
Requires PHP 7.1.0 (min), PHP 7.1.0 (all)
@LucasKovacs : beta code is up and running in repo (branch 5.4), if you want to test the preview
@llaville I will give it a try! thanks :)
I was not aware that 5.3 did not have full support
See also commit 58660ad995ca025b7080598354970bc121380d61 that handle parameters type hinting
Will be release in two weeks with official release 5.4.0
PHP 7.1 nullable types are not being detected.
For example, the following block of code won't be identified as a PHP 7.1 block
Currently using: version 5.3.0 DB version 2.16.0 Installed via Composer
Reference: https://www.php.net/manual/en/migration71.new-features.php