Skip to content

Commit

Permalink
adds support for Twig 3
Browse files Browse the repository at this point in the history
  • Loading branch information
nixilla committed Jan 15, 2020
1 parent 3ffe616 commit c6c68eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -19,8 +19,8 @@
"php": ">=5.6",
"ext-json": "*",
"symfony/framework-bundle": "~2.3||~3||~4||~5",
"twig/twig": "~1.24||~2||~3",
"kriswallsmith/buzz": "^1"
"kriswallsmith/buzz": "^1",
"twig/twig": "^3.0"
},
"require-dev" :{
"phpspec/phpspec": "^6",
Expand Down
7 changes: 5 additions & 2 deletions src/Twig/CurlFormatter.php
Expand Up @@ -2,7 +2,10 @@

namespace Nixilla\Api\LoggerBundle\Twig;

class CurlFormatter extends \Twig_Extension
use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;

class CurlFormatter extends AbstractExtension
{
public function getName()
{
Expand All @@ -12,7 +15,7 @@ public function getName()
public function getFilters()
{
return array(
new \Twig_SimpleFilter('format_curl_command', array($this, 'formatForCurl'))
new TwigFilter('format_curl_command', array($this, 'formatForCurl'))
);
}

Expand Down

0 comments on commit c6c68eb

Please sign in to comment.