8000 bumped min version of Twig to 1.28 · symfony/symfony@b8f7614 · GitHub
[go: up one dir, main page]

Skip to content

Commit b8f7614

Browse files
committed
bumped min version of Twig to 1.28
1 parent 4967ad4 commit b8f7614

File tree

8 files changed

+19
-12
lines changed

8 files changed

+19
-12
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"paragonie/random_compat": "~1.0",
2222
"symfony/polyfill-apcu": "~1.1",
2323
"symfony/polyfill-mbstring": "~1.1",
24-
"twig/twig": "~1.27|~2.0",
24+
"twig/twig": "~1.28|~2.0",
2525
"psr/log": "~1.0"
2626
},
2727
"replace": {

src/Symfony/Bridge/Twig/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
],
1818
"require": {
1919
"php": ">=5.3.9",
20-
"twig/twig": "~1.27|~2.0"
20+
"twig/twig": "~1.28|~2.0"
2121
},
2222
"require-dev": {
2323
"symfony/asset": "~2.7",

src/Symfony/Bundle/SecurityBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"symfony/yaml": "~2.0,>=2.0.5",
3838
"symfony/expression-language": "~2.6",
3939
"doctrine/doctrine-bundle": "~1.2",
40-
"twig/twig": "~1.27|~2.0",
40+
"twig/twig": "~1.28|~2.0",
4141
"ircmaxell/password-compat": "~1.0"
4242
},
4343
"autoload": {

src/Symfony/Bundle/TwigBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"php": ">=5.3.9",
2020
"symfony/asset": "~2.7",
2121
"symfony/twig-bridge": "~2.7",
22-
"twig/twig": "~1.27|~2.0",
22+
"twig/twig": "~1.28|~2.0",
2323
"symfony/http-foundation": "~2.5",
2424
"symfony/http-kernel": "~2.7"
2525
},

src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function panelAction(Request $request, $token)
106106
'panel' => $panel,
107107
'page' => $page,
108108
'request' => $request,
109-
'templates' => $this->getTemplateManager()->getTemplates($profile),
109+
'templates' => $this->getTemplateManager()->getNames($profile),
110110
'is_ajax' => $request->isXmlHttpRequest(),
111111
)), 200, array('Content-Type' => 'text/html'));
112112
}
@@ -200,7 +200,7 @@ public function toolbarAction(Request $request, $token)
200200
return new Response($this->twig->render('@WebProfiler/Profiler/toolbar.html.twig', array(
201201
'position' => $position,
202202
'profile' => $profile,
203-
'templates' => $this->getTemplateManager()->getTemplates($profile),
203+
'templates' => $this->getTemplateManager()->getNames($profile),
204204
'profiler_url' => $url,
205205
'token' => $token,
206206
)), 200, array('Content-Type' => 'text/html'));

src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ public function getName(Profile $profile, $panel)
6767
*
6868
* @param Profile $profile
6969
*
70-
* @return array
70+
* @return Twig_Template[]
71+
*
72+
* @deprecated not used anymore internally
7173
*/
7274
public function getTemplates(Profile $profile)
7375
{
@@ -88,7 +90,7 @@ public function getTemplates(Profile $profile)
8890
*
8991
* @throws \UnexpectedValueException
9092
*/
91-
protected function getNames(Profile $profile)
93+
public function getNames(Profile $profile)
9294
{
9395
$templates = array();
9496

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@
3636
{% if templates is defined %}
3737
<ul id="menu-profiler">
3838
{% for name, template in templates %}
39-
{% set menu %}{{ template.renderBlock('menu', { 'collector': profile.getcollector(name)}) }}{% endset %}
39+
{% set menu -%}
40+
{% with { 'collector': profile.getcollector(name) } %}
41+
{{ block('menu', template) }}
42+
{% endwith %}
43+
{%- endset %}
4044
{% if menu != '' %}
4145
<li class="{{ name }}{% if name == panel %} selected{% endif %}">
4246
<a href="{{ path('_profiler', { 'token': token, 'panel': name }) }}">{{ menu|raw }}</a>

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@
2626

2727
<div id="sfToolbarMainContent-{{ token }}" class="sf-toolbarreset clear-fix" data-no-turbolink>
2828
{% for name, template in templates %}
29-
{{ template.renderblock('toolbar', {
29+
{% with {
3030
'collector': profile.getcollector(name),
3131
'profiler_url': profiler_url,
3232
'token': profile.token,
3333
'name': name
34-
})
35-
}}
34+
} %}
35+
{{ block('toolbar', template) }}
36+
{% endwith %}
3637
{% endfor %}
3738

3839
{% if 'normal' != position %}

0 commit comments

Comments
 (0)
0