6161use function is_object ;
6262use function is_scalar ;
6363use function is_string ;
64- use function spl_object_hash ;
64+ use function spl_object_id ;
6565use function sprintf ;
6666use function strpos ;
6767use function strtolower ;
@@ -136,15 +136,15 @@ public function __construct(
136136 $ this ->bucket = $ dm ->getDocumentBucket ($ class ->name );
137137 }
138138
139- /** @return array<string , object> */
139+ /** @return array<int , object> */
140140 public function getInserts (): array
141141 {
142142 return $ this ->queuedInserts ;
143143 }
144144
145145 public function isQueuedForInsert (object $ document ): bool
146146 {
147- return isset ($ this ->queuedInserts [spl_object_hash ($ document )]);
147+ return isset ($ this ->queuedInserts [spl_object_id ($ document )]);
148148 }
149149
150150 /**
@@ -153,7 +153,7 @@ public function isQueuedForInsert(object $document): bool
153153 */
154154 public function addInsert (object $ document ): void
155155 {
156- $ this ->queuedInserts [spl_object_hash ($ document )] = $ document ;
156+ $ this ->queuedInserts [spl_object_id ($ document )] = $ document ;
157157 }
158158
159159 /** @return array<string, object> */
@@ -164,7 +164,7 @@ public function getUpserts(): array
164164
165165 public function isQueuedForUpsert (object $ document ): bool
166166 {
167- return isset ($ this ->queuedUpserts [spl_object_hash ($ document )]);
167+ return isset ($ this ->queuedUpserts [spl_object_id ($ document )]);
168168 }
169169
170170 /**
@@ -173,7 +173,7 @@ public function isQueuedForUpsert(object $document): bool
173173 */
174174 public function addUpsert (object $ document ): void
175175 {
176- $ this ->queuedUpserts [spl_object_hash ($ document )] = $ document ;
176+ $ this ->queuedUpserts [spl_object_id ($ document )] = $ document ;
177177 }
178178
179179 /**
0 commit comments