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] Proposal: Alternative for the Stack#31185

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
volkyeth wants to merge1 commit intosymfony:masterfromvolkyeth:feature/messenger-remove-stack
Closed

[Messenger] Proposal: Alternative for the Stack#31185

volkyeth wants to merge1 commit intosymfony:masterfromvolkyeth:feature/messenger-remove-stack

Conversation

@volkyeth
Copy link

Draft proposal for replacing the StackInterface

Follow up on#31179


public function handle(Envelope $envelope) : Envelope
{
return $this->currentMiddleware->handle($envelope, $this->nextHandler);
Copy link
Member

@nicolas-grekasnicolas-grekasApr 19, 2019
edited
Loading

Choose a reason for hiding this comment

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

this is what the current code avoids: this method now becomes a mandatory indirection point between all middleware frames.

@nicolas-grekas
Copy link
Member

There is another alternative: stop passing $next or $stack as argument to handle() and turn middleware into dispatcher decorators:

interface MiddlewareInterfaceextends MessageBusInterface{/** @return static */publicfunctionwithNextBus(MessageBusInterface$next):MiddlewareInterface;}

then, a middleware would do:$this->next->dispatch($envelope);

@stof
Copy link
Member

I think this would be harder to understand here

Simperfit reacted with thumbs up emoji

@nicolas-grekasnicolas-grekas added this to thenext milestoneApr 23, 2019
nicolas-grekas added a commit that referenced this pull requestApr 26, 2019
…are stack (nicolas-grekas)This PR was merged into the 4.3-dev branch.Discussion----------[Messenger] ease testing and allow forking the middleware stack| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#31179| License       | MIT| Doc PR        | -A less radical alternative than#31185 that preserves laziness and addresses the linked issue.Commits-------3bdf4b0 [Messenger] ease testing and allow forking the middleware stack
@volkyethvolkyeth deleted the feature/messenger-remove-stack branchApril 26, 2019 10:58
@nicolas-grekasnicolas-grekas modified the milestones:next,4.3Apr 30, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

4 participants

@volkyeth@nicolas-grekas@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp