for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Spiral\Queue\Interceptor\Consume;
use Spiral\Core\CoreInterceptorInterface as LegacyInterceptor;
use Spiral\Core\CoreInterface;
use Spiral\Interceptors\Context\CallContextInterface;
use Spiral\Interceptors\HandlerInterface;
use Spiral\Interceptors\InterceptorInterface;
use Spiral\Queue\Exception\StateException;
use Spiral\Queue\Failed\FailedJobHandlerInterface;
final class ErrorHandlerInterceptor implements LegacyInterceptor, InterceptorInterface
Spiral\Core\CoreInterceptorInterface
If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated annotation
ignore-deprecated
final class ErrorHandlerInterceptor implements /** @scrutinizer ignore-deprecated */ LegacyInterceptor, InterceptorInterface
This interface has been deprecated. The supplier of the interface has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the interface will be removed and what other interface to use instead.
{
public function __construct(
private readonly FailedJobHandlerInterface $handler
) {
}
/** @psalm-suppress ParamNameMismatch */
public function process(string $name, string $action, array $parameters, CoreInterface $core): mixed
try {
return $core->callAction($name, $action, $parameters);
} catch (\Throwable $e) {
if (!$e instanceof StateException) {
$this->handler->handle(
$parameters['driver'],
$parameters['queue'],
$name,
$parameters['payload'],
$e
);
throw $e;
public function intercept(CallContextInterface $context, HandlerInterface $handler): mixed
return $handler->handle($context);
$args = $context->getArguments();
$args['driver'],
$args['queue'],
$context->getTarget()->getPath()[0],
$args['payload'],
$e,
This interface has been deprecated. The supplier of the interface has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the interface will be removed and what other interface to use instead.