InterNations / http-mock

Mock HTTP requests on the server side in your PHP unit tests
http://www.internations.org
MIT License
391 stars 62 forks source link

Make sure latest version works on both PHP 5.6 and 7 #42

Closed ademarco closed 6 years ago

ademarco commented 6 years ago

This is a test PR to assess if PHP 7 is actually a required dependency or if the project can work on PHP 5.6 too.

ademarco commented 6 years ago

@lstrojny this PR fixes tests allowing the latest version of the library to run on both PHP 7 and 5.6.

lstrojny commented 6 years ago

I would prefer not to go back to PHPUnit 5 but instead have a test suite that works with both 5 and 6, which should be relatively trivial. That way we can have both: 5.6 compatibility on the one hand but support for PHPUnit 6 as well.

ademarco commented 6 years ago

The problem is that PHPUnit 6 requires PHP 7, so we don't have much choice if we want to support both 5.6 and 7 at the same time than to rollback to PHPUnit 5.

lstrojny commented 6 years ago

@ademarco what about requiring "5|6" and having a tiny compatibility layer?

ademarco commented 6 years ago

Yep, that can be interesting, I'll try that!

ademarco commented 6 years ago

There we go! \cc @lstrojny

ademarco commented 6 years ago

@lstrojny Ok tests are back and now we use phpunit 6 on php 7 and phpunit 5.7 on php 5.6.

lstrojny commented 6 years ago

Thank you!

ademarco commented 6 years ago

Great, thanks!