Skip to content

Commit 44b8763

Browse files
committed
Revert "bugfix #137 Fix template attributes forbidden (, masonen)"
This reverts commit 03df9d4, reversing changes made to f99295a.
1 parent 03df9d4 commit 44b8763

5 files changed

Lines changed: 18 additions & 8 deletions

File tree

Resources/views/Ticket/show_attachment.html.twig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
{% import 'hackzilla_ticket.templates.macros' as macros %}
2-
1+
{% import 'HackzillaTicketBundle:Macros:macros.html.twig' as macros %}
32
{% if message.attachmentName %}
43
<br>
54
<div class="ticket_attachment">

TwigExtension/TicketFeatureExtension.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
namespace Hackzilla\Bundle\TicketBundle\TwigExtension;
44

55
use Hackzilla\Bundle\TicketBundle\Component\TicketFeatures;
6+
use Twig\Extension\AbstractExtension;
7+
use Twig\TwigFunction;
68

7-
class TicketFeatureExtension extends \Twig_Extension
9+
class TicketFeatureExtension extends AbstractExtension
810
{
911
private $ticketFeatures;
1012

@@ -19,7 +21,7 @@ public function __construct(TicketFeatures $ticketFeatures)
1921
public function getFunctions()
2022
{
2123
return [
22-
new \Twig_SimpleFunction('hasTicketFeature', [$this, 'hasFeature']),
24+
new TwigFunction('hasTicketFeature', [$this, 'hasFeature']),
2325
];
2426
}
2527

TwigExtension/TicketGlobalExtension.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
namespace Hackzilla\Bundle\TicketBundle\TwigExtension;
44

5-
class TicketGlobalExtension extends \Twig_Extension implements \Twig_Extension_GlobalsInterface
5+
use Twig\Extension\AbstractExtension;
6+
use Twig\Extension\GlobalsInterface;
7+
8+
class TicketGlobalExtension extends AbstractExtension implements GlobalsInterface
69
{
710
protected $templates = [];
811

composer.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"php": "^5.6 || ^7.0",
2929
"doctrine/doctrine-bundle": "^1.4",
3030
"doctrine/orm": "^2.4.8",
31-
"knplabs/knp-paginator-bundle": "^2.3 || ^3.0",
31+
"knplabs/knp-paginator-bundle": "^2.3 || ^3.0 || ^4.0",
3232
"symfony/config": "^2.8 || ^3.0 || ^4.0",
3333
"symfony/console": "^2.8 || ^3.0 || ^4.0",
3434
"symfony/dependency-injection": "^2.8 || ^3.0 || ^4.0",
@@ -41,7 +41,8 @@
4141
"symfony/security-bundle": "^2.8 || ^3.0 || ^4.0",
4242
"symfony/translation": "^2.8 || ^3.0 || ^4.0",
4343
"symfony/validator": "^2.8 || ^3.0 || ^4.0",
44-
"symfony/yaml": "^2.8 || ^3.0 || ^4.0"
44+
"symfony/yaml": "^2.8 || ^3.0 || ^4.0",
45+
"twig/twig": "^1.34 || ^2.0"
4546
},
4647
"require-dev": {
4748
"ext-pdo_sqlite": "*",
@@ -59,6 +60,12 @@
5960
"autoload": {
6061
"psr-4": {
6162
"Hackzilla\\Bundle\\TicketBundle\\": ""
63+
},
64+
"exclude-from-classmap": ["Tests/"]
65+
},
66+
"autoload-dev": {
67+
"psr-4": {
68+
"Hackzilla\\Bundle\\TicketBundle\\Tests\\": "Tests/"
6269
}
6370
},
6471
"config": {

phpunit.xml.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
convertWarningsToExceptions="true"
99
processIsolation="false"
1010
stopOnFailure="false"
11-
syntaxCheck="false"
1211
bootstrap="Tests/bootstrap.php"
1312
>
1413
<php>

0 commit comments

Comments
 (0)