Skip to content

LogDeferredCallbackFailure

github-actions edited this page Mar 26, 2026 · 1 revision

Listener that logs failed deferred callback executions using a PSR-3 compatible logger.

This listener MUST be used to log all deferred callback failures. It SHALL log detailed information about the exception, callback, and arguments. This class MUST NOT throw exceptions during logging.


  • Full name: \FastForward\Defer\EventDispatcher\Listener\LogDeferredCallbackFailure
  • This class is marked as final and can't be subclassed
  • This class is a Final class

Methods

__construct

Constructs a new LogDeferredCallbackFailure listener.

public __construct(\Psr\Log\LoggerInterface $logger): mixed

Parameters:

Parameter Type Description
$logger \Psr\Log\LoggerInterface the PSR-3 logger to use for logging failures

__invoke

Handles the DeferredCallbackFailed event by logging the failure.

public __invoke(\FastForward\Defer\EventDispatcher\Event\DeferredCallbackFailed $event): void

This method MUST log the exception details and callback information. It MUST NOT throw exceptions.

Parameters:

Parameter Type Description
$event \FastForward\Defer\EventDispatcher\Event\DeferredCallbackFailed the event representing the callback failure

Clone this wiki locally