Use SplObjectStorage::offsetSet() instead of deprecated SplObjectStorage::attach()

This commit is contained in:
Sebastian Bergmann 2025-09-22 07:13:00 +02:00
parent ec175443bf
commit d6ffa41b14
No known key found for this signature in database
GPG Key ID: 4AA394086372C20A
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ class ExporterTest extends TestCase
$obj->self = $obj;
$storage = new SplObjectStorage;
$storage->attach($obj2);
$storage->offsetSet($obj2);
@$storage->foo = $obj2;
$resource = fopen('php://memory', 'r');