Skip to content

Make explicit dependency against "twig/twig" in order to replace usage of spaceless tag, which is deprecated since "1.38" #138

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
Closed
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
20 changes: 10 additions & 10 deletions Resources/views/Macros/macros.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% macro status_btn(status, text, small = false) %}
{% spaceless %}
{% apply spaceless %}
{% if status == 10 %}
<button class="btn btn-warning {{ small ? 'btn-xs' : '' }} disabled active"><span
class="glyphicon glyphicon-folder-open"></span>&nbsp;&nbsp;{{ text|upper }}</button>
Expand All @@ -19,11 +19,11 @@
<button class="btn btn-danger {{ small ? 'btn-xs' : '' }} disabled active"><span
class="glyphicon glyphicon-folder-close"></span>&nbsp;&nbsp;{{ text|upper }}</button>
{% endif %}
{% endspaceless %}
{% endapply %}
{% endmacro %}

{% macro status_alert(status, text) %}
{% spaceless %}
{% apply spaceless %}
{% if status == 10 %}
<div class="alert alert-warning" role="alert"><span class="glyphicon glyphicon-folder-open"></span>&nbsp;&nbsp;{{ 'MESSAGE_STATUS_CHANGED'|trans({'%status%': text|upper }, 'HackzillaTicketBundle') }}
</div>
Expand All @@ -46,11 +46,11 @@
<div class="alert alert-danger" role="alert"><span class="glyphicon glyphicon-folder-close"></span>&nbsp;&nbsp;{{ 'MESSAGE_STATUS_CHANGED'|trans({'%status%': text|upper }, 'HackzillaTicketBundle') }}
</div>
{% endif %}
{% endspaceless %}
{% endapply %}
{% endmacro %}

{% macro priority_btn(priority, text, small = false) %}
{% spaceless %}
{% apply spaceless %}
{% if priority <= 20 %}
<button class="btn btn-info {{ small ? 'btn-xs' : '' }} disabled active">{{ text|upper }}</button>
{% elseif priority == 21 %}
Expand All @@ -60,11 +60,11 @@
<button class="btn btn-danger {{ small ? 'btn-xs' : '' }} disabled active"><span
class="glyphicon glyphicon-asterisk"></span>&nbsp;&nbsp;{{ text|upper }}</button>
{% endif %}
{% endspaceless %}
{% endapply %}
{% endmacro %}

{% macro priority_alert(priority, text) %}
{% spaceless %}
{% apply spaceless %}
{% if priority <= 20 %}
<div class="alert alert-info"
role="alert">{{ 'MESSAGE_PRIORITY_CHANGED'|trans({'%priority%': text|upper }, 'HackzillaTicketBundle') }}</div>
Expand All @@ -77,12 +77,12 @@
class="glyphicon glyphicon-star"></span>&nbsp;&nbsp;{{ 'MESSAGE_PRIORITY_CHANGED'|trans({'%priority%': text|upper }, 'HackzillaTicketBundle') }}
</div>
{% endif %}
{% endspaceless %}
{% endapply %}
{% endmacro %}

{# Source: http://stackoverflow.com/a/15303004/157656 #}
{% macro bytesToSize(bytes) %}
{% spaceless %}
{% apply spaceless %}
{% set kilobyte = 1024 %}
{% set megabyte = kilobyte * 1024 %}
{% set gigabyte = megabyte * 1024 %}
Expand All @@ -99,5 +99,5 @@
{% else %}
{{ (bytes / terabyte)|number_format(2, '.') ~ ' TB' }}
{% endif %}
{% endspaceless %}
{% endapply %}
{% endmacro %}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
},
"conflict": {
"phpunit/phpunit": "<5.4.3",
"twig/twig": "<1.34"
"twig/twig": "<2.9"
},
"suggest": {
"friendsofsymfony/user-bundle": "In order to ease user management",
Expand Down