Skip to content

[FrameworkBundle] Make TemplateController working without the Templating component #21034

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 23, 2016

Conversation

dunglas
Copy link
Member

@dunglas dunglas commented Dec 23, 2016

Q A
Branch? 2.8
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

The template controller was missed during #15502. Btw I've added some tests for this controller.

@dunglas dunglas force-pushed the template_controller_twig branch 2 times, most recently from 918c9d3 to 5ce9222 Compare December 23, 2016 15:11
@dunglas dunglas force-pushed the template_controller_twig branch from 5ce9222 to 89ccbc4 Compare December 23, 2016 15:30
@fabpot
Copy link
Member

fabpot commented Dec 23, 2016

Thank you @dunglas.

@fabpot fabpot merged commit 89ccbc4 into symfony:2.8 Dec 23, 2016
fabpot added a commit that referenced this pull request Dec 23, 2016
…the Templating component (dunglas)

This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] Make TemplateController working without the Templating component

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

The template controller was missed during #15502. Btw I've added some tests for this controller.

Commits
-------

89ccbc4 [FrameworkBundle] Make TemplateController working without the Templating component
@dunglas dunglas deleted the template_controller_twig branch December 23, 2016 20:37
@@ -33,8 +33,14 @@ class TemplateController extends ContainerAware
*/
public function templateAction($template, $maxAge = null, $sharedAge = null, $private = null)
{
/** @var $response \Symfony\Component\HttpFoundation\Response */
$response = $this->container->get('templating')->renderResponse($template);
/* @var $response \Symfony\Component\HttpFoundation\Response */
Copy link
Member

Choose a reason for hiding this comment

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

@dunglas Are you sure about this change?

Copy link
Member

Choose a reason for hiding this comment

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

I would even remove it as I don't think it helps in any way, does it?

Copy link
Member

Choose a reason for hiding this comment

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

Removing it would indeed be better.

Copy link
Member

Choose a reason for hiding this comment

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

done in e5ce4c9

Copy link
Member Author

Choose a reason for hiding this comment

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

It was to make fabbot green, I've tried with PHPStorm, both formats enable the autocompletion. Removing it prevent autocompletion by default, but if you have the Symfony plugin then it works.

This was referenced Jan 12, 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.

5 participants