woohoolabs / yang

The efficient and elegant, PSR-7 compliant JSON:API 1.1 client library for PHP
MIT License
168 stars 13 forks source link

"make test" fails for fresh clone + composer install #21

Closed holtkamp closed 5 years ago

holtkamp commented 5 years ago

When using PHP 7.3.9 to run:

git clone https://github.com/woohoolabs/yang
cd yang
composer install  //installs PHPUnit 8.3.4
make test

results in the following error:

This version of PHPUnit is supported on PHP 7.2, PHP 7.3, and PHP 7.4.
You are using PHP 7.1.31 (/usr/local/bin/php).

Changing the image in docker-compose.yml to php:7.2-cli or php:7.3-cli resolves this. Not sure whether this is the "best" approach, just wanted to report it 😄

kocsismate commented 5 years ago

Thank you very much for the report! Unfortunately, running composer locally can hide some surprises. :/

I think it's OK to use PHP 7.3 as default because I don't plan to add new functionality in the near future (and I'll raise the minimum required PHP version to 7.4 for the next minor version of Yang).

kocsismate commented 5 years ago

I am closing the issue because I've just committed a fix. :)

holtkamp commented 5 years ago

I think it's OK to use PHP 7.3 as default

Nice, this would also allow us to use object (as introduced in PHP 7.2) as type-hint instead of stdClass 🤓