blackfireio / php-sdk

The Blackfire PHP SDK
https://blackfire.io
MIT License
150 stars 22 forks source link

PHP 5.3 compatibility #20

Closed echernyavskiy closed 7 years ago

echernyavskiy commented 7 years ago

PHP Code Sniffer check with the PHPCompatibility standard reports the following PHP 5.3 compatibility issues:

FILE: .../vendor/blackfire/php-sdk/src/Blackfire/Bridge/Guzzle/Middleware.php
------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------------
34 | ERROR | 'callable' type declaration is not present in PHP version 5.3 or earlier
|       | (PHPCompatibility.PHP.NewScalarTypeDeclarations)
34 | ERROR | "callable" keyword is not present in PHP version 5.3 or earlier (PHPCompatibility.PHP.NewKeywords.Found)
44 | ERROR | "callable" keyword is not present in PHP version 5.3 or earlier (PHPCompatibility.PHP.NewKeywords.Found)
120 | ERROR | Function array dereferencing is not present in PHP version 5.3 or earlier
     |       | (PHPCompatibility.PHP.NewFunctionArrayDereferencing)

Would the maintainers be interested in a patch that removes callable type-hints and untangles function array dereferencing?

romainneutron commented 7 years ago

Guzzle middleware is only compatible with Guzzle 6, supporting only PHP 5.5. No problem with this code