8000 [Messenger] Fix WrappedExceptionsTrait by chalasr · Pull Request #51801 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Messenger] Fix WrappedExceptionsTrait #51801

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
Oct 2, 2023
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
8000
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class DelayedMessageHandlingException extends RuntimeException implements Wrappe
{
use WrappedExceptionsTrait;

private array $exceptions;
private Envelope $envelope;

public function __construct(array $exceptions, Envelope $envelope)
Expand Down Expand Up @@ -51,7 +50,7 @@ public function __construct(array $exceptions, Envelope $envelope)
*/
public function getExceptions(): array
{
trigger_deprecation('symfony/messenger', '6.4', 'The "%s()" method is deprecated, use "%s::getWrappedExceptions" instead.', __METHOD__, self::class);
trigger_deprecation('symfony/messenger', '6.4', 'The "%s()" method is deprecated, use "%s::getWrappedExceptions()" instead.', __METHOD__, self::class);

return $this->exceptions;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class HandlerFailedException extends RuntimeException implements WrappedExceptio
{
use WrappedExceptionsTrait;

private array $exceptions;
private Envelope $envelope;

/**
Expand Down Expand Up @@ -54,7 +53,7 @@ public function getEnvelope(): Envelope
*/
public function getNestedExceptions(): array
{
trigger_deprecation('symfony/messenger', '6.4', 'The "%s()" method is deprecated, use "%s::getWrappedExceptions" instead.', __METHOD__, self::class);
trigger_deprecation('symfony/messenger', '6.4', 'The "%s()" method is deprecated, use "%s::getWrappedExceptions()" instead.', __METHOD__, self::class);

return $this->exceptions;
}
Expand All @@ -64,7 +63,7 @@ public function getNestedExceptions(): array
*/
public function getNestedExceptionOfClass(string $exceptionClassName): array
{
trigger_deprecation('symfony/messenger', '6.4', 'The "%s()" method is deprecated, use "%s::getWrappedExceptions" instead.', __METHOD__, self::class);
trigger_deprecation('symfony/messenger', '6.4', 'The "%s()" method is deprecated, use "%s::getWrappedExceptions()" instead.', __METHOD__, self::class);

return array_values(
array_filter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/
trait WrappedExceptionsTrait
{
private array $exceptions;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of assuming that the property exists on use-ing classes


/**
* @return \Throwable[]
*/
Expand Down
0