Skip to content

Critical PHP 8.1 deprecation in 3.x Branch #1297

Open
@loopy3025

Description

@loopy3025

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions