ivome/graphql-relay-php

PHP 8 support

aboks opened this issue · 4 comments

aboks commented

As it is, this library cannot be installed on PHP 8 using Composer. Do you have any plans to add PHP 8 support?

I would be happy to try to create a PR for that, but that probably means I have to raise the minimum supported versions of PHP and webonyx/graphql. Can you indicate what minimum supported versions of those two you would consider acceptable?

ivome commented

I'm happy to merge a PR that adds PHP 8 support. Is it possible to add PHP 8 support that doesn't break backward compatibility?

aboks commented

If you mean 'backward compatibility' as in how the library is used, then probably yes. If you mean it as in which versions of PHP and webonyx/graphql are used, then probably not.

The main problem is testing. It would be possible to just loosen the version constraint in composer.json to allow PHP 8 and hope for the best, but I think it's better if tests can actually verify that the library works correctly. Currently you use PHPUnit ^4.8, but that version has been EOL for 4 years already, and officially does not support PHP 7 nor 8. To be able to test with PHP 8, an upgrade to at least PHPUnit 8 would be needed, which requires PHP 7.2 or higher.

As for webonyx/graphql, currently any version higher than 0.7.0 is allowed. However, webonyx/graphql broke BC somewhere between 0.7.0 and the current version 14.5.1, so that the tests currently fail when performing a clean checkout, composer install and test run. It might be possible to support both 0.y.z and 14.y.z versions at the same time, but I would have to dig a little deeper into the exact BC breaks for that.

ivome commented

That makes sense! I'd say let's raise those versions, add support for PHP 8 and then we can add a test matrix to see how low we can go with the support for the dependencies. I don't think we need webonyx/graphql support as low as 0.7.0 anymore, and people that do need that can just stay on the current version.

ivome commented

Added in v0.6.0