Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SF7 deprecations fix #1364

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading