Skip to content

Commit

Permalink
Merge pull request #1364 from zavitkov/zavitkov/feature/fix-sf7-depre…
Browse files Browse the repository at this point in the history
…cations

SF7 deprecations fix
  • Loading branch information
makasim authored Nov 18, 2024
2 parents 8179bb9 + 60ff029 commit bbbc4c0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 19 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"require-dev": {
"ext-pcntl": "*",
"phpunit/phpunit": "^9.5",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan": "^1.0",
"queue-interop/queue-spec": "^0.6.2",
"symfony/browser-kit": "^6.2|^7.0",
"symfony/config": "^6.2|^7.0",
Expand All @@ -60,9 +60,9 @@
"symfony/dependency-injection": "^6.2|^7.0",
"symfony/event-dispatcher": "^6.2|^7.0",
"symfony/expression-language": "^6.2|^7.0",
"symfony/http-kernel": "^^6.2|^7.0",
"symfony/http-kernel": "^6.2|^7.0",
"symfony/filesystem": "^6.2|^7.0",
"symfony/framework-bundle": "^^6.2|^7.0",
"symfony/framework-bundle": "^6.2|^7.0",
"symfony/validator": "^6.2|^7.0",
"symfony/yaml": "^6.2|^7.0",
"empi89/php-amqp-stubs": "*@dev",
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parameters:
excludes_analyse:
excludePaths:
- docs
- bin
- docker
Expand Down
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 pkg/enqueue-bundle/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 pkg/enqueue-bundle/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
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
use Enqueue\Test\ClassExtensionTrait;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

class EnqueueExtensionTest extends TestCase
{
use ClassExtensionTrait;

public function testShouldImplementConfigurationInterface()
{
self::assertClassExtends(Extension::class, EnqueueExtension::class);
$this->assertClassExtends(Extension::class, EnqueueExtension::class);
}

public function testShouldBeFinal()
{
self::assertClassFinal(EnqueueExtension::class);
$this->assertClassFinal(EnqueueExtension::class);
}

public function testCouldBeConstructedWithoutAnyArguments()
Expand Down

0 comments on commit bbbc4c0

Please sign in to comment.