Skip to content

Commit b0cf316

Browse files
Remove deprecated calls to deprecated methods of SplObjectStorage
1 parent 307a09d commit b0cf316

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Debug/TraceableEventDispatcher.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ private function preProcess(string $eventName): void
279279
$this->wrappedListeners[$eventName][] = $wrappedListener;
280280
$this->dispatcher->removeListener($eventName, $listener);
281281
$this->dispatcher->addListener($eventName, $wrappedListener, $priority);
282-
$this->callStack->attach($wrappedListener, [$eventName, $this->currentRequestHash]);
282+
$this->callStack[$wrappedListener] = [$eventName, $this->currentRequestHash];
283283
}
284284
}
285285

@@ -303,7 +303,7 @@ private function postProcess(string $eventName): void
303303
if ($listener->wasCalled()) {
304304
$this->logger?->debug('Notified event "{event}" to listener "{listener}".', $context);
305305
} else {
306-
$this->callStack->detach($listener);
306+
unset($this->callStack[$listener]);
307307
}
308308

309309
if (null !== $this->logger && $skipped) {

0 commit comments

Comments
 (0)