Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
php-version: ['8.2', '8.3', '8.4', '8.5']
symfony-version: ['6.4', '7.4']
symfony-version: ['6.4', '7.4', '8.0']
coverage: ['none']
include:
- php-version: '8.3'
Expand Down
10 changes: 5 additions & 5 deletions DataCollector/MessageDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct($channels)
$this->data = [];
}

public function collect(Request $request, Response $response, ?\Throwable $exception = null)
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
{
foreach ($this->channels as $channel) {
foreach ($channel->getBasicPublishLog() as $log) {
Expand All @@ -30,22 +30,22 @@ public function collect(Request $request, Response $response, ?\Throwable $excep
}
}

public function getName()
public function getName(): string
{
return 'rabbit_mq';
}

public function getPublishedMessagesCount()
public function getPublishedMessagesCount(): int
{
return count($this->data);
}

public function getPublishedMessagesLog()
public function getPublishedMessagesLog(): array
{
return $this->data;
}

public function reset()
public function reset(): void
{
$this->data = [];
}
Expand Down
16 changes: 14 additions & 2 deletions Tests/Command/SetupFabricCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ public function testExecute(): void
$command->setContainer($container);

// TODO: Use addCommand() once Symfony Support for < 7.4 is dropped
$application->add($command);
// TODO: Use addCommand() once Symfony Support for < 7.4 is dropped
if (method_exists($application, 'addCommand')) {
$application->addCommand($command);
} else {
// @phpstan-ignore-next-line
$application->add($command);
}

$registeredCommand = $application->find('rabbitmq:setup-fabric');

Expand Down Expand Up @@ -102,7 +108,13 @@ public function testExecute_withSkipAnonConsumers(): void
$command->setContainer($container);

// TODO: Use addCommand() once Symfony Support for < 7.4 is dropped
$application->add($command);
// TODO: Use addCommand() once Symfony Support for < 7.4 is dropped
if (method_exists($application, 'addCommand')) {
$application->addCommand($command);
} else {
// @phpstan-ignore-next-line
$application->add($command);
}

$registeredCommand = $application->find('rabbitmq:setup-fabric');

Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
"name" : "Alvaro Videla"
}],
"require": {
"php": "^8.2",
"symfony/dependency-injection": "^6.0 || ^7.0",
"symfony/event-dispatcher": "^6.0 || ^7.0",
"symfony/config": "^6.0 || ^7.0",
"symfony/yaml": "^6.0 || ^7.0",
"symfony/console": "^6.0 || ^7.0",
"php": "^8.4",
"symfony/dependency-injection": "^6.0 || ^7.0 || ^8.0",
"symfony/event-dispatcher": "^6.0 || ^7.0 || ^8.0",
"symfony/config": "^6.0 || ^7.0 || ^8.0",
"symfony/yaml": "^6.0 || ^7.0 || ^8.0",
"symfony/console": "^6.0 || ^7.0 || ^8.0",
"php-amqplib/php-amqplib": "^2.12.2 || ^3.0",
"psr/log": "^2.0 || ^3.0",
"symfony/http-kernel": "^6.0 || ^7.0",
"symfony/framework-bundle": "^6.0 || ^7.0"
"symfony/http-kernel": "^6.0 || ^7.0 || ^8.0",
"symfony/framework-bundle": "^6.0 || ^7.0 || ^8.0"
},
"require-dev": {
"symfony/serializer": "^6.0 || ^7.0",
"symfony/serializer": "^6.0 || ^7.0 || ^8.0",
"phpunit/phpunit": "^9.5",
"phpstan/phpstan": "^1.2",
"phpstan/phpstan-phpunit": "^1.0"
Expand Down