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] Add$stamps parameter toHandleTrait::handle#42124

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

Merged

Conversation

alexander-schranz
Copy link
Contributor

@alexander-schranzalexander-schranz commentedJul 15, 2021
edited by OskarStark
Loading

QA
Branch?7.3
Bug fix?no
New feature?yes
Deprecations?no
Tickets--
LicenseMIT
Doc PRTODO

Like theMessageBusInterface::dispatch it would be great to use stamps.

We are using example a custom middleware to control if a flush should be done.

$this->handle(newCreateUserMessage($data), [newDoctrineFlushStamp()]);

Also a custom middleware for locking:

$this->handle(newOurMessage(), [newLockStamp('lock-key',300.0,true)]));

maxperrimond reacted with thumbs up emoji
@carsonbotcarsonbot changed the titleAdd stamps to handle trait[Messenger] Add stamps to handle traitJul 15, 2021
@nicolas-grekasnicolas-grekas added this to the5.4 milestoneJul 15, 2021
@fabpotfabpot modified the milestones:5.4,6.1Nov 3, 2021
@alexander-schranzalexander-schranzforce-pushed thefeature/stamps-to-handletrait branch 2 times, most recently frome37a935 tobdaa434CompareApril 11, 2022 18:25
@alexander-schranzalexander-schranzforce-pushed thefeature/stamps-to-handletrait branch frombdaa434 to436e506CompareMay 19, 2022 16:55
@alexander-schranz
Copy link
ContributorAuthor

I rebased this branch. As I think this is a new feature and we are in RC phase I updated the changelog to 6.2.

@chalasr
Copy link
Member

While having stamps part of thedispatch() signature works (not fond of it personally), I tend to thinkhandle() should rather be free of this concept.
My reasoning is thatHandleTrait is meant to ease implementing regular command/query buses, and doing so would kind of make it deviate from the command bus pattern which aims to be purely about handling domain use cases without leaking any technical detail.
Considering this, and given one can already pass a stamped envelope tohandle() (not fond of it either 😅), I would prefer not to merge this.

@alexander-schranz
Copy link
ContributorAuthor

In our cases it is very important that we are allowed to input stamps. As they control our middlewares. We had very bad experience with "automated" middlewares like DoctrineFlush oder DoctrineTransactionMiddleware and creating for everything seperate message buses was a bad developer experience. So we decided to use stamps for this kind of things so developer had 100% control in the userinterface layer our messages are dispatched how the message is handled by the middlewares. And I don't see much which speak against it as it is still optional and if somebody don't want to use it they don't need it.

@fabpotfabpot modified the milestones:6.1,6.2May 20, 2022
@nicolas-grekasnicolas-grekas modified the milestones:6.2,6.3Nov 5, 2022
@nicolas-grekasnicolas-grekas modified the milestones:6.3,6.4May 23, 2023
@nicolas-grekasnicolas-grekas modified the milestones:6.4,7.1Nov 15, 2023
@xabbuhxabbuh modified the milestones:7.1,7.2May 15, 2024
@fabpotfabpot modified the milestones:7.2,7.3Nov 20, 2024
@alexander-schranz
Copy link
ContributorAuthor

alexander-schranz commentedDec 13, 2024
edited
Loading

Is there any chance to rediscuss this? We are using Stamps not only for Doctrine Flush but also forLock Mechanic:

newYourMessage(), [newLockStamp('lock-key',300.0,true)])

@alexander-schranzalexander-schranzforce-pushed thefeature/stamps-to-handletrait branch 2 times, most recently from2f044ea toa652612CompareDecember 13, 2024 13:49
Copy link
Member

@chalasrchalasr left a comment

Choose a reason for hiding this comment

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

Works for me, thanks for clarifying.

@alexander-schranz
Copy link
ContributorAuthor

alexander-schranz commentedJan 6, 2025
edited
Loading

just rebased, fabbot unrelated:#42124 (comment)

@alexander-schranzalexander-schranzforce-pushed thefeature/stamps-to-handletrait branch froma61a656 to9d69f84CompareMarch 10, 2025 10:56
@OskarStarkOskarStark changed the title[Messenger] Add stamps to handle trait[Messenger] Add$stamps parameter toHandleTrait::handleMar 10, 2025
@alexander-schranz
Copy link
ContributorAuthor

Something I can do to push this over the line :)

@alexander-schranzalexander-schranzforce-pushed thefeature/stamps-to-handletrait branch fromc3237a6 tocb10d2eCompareMarch 29, 2025 14:01
Co-authored-by: Oskar Stark <oskarstark@googlemail.com>
@chalasrchalasrforce-pushed thefeature/stamps-to-handletrait branch from7834310 to1742f67CompareMarch 29, 2025 14:45
@chalasr
Copy link
Member

Thank you@alexander-schranz.

alexander-schranz reacted with hooray emoji

@chalasrchalasr merged commitc6baf1b intosymfony:7.3Mar 29, 2025
4 of 10 checks passed
@alexander-schranzalexander-schranz deleted the feature/stamps-to-handletrait branchMarch 29, 2025 14:57
@fabpotfabpot mentioned this pull requestMay 2, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@OskarStarkOskarStarkOskarStark left review comments

@chalasrchalasrchalasr approved these changes

@fabpotfabpotfabpot approved these changes

@srozesrozeAwaiting requested review from sroze

Assignees
No one assigned
Projects
None yet
Milestone
7.3
Development

Successfully merging this pull request may close these issues.

7 participants
@alexander-schranz@chalasr@fabpot@OskarStark@nicolas-grekas@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp