Skip to content

Commit ab26a02

Browse files
author
Oleg Namaka
committed
Connection::ack cannot return a bool, it breaks the tests "TypeError: Symfony\Component\Messenger\Bridge\Amqp\Transport\Connection::ack(): Return value must be of type bool, null returned"
1 parent 9e82776 commit ab26a02

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Symfony/Component/Messenger/Bridge/Amqp/Transport/Connection.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,14 +277,14 @@ private static function validateOptions(array $options): void
277277
}
278278

279279
if (0 < \count($deprecatedQueueOptions = array_intersect(array_keys($queue), self::DEPRECATED_BINDING_KEYS))) {
280-
trigger_deprecation('symfony/messenger', '6.3', 'Deprecated queue option(s) "%s" passed to the AMQP Messenger transport. The "%s" option(s) should be used rather than "%s".', implode('", "', $deprecatedQueueOptions), implode('", ', self::NEW_QUEUE_OPTIONS), implode('", ', self::DEPRECATED_BINDING_KEYS));
280+
trigger_deprecation('symfony/messenger', '5.10', 'Deprecated queue option(s) "%s" passed to the AMQP Messenger transport. The "%s" option(s) should be used rather than "%s".', implode('", "', $deprecatedQueueOptions), implode('", ', self::NEW_QUEUE_OPTIONS), implode('", ', self::DEPRECATED_BINDING_KEYS));
281281
if (0 < \count($newQueueOptions = array_intersect(array_keys($queue), self::NEW_QUEUE_OPTIONS))) {
282282
throw new LogicException(sprintf('New "%s" and deprecated "%s" option(s) passed to the AMQP Messenger transport', implode('", "', $newQueueOptions), implode('", "', $deprecatedQueueOptions)));
283283
}
284284
}
285285

286286
if (0 < \count($invalidQueueOptions = array_diff(array_keys($queue), self::AVAILABLE_QUEUE_OPTIONS, self::NEW_QUEUE_OPTIONS, self::DEPRECATED_BINDING_KEYS))) {
287-
trigger_deprecation('symfony/messenger', '5.1', 'Invalid queue option(s) "%s" passed to the AMQP Messenger transport. Passing invalid queue options is deprecated.', implode('", "', $invalidQueueOptions));
287+
trigger_deprecation('symfony/messenger', '5.10', 'Invalid queue option(s) "%s" passed to the AMQP Messenger transport. Passing invalid queue options is deprecated.', implode('", "', $invalidQueueOptions));
288288
}
289289

290290
if (\is_array($queue['bindings'] ?? false)) {
@@ -508,9 +508,9 @@ public function pull(string $queueName, ?callable $callback): void
508508
$this->queue($queueName)->consume($callback);
509509
}
510510

511-
public function ack(\AMQPEnvelope $message, string $queueName, int $flags = \AMQP_NOPARAM): bool
511+
public function ack(\AMQPEnvelope $message, string $queueName, int $flags = \AMQP_NOPARAM)
512512
{
513-
return $this->queue($queueName)->ack($message->getDeliveryTag(), $flags);
513+
$this->queue($queueName)->ack($message->getDeliveryTag(), $flags);
514514
}
515515

516516
public function nack(\AMQPEnvelope $message, string $queueName, int $flags = \AMQP_NOPARAM): bool

0 commit comments

Comments
 (0)