blackfireio / php-sdk

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

PHP 5.6 compatibility [phpunit] #37

Closed WissemShili closed 6 years ago

WissemShili commented 6 years ago

Environement : Unit Tests in Symfony 3.0 + PHP 5.6

After following the official Blackfire phpunit documentation for setting up environment and writing a test, running a unit test using phpunit will cause an error.

php-sdk/src/Blackfire/Bridge/PhpUnit/TestConstraint.php Line 69 (PHP_VERSION_ID > 70100) returns false so normally we will not use code inside that block but that code is not compatible with PHP 5 and always causes ERROR when parsing the TestConstraint.php file.