Skip to content

[FrameworkBundle] Added GlobalVariables::getToken() #20773

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
Dec 13, 2016

Conversation

HeahDude
Copy link
Contributor

@HeahDude HeahDude commented Dec 5, 2016

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?

@HeahDude HeahDude changed the title Added GlobalVariables::getToken() [FrameworkBundle] Added GlobalVariables::getToken() Dec 5, 2016
@xabbuh
Copy link
Member

xabbuh commented Dec 6, 2016

While I agree that this is nice for consistency, I do not agree with it being a bug fix. So I would vote for merging this into the master branch instead.

/**
* Returns the current user.
*
* @return mixed
Copy link
Member

Choose a reason for hiding this comment

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

could be removed

Copy link
Member

Choose a reason for hiding this comment

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

agreed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If it were to be removed, shouldn't this be removed in 2.7 instead?

Copy link
Member

Choose a reason for hiding this comment

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

No, it's just that we don't add such annotations anymore. Old code should be kept as is.

@nicolas-grekas nicolas-grekas added this to the 3.2 milestone Dec 6, 2016
@fabpot
Copy link
Member

fabpot commented Dec 8, 2016

Should be merged in master.

@xabbuh xabbuh modified the milestones: 3.2, 3.x Dec 8, 2016
@HeahDude HeahDude changed the base branch from 3.2 to master December 8, 2016 22:21
@HeahDude
Copy link
Contributor Author

HeahDude commented Dec 8, 2016

Fixed and rebased on master.


if (!$token = $tokenStorage->getToken()) {
/**
* Returns the current user.
Copy link
Member

Choose a reason for hiding this comment

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

If you removed the return type, you could IMO remove the whole docblock.

@javiereguiluz javiereguiluz removed the Bug label Dec 9, 2016
@fabpot
Copy link
Member

fabpot commented Dec 13, 2016

Thank you @HeahDude.

@fabpot fabpot merged commit 099b848 into symfony:master Dec 13, 2016
fabpot added a commit 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()
@HeahDude HeahDude deleted the fix/app_var-token branch December 13, 2016 22:38
@nicolas-grekas nicolas-grekas modified the milestones: 3.x, 3.3 Mar 24, 2017
@fabpot fabpot mentioned this pull request May 1, 2017
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.

7 participants