Skip to content

Update cookbook/templating/twig_extension.rst #1745

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
wants to merge 1 commit into from
Closed

Update cookbook/templating/twig_extension.rst #1745

wants to merge 1 commit into from

Conversation

dotlabel-chris
Copy link
Contributor

Set the namespace scope to global for \Twig_Extension and \Twig_Filter_Method.

Set the namespace scope to global for \Twig_Extension and \Twig_Filter_Method.
@stof
Copy link
Member

stof commented Sep 24, 2012

This is useless as there is use statements for these 2 classes.

However, it is true that using the FQCN would follow the Symfony2 CS in a better way. But in such case, the unused use statements should be removed

@wouterj
Copy link
Member

wouterj commented Sep 24, 2012

@stof can you refer to the standard where this is described? I can't find it.

@stof
Copy link
Member

stof commented Sep 24, 2012

@wouterj I'm not sure this is written in the CS documentation. But this doc starts by saying the rule is "Imitate the existing code" :)

@wouterj
Copy link
Member

wouterj commented Sep 24, 2012

@stof yes, you're right :)

@weaverryan
Copy link
Member

Hi Chris and guys!

I've patched this into the 2.0 branch at sha: dea7e7b and removed the unnecessary use statements. Thanks for the conversation on this beforehand - I had never really thought which way was the standard, but you're correct that it's done internally like this.

Thanks!

@weaverryan weaverryan closed this Oct 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants