Skip to content

Commit

Permalink
fix deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
zavitkov committed Nov 18, 2024
1 parent 5d29767 commit b8c8179
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion DependencyInjection/EnqueueExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

final class EnqueueExtension extends Extension implements PrependExtensionInterface
{
Expand Down
10 changes: 1 addition & 9 deletions Profiler/AbstractMessageQueueCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,19 @@ public function prettyPrintPriority($priority)
}

/**
* @param mixed $body
*
* @return string
*/
public function ensureString($body)
{
return is_string($body) ? $body : JSON::encode($body);
}

/**
* {@inheritdoc}
*/
public function getName(): string
{
return 'enqueue.message_queue';
}

/**
* {@inheritdoc}
*/
public function reset()
public function reset(): void
{
$this->data = [];
}
Expand Down
3 changes: 1 addition & 2 deletions Profiler/MessageQueueCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Throwable;

class MessageQueueCollector extends AbstractMessageQueueCollector
{
public function collect(Request $request, Response $response, Throwable $exception = null)
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
{
$this->collectInternal($request, $response);
}
Expand Down

0 comments on commit b8c8179

Please sign in to comment.