8000 bumped min version of Twig to 1.28 by fabpot · Pull Request #20484 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

bumped min version of Twig to 1.28 #20484

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
Nov 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"paragonie/random_compat": "~1.0",
"symfony/polyfill-apcu": "~1.1",
"symfony/polyfill-mbstring": "~1.1",
"twig/twig": "~1.27|~2.0",
"twig/twig": "~1.28|~2.0",
"psr/log": "~1.0"
},
"replace": {
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/Twig/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
],
"require": {
"php": ">=5.3.9",
"twig/twig": "~1.27|~2.0"
"twig/twig": "~1.28|~2.0"
},
"require-dev": {
"symfony/asset": "~2.7",
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/SecurityBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"symfony/yaml": "~2.0,>=2.0.5",
"symfony/expression-language": "~2.6",
"doctrine/doctrine-bundle": "~1.2",
"twig/twig": "~1.27|~2.0",
"twig/twig": "~1.28|~2.0",
"ircmaxell/password-compat": "~1.0"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deleti 8000 on src/Symfony/Bundle/TwigBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"php": ">=5.3.9",
"symfony/asset": "~2.7",
"symfony/twig-bridge": "~2.7",
"twig/twig": "~1.27|~2.0",
"twig/twig": "~1.28|~2.0",
"symfony/http-foundation": "~2.5",
"symfony/http-kernel": "~2.7"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function panelAction(Request $request, $token)
'panel' => $panel,
'page' => $page,
'request' => $request,
'templates' => $this->getTemplateManager()->getTemplates($profile),
'templates' => $this->getTemplateManager()->getNames($profile),
'is_ajax' => $request->isXmlHttpRequest(),
)), 200, array('Content-Type' => 'text/html'));
}
Expand Down Expand Up @@ -200,7 +200,7 @@ public function toolbarAction(Request $request, $token)
return new Response($this->twig->render('@WebProfiler/Profiler/toolbar.html.twig', array(
'position' => $position,
'profile' => $profile,
'templates' => $this->getTemplateManager()->getTemplates($profile),
'templates' => $this->getTemplateManager()->getNames($profile),
Copy link
Member

Choose a reason for hiding this comment

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

getNames() must become public then

Copy link
Member Author

Choose a reason for hiding this comment

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

sure :)

'profiler_url' => $url,
'token' => $token,
)), 200, array('Content-Type' => 'text/html'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ public function getName(Profile $profile, $panel)
*
* @param Profile $profile
*
* @return array
* @return Twig_Template[]
*
* @deprecated not used anymore internally
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't it throw a deprecation warning ?

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, but not in Symfony 2.7. This must be added after merging this to master.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed with @xabbuh, but this class should probably be marked as being internal as well in master.

*/
public function getTemplates(Profile $profile)
{
Expand All @@ -88,7 +90,7 @@ public function getTemplates(Profile $profile)
*
* @throws \UnexpectedValueException
*/
protected function getNames(Profile $profile)
public function getNames(Profile $profile)
{
$templates = array();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@
{% if templates is defined %}
<ul id="menu-profiler">
{% for name, template in templates %}
{% set menu %}{{ template.renderBlock('menu', { 'collector': profile.getcollector(name)}) }}{% endset %}
{% set menu -%}
{% with { 'collector': profile.getcollector(name) } %}
{{ block('menu', template) }}
{% endwith %}
{%- endset %}
{% if menu != '' %}
<li class="{{ name }}{% if name == panel %} selected{% endif %}">
<a href="{{ path('_profiler', { 'token': token, 'panel': name }) }}">{{ menu|raw }}</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@

<div id="sfToolbarMainContent-{{ token }}" class="sf-toolbarreset clear-fix" data-no-turbolink>
{% for name, template in templates %}
{{ template.renderblock('toolbar', {
{% with {
'collector': profile.getcollector(name),
'profiler_url': profiler_url,
'token': profile.token,
'name': name
})
}}
} %}
{{ block('toolbar', template) }}
{% endwith %}
{% endfor %}

{% if 'normal' != position %}
Expand Down
0