Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Critical PHP 8.1 deprecation in 3.x Branch #1297

Open
loopy3025 opened this issue Aug 10, 2022 · 2 comments
Open

Critical PHP 8.1 deprecation in 3.x Branch #1297

loopy3025 opened this issue Aug 10, 2022 · 2 comments

Comments

@loopy3025
Copy link

loopy3025 commented Aug 10, 2022

Upon upgrade to PHP 8, we have found that we are getting a deprecated function error on many different elements. Here is just one example:

Deprecated function: Return type of Drupal\graphql\Plugin\TypePluginManagerAggregator::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 5 of modules/contrib/graphql/src/Plugin/TypePluginManagerAggregator.php).

The solution for this seems to be to upgrade webonyx/graphql-php to a version that includes the various php 8.1 compatibility fixes. It seems that the version has been upgraded in drupal/graphql 4.x but there is zero way that we have the time and resources to switch to drupal/graphql 4.x. We have to stay on 3.x due to the huge differences between the two versions.

What we need is a new release for 3.x with the webonyx/graphql-php version upgraded to ^14.8.0. With the issue page having disappeared from drupal.org I'm a bit dubious as to how I can go about contributing to this and testing this.

@ayalon
Copy link

ayalon commented Dec 5, 2022

If you need a schema generator for GraphQL 4 that support almost all features of GraphQL3, have a look at our new module here:
https://www.drupal.org/project/graphql_core_schema/

The generated schema is not 100% compliant, but should support all fields and entities we had in GraphQL 3.

@Oleksii909
Copy link

I have tried to use this module https://www.drupal.org/project/graphql_core_schema/ But I am getting an error in the drupal log. So I created the issue: https://www.drupal.org/project/graphql_core_schema/issues/3329691 .
I Hope that it could be solved by maintainers.
Otherwise, I think that we need is a new release for 3.x with the webonyx/graphql-php version upgraded to ^14.8.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants