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 documentation for RouterContextMiddleware#14969

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
javiereguiluz merged 1 commit intosymfony:5.xfromjderusse:fix-14952
Feb 16, 2021

Conversation

@jderusse
Copy link
Member

fixes#14952

@OskarStark
Copy link
Contributor

Nice feature, thanks, can you add a short example on how to get this info/context in the message handler? Thanks 😃

@jderusse
Copy link
MemberAuthor

jderusse commentedFeb 13, 2021
edited by javiereguiluz
Loading

can you add a short example on how to get this info/context in the message handler

Hmm... This is not aimed to be used by the message handler, and I don't have any use-case for this.

The purpose of this feature is to makeUrlGenerator working out of the box, without providingasset.request_context parameters

$this->urlGenerator->generate('route', [], UrlGeneratorInterface::ABSOLUTE_URL);// before: http://localhost/my_route// after: https://my-real-domain:81/my_route

@OskarStark
Copy link
Contributor

Ah so you don't care about it directly, and just use the urGenerator which takes the provided request context into account?

@jderusse
Copy link
MemberAuthor

jderusse commentedFeb 13, 2021
edited
Loading

Ah so you don't care about it directly, and just use the urGenerator which takes the provided request context into account?

yes, exactly. Main use case: Generating an email with link to your application, and the template is rendered by the consumer (themessage contains only the template + few parameters)

OskarStark reacted with thumbs up emoji

@carsonbotcarsonbot changed the titleAdd documentation for RouterContextMiddleware[Messenger] Add documentation for RouterContextMiddlewareFeb 16, 2021
@javiereguiluzjaviereguiluz merged commit7aad004 intosymfony:5.xFeb 16, 2021
@javiereguiluz
Copy link
Member

Jérémy thanks a lot for providing these docs. While merging we did some rewording in the explanation, but we left the essence of your contribution intact. Thanks!

@xabbuhxabbuh added this to the5.3 milestoneFeb 17, 2021
wouterj added a commit that referenced this pull requestJan 16, 2022
This PR was submitted for the 5.4 branch but it was squashed and merged into the 4.4 branch instead.Discussion----------[Messenger] Document the validation middlewareClose#10474I took inspiration on the dochttps://symfonycasts.com/screencast/messenger/other-middleware#validation-doctrine-transaction-etc-middlewareReference this doc#14969 so I added next to itCommits-------0fc886d [Messenger] Document the validation middleware
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

5.3

Development

Successfully merging this pull request may close these issues.

[FrameworkBundle][Messenger] Added RouterContextMiddleware

5 participants

@jderusse@OskarStark@javiereguiluz@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp