Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Messenger] DeprecateHandleTrait in favor of a newSingleHandlingTrait#52952

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

@MatTheCat
Copy link
Contributor

@MatTheCatMatTheCat commentedDec 8, 2023
edited
Loading

QA
Branch?7.1
Bug fix?no
New feature?yes
Deprecations?yes
IssuesFix#52300
LicenseMIT

In competition with#52949

When usingtheHandleTrait, theHandlerFailedException just adds noise as the wrapped exception is the one we would expect to be thrown.

This PR aims to replace theHandleTrait by a newSingleHandlingTrait, the latter throwing any single exception wrapped in aHandlerFailedException. In addition, it checks for a single handler even if one failed.

@carsonbotcarsonbot added this to the7.1 milestoneDec 8, 2023
@MatTheCatMatTheCat changed the title[Messenger] DeprecateHandleTrait in favor of the newSingleHandlingTrait[Messenger] DeprecateHandleTrait in favor of a newSingleHandlingTraitDec 8, 2023
@MatTheCatMatTheCatforce-pushed thesingle_handling_trait branch 5 times, most recently fromb587f76 to48a75e3CompareDecember 9, 2023 11:18
/**
* Dispatches the given message, expecting to be handled by a single handler
* and returns the result from the handler returned value.
* This behavior is useful for both synchronous command & query buses,
Copy link
Contributor

@ro0NLro0NLDec 11, 2023
edited
Loading

Choose a reason for hiding this comment

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

fact is we're querying for a value, hence i prefer namingQueryBusTrait::query, but not a blocker :)

Copy link
ContributorAuthor

@MatTheCatMatTheCatDec 21, 2023
edited
Loading

Choose a reason for hiding this comment

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

I don’t want this trait’s name to imply a single use-case as there can be many (a command bus returning IDs e.g.).

EDIT: heh, just found#29167 (comment) 😁

@chalasr
Copy link
Member

The value brought by this change doesn't seem worth the cost of deprecating HandleTrait entirely to me. Also the nameSingleHandlingTrait doesn't convey the fact it's about synchronous handling.
All in all, I feel like this is not the right approach to solve the issue at hand - IMHO either we address it inHandleTrait with BC preserved or we need to look at the middleware alternative instead

@MatTheCat
Copy link
ContributorAuthor

Changing for a more explicit name and handling exceptions correctly felt enough for me, but will close then.

@MatTheCatMatTheCat deleted the single_handling_trait branchFebruary 2, 2024 18:34
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@ro0NLro0NLro0NL left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

7.1

Development

Successfully merging this pull request may close these issues.

[Messenger] MakeHandleTrait unwrapHandlerFailedException

4 participants

@MatTheCat@chalasr@ro0NL@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp