Skip to content

Commit 35fc35e

Browse files
andythornedkarlovi
authored andcommitted
Allow template overrides in Symfony >= 3.4 (#519)
* Allow template overrides in sf >= 3.4 * backwards compatible syntax * Updated tests
1 parent 6950be7 commit 35fc35e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Controller/AuthorizeController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public function authorizeAction(Request $request)
195195
}
196196

197197
return $this->templating->renderResponse(
198-
'FOSOAuthServerBundle:Authorize:authorize.html.'.$this->templateEngineType,
198+
'@FOSOAuthServer/Authorize/authorize.html.'.$this->templateEngineType,
199199
[
200200
'form' => $form->createView(),
201201
'client' => $this->getClient(),
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{% extends "FOSOAuthServerBundle::layout.html.twig" %}
1+
{% extends "@FOSOAuthServer/layout.html.twig" %}
22

33
{% block fos_oauth_server_content %}
4-
{% include "FOSOAuthServerBundle:Authorize:authorize_content.html.twig" %}
4+
{% include "@FOSOAuthServer/Authorize/authorize_content.html.twig" %}
55
{% endblock fos_oauth_server_content %}

Tests/Controller/AuthorizeControllerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ public function testAuthorizeActionWillRenderTemplate()
313313
->expects($this->at(0))
314314
->method('renderResponse')
315315
->with(
316-
'FOSOAuthServerBundle:Authorize:authorize.html.twig',
316+
'@FOSOAuthServer/Authorize/authorize.html.twig',
317317
[
318318
'form' => $this->formView,
319319
'client' => $this->client,
@@ -472,7 +472,7 @@ public function testAuthorizeActionWillEnsureLogout()
472472
->expects($this->at(0))
473473
->method('renderResponse')
474474
->with(
475-
'FOSOAuthServerBundle:Authorize:authorize.html.twig',
475+
'@FOSOAuthServer/Authorize/authorize.html.twig',
476476
[
477477
'form' => $this->formView,
478478
'client' => $this->client,

0 commit comments

Comments
 (0)