-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Added app.token to the list of global variables #7191
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@javiereguiluz thanks for documenting this feature! For your point 2, both are used :) The one from the framework bundle is used in php templates. So maybe I should have added it there too... |
I like adding the explanations. But I think we should merge them into the |
fabpot
added a commit
to symfony/symfony
that referenced
this pull request
Dec 13, 2016
…eahDude) This PR was merged into the 3.3-dev branch. Discussion ---------- [FrameworkBundle] Added GlobalVariables::getToken() | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/symfony-docs#7191 comments | License | MIT | Doc PR | symfony/symfony-docs#7191 I propose this feature as bug fix in 3.2, since I don't use the PHP templating I forgot to add the method in the `FrameworkBundle`, to keep it align with the `TwigBridge` in #19991. Is this acceptable or should it go in master? Commits ------- 099b848 Added GlobalVariables::getToken()
symfony-splitter
pushed a commit
to symfony/framework-bundle
that referenced
this pull request
Dec 13, 2016
…eahDude) This PR was merged into the 3.3-dev branch. Discussion ---------- [FrameworkBundle] Added GlobalVariables::getToken() | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/symfony-docs#7191 comments | License | MIT | Doc PR | symfony/symfony-docs#7191 I propose this feature as bug fix in 3.2, since I don't use the PHP templating I forgot to add the method in the `FrameworkBundle`, to keep it align with the `TwigBridge` in symfony/symfony#19991. Is this acceptable or should it go in master? Commits ------- 099b848 Added GlobalVariables::getToken()
I agree with @xabbuh that this should go in 2.7 first. |
Closing it in favor of #7808. |
xabbuh
added a commit
that referenced
this pull request
May 8, 2017
…viereguiluz) This PR was merged into the 2.7 branch. Discussion ---------- Improved the description of the global Twig variables This finished #7191. When merged, don't forget to add this description in 3.2 and master: ``` * ``app.token`` (a :class:`Symfony\\Component\\Security\\Core\\Authentication\\Token\\TokenInterface` object representing the security token) ``` Commits ------- 5dafdf6 Improved the description of the global Twig variables
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes #7167.
Two questions:
do you agree adding a short description to each global variable?
request
andsession
are so obvious ... but others may not be so obvious to the reader.The paragraph above this states that:
Are we sure about that class? Shouldn't it be
Symfony\Bridge\Twig\AppVariable
instead?Thanks!