Unregister/cleanup handler on destroy (#778)

Co-authored-by: pascal.heidmann <pascal.heidmann@check24.de>
This commit is contained in:
Pascal Heidmann
2025-06-11 22:42:19 +02:00
committed by GitHub
parent 8fcc6a862f
commit 89dabca149
+6 -1
View File
@@ -87,6 +87,11 @@ final class Run implements RunInterface
$this->inspectorFactory = new InspectorFactory();
}
public function __destruct()
{
$this->unregister();
}
/**
* Explicitly request your handler runs as the last of all currently registered handlers.
*
@@ -531,7 +536,7 @@ final class Run implements RunInterface
{
if (!is_callable($filterCallback)) {
throw new \InvalidArgumentException(sprintf(
"A frame filter must be of type callable, %s type given.",
"A frame filter must be of type callable, %s type given.",
gettype($filterCallback)
));
}