Is there any way of configuring a php project so that its phpunit test cases can be executed on (PHP 5.3), PHP 5.4, PHP 5.5, PHP 5.6 and PHP 7?
I came across this issue, when I've set the phpunit require-dev dependency in my project to 5.4, while I configured travis to test the project for PHP 5.4, PHP 5.5, PHP 5.6 and PHP 7 and then realized it is failing because phpunit 5.4 only works from PHP 5.6 and PHP 7. But phpunit 4.8 doesn't work for PHP 7. Setting the dependency to *
doesn't help, since phpunit 5.4 uses namespaces and phpunit 4.8 the underscore names.
Is there any way of configuring a project, so that I can run the phpunit tests on all the version (PHP 5.3), PHP 5.4, PHP 5.5, PHP 5.6 and PHP 7 from the same code-base? (Namespaces where introduced in 5.3.0.)
Aucun commentaire:
Enregistrer un commentaire