Problem/Motivation

We are getting PHP 8.5 deprecation warnings for use of SplObjectStorage::contains and SplObjectStorage::attach.

Method SplObjectStorage::attach() is deprecated since 8.5, use method SplObjectStorage::offsetSet() instead in Drupal\graphql\GraphQL\Buffers\BufferBase->resolveBuffer() (line 130 of modules/contrib/graphql/src/GraphQL/Buffers/BufferBase.php).

Deprecated function: Method SplObjectStorage::contains() is deprecated since 8.5, use method SplObjectStorage::offsetExists() instead in Drupal\graphql\GraphQL\Buffers\BufferBase->resolveItem() (line 105 of modules/contrib/graphql/src/GraphQL/Buffers/BufferBase.php).

Steps to reproduce

Proposed resolution

Replace deprecated uses:

  • SplObjectStorage::attach() => SplObjectStorage::offsetSet()
  • SplObjectStorage::contains() => SplObjectStorage::offsetExists()

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork graphql-3578663

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kim.pepper created an issue. See original summary.

kim.pepper’s picture

Status: Active » Needs review

Created MRs for 5.x and 8.x-4.x

  • klausi committed 7067b525 on 5.x authored by kim.pepper
    fix(buffer): SplObjectStorage::contains and ::attach are deprecated in...

klausi made their first commit to this issue’s fork.

  • klausi committed 7fff3ba5 on 8.x-4.x authored by kim.pepper
    fix(buffer): SplObjectStorage::contains and ::attach are deprecated in...
klausi’s picture

Status: Needs review » Fixed

merged, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.