CircleOfNice / DoctrineRestDriver

GNU General Public License v3.0
153 stars 44 forks source link

Usage of PHP 5.6 constant ARRAY_FILTER_USE_KEY #14

Closed JMLamodiere closed 8 years ago

JMLamodiere commented 8 years ago

What is this feature about (expected vs actual behaviour)?

According to composer.json, this library requires php >=5.5. But the class Circle\DoctrineRestDriver\Types\CurlOptions uses the constant ARRAY_FILTER_USE_KEY. It exists since PHP 5.6, according to array_filter doc.

We must either find a workaround for PHP 5.5, or change minimal version in composer.json. PHP 5.5 security support ends in 3 months, but is still widely used. I suggest the 5.5 workaround.

How can I reproduce it?

Launch the unit tests with PHP 5.5.

Does it take minutes, hours or days to fix?

Minutes

Any additional information?

I can handle the PR if needed :)

TobiasHauck commented 8 years ago

First of all thanks for the detailed information, especially the links. Maybe we should try to find an elegant solution without ARRAY_FILTER_USE_KEY (only array functions , no usage of foreach). If that's possible let's stay with PHP 5.5 regarding your arguments.

Would be great if you handled the PR ;) Thanks again!