Issue Task Resolved

#111311Use spl_object_id() for ObjectStorage keys

Wouter Wolters 11/01/26, 13:15 updated 11/02/26, 06:15

Description

PHP 8.6 deprecates spl_object_hash(). Use object IDs for storage and
relation-tracking keys while keeping key() declared to return string.
Its opaque value changes from a hexadecimal hash to a decimal ID.
Positional access continues to resolve through array_values().

Update the serialization paths added on main since patch set 1. Save
objects as a plain list and rebuild their storage and tracking keys on
restoration, since object IDs are local to the current process.

Tests cover string iterator keys, distinct object identities, restored
information and positions, detach behavior and dirty relation tracking.

Reviews 3

History 27

  1. Stefan Bürk commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-11-01T21:15:16+00:00" > 11/01/26, 21:15 </span>

    Applied in changeset commit:997e2321a16618d80be48df12d13819a9b04d0a9.

  2. Gerrit Code Review pushed patch set 2 for 13.4 to change 97289 status Resolved Under Review <span data-processor="relativetime" data-value="2026-11-01T21:36:39+00:00" > 11/01/26, 21:36 </span>

  3. Stefan Bürk commented and changed status Under Review Resolved <span data-processor="relativetime" data-value="2026-11-02T06:15:17+00:00" > 11/02/26, 06:15 </span>

    Applied in changeset commit:a0c18638cac1336391cbab196ee0fa55dd7cd13a.