8000 [Messenger] Backport type fixes by derrabus · Pull Request #43196 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Messenger] Backport type fixes #43196

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

Merged
merged 1 commit into from
Sep 27, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
final class AmazonSqsFifoStamp implements NonSendableStampInterface
{
private $messageGroupId;

private $messageDeduplicationId;

public function __construct(string $messageGroupId = null, string $messageDeduplicationId = null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public function get(): ?array
}

/**
* @return array[]
* @return \Generator<int, array>
*/
private function getNextMessages(): \Generator
{
Expand All @@ -195,7 +195,7 @@ private function getNextMessages(): \Generator
}

/**
* @return array[]
* @return \Generator<int, array>
*/
private function getPendingMessages(): \Generator
{
Expand All @@ -205,7 +205,7 @@ private function getPendingMessages(): \Generator
}

/**
* @return array[]
* @return \Generator<int, array>
*/
private function getNewMessages(): \Generator
{
Expand Down
3 changes: 3 additions & 0 deletions src/Symfony/Component/Messenger/Envelope.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
*/
final class Envelope
{
/**
* @var array<string, list<StampInterface>>
*/
private $stamps = [];
private $message;

Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Messenger/MessageBus.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class MessageBus implements MessageBusInterface
private $middlewareAggregate;

/**
* @param MiddlewareInterface[]|iterable $middlewareHandlers
* @param iterable<mixed, MiddlewareInterface> $middlewareHandlers
*/
public function __construct(iterable $middlewareHandlers = [])
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class StackMiddleware implements MiddlewareInterface, StackInterface
private $offset = 0;

/**
* @param iterable|MiddlewareInterface[]|MiddlewareInterface|null $middlewareIterator
* @param iterable<mixed, MiddlewareInterface>|MiddlewareInterface|null $middlewareIterator
*/
public function __construct($middlewareIterator = null)
{
Expand Down
4 changes: 3 additions & 1 deletion src/Symfony/Component/Messenger/Tests/HandleTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ class TestQueryBus

public function __construct(?MessageBusInterface $messageBus)
{
$this->messageBus = $messageBus;
if ($messageBus) {
$this->messageBus = $messageBus;
}
}

public function query($query): string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class TransportFactory implements TransportFactoryInterface
private $factories;

/**
* @param iterable|TransportFactoryInterface[] $factories
* @param iterable<mixed, TransportFactoryInterface> $factories
*/
public function __construct(iterable $factories)
{
Expand Down
0