Skip to content

Improved the example to generate URLs in the console #8839

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
Jan 3, 2018

Conversation

javiereguiluz
Copy link
Member

This fixes #8827 and a minor issue (code was tabulated with 3 white spaces).

When merging in 4.0, the code must be tweaked to use $this->router variable instead of $router.

@Starojitski
Copy link

Starojitski commented Dec 6, 2017

Thanks for such a quick action - having the $router variable makes what is going on much clearer!
I have a feeling that generating url in console is often used when sending e-mails. There are two use cases here:

  • Those emails have links for various actions email recipients can perform by clicking on the links within the message body - such as confirm account creation, etc. Your example shows how to generate URL for a named route.
  • Adding images/attachments to the emails. Ideally the examples would also show how to generate url for assets as well. This is what i needed. But I have limited experience with Symfony and quite possible i am barking at the wrong tree here and the solution is very easy or must be found in some other place

@xabbuh xabbuh added this to the 2.7 milestone Jan 3, 2018
@javiereguiluz javiereguiluz merged commit c1fc868 into symfony:2.7 Jan 3, 2018
javiereguiluz added a commit that referenced this pull request Jan 3, 2018
…iereguiluz)

This PR was merged into the 2.7 branch.

Discussion
----------

Improved the example to generate URLs in the console

This fixes #8827 and a minor issue (code was tabulated with 3 white spaces).

When merging in 4.0, the code must be tweaked to use `$this->router` variable instead of `$router`.

Commits
-------

c1fc868 Improved the example to generate URLs in the console
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants