Skip to content

Commit c055596

Browse files
authored
Merge pull request #22 from OxCom/develop
Security update of Twig
2 parents 844af0c + d0eb21c commit c055596

File tree

6 files changed

+11
-4
lines changed

6 files changed

+11
-4
lines changed

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/Test export-ignore
2+
.gitattributes export-ignore
3+
.gitignore export-ignore
4+
.travis.yml export-ignore
5+
phpunit.xml.dist export-ignore

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ matrix:
5656

5757
before_install:
5858
- curl -s https://getcomposer.org/installer | php
59+
- php composer.phar require roave/security-advisories:dev-master --no-update
5960
- php composer.phar require symfony/symfony:${SYMFONY_VERSION} --no-update
6061
- php -dmemory_limit=-1 composer.phar update
6162

Tests/SymfonyRollbarBundle/Twig/RollbarExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function testRollbarJs($env, $isDisabled)
4242
$this->assertNotEmpty($list);
4343

4444
$function = $list[0];
45-
$this->assertInstanceOf(\Twig_SimpleFunction::class, $function);
45+
$this->assertInstanceOf(\Twig\TwigFunction::class, $function);
4646

4747
$output = $rollbarTwig->rollbarJs();
4848

Twig/RollbarExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Symfony\Component\DependencyInjection\ContainerInterface;
77
use SymfonyRollbarBundle\DependencyInjection\SymfonyRollbarExtension;
88

9-
class RollbarExtension extends \Twig_Extension
9+
class RollbarExtension extends \Twig\Extension\AbstractExtension
1010
{
1111
/**
1212
* @var \Symfony\Component\DependencyInjection\ContainerInterface
@@ -48,7 +48,7 @@ public function getFunctions()
4848
}
4949

5050
return [
51-
new \Twig_SimpleFunction('rollbarJs', [$this, 'rollbarJs'], [
51+
new \Twig\TwigFunction('rollbarJs', [$this, 'rollbarJs'], [
5252
'is_safe' => ['html'],
5353
]),
5454
];

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"squizlabs/php_codesniffer": "^3.2",
4545
"matthiasnoback/symfony-dependency-injection-test": "^1.2||^2.3",
4646
"symfony/phpunit-bridge": "^4.0",
47-
"twig/twig": "^1.35||^2.4"
47+
"twig/twig": "^1.38||^2.7"
4848
},
4949
"scripts": {
5050
"test": [

phpunit.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<php>
1818
<ini name="error_reporting" value="-1" />
1919
<env name="APP_DEBUG" value="false" />
20+
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
2021
<server name="KERNEL_DIR" value="Tests/Fixtures/app" />
2122
<server name="KERNEL_CLASS" value="AppKernel" />
2223
</php>

0 commit comments

Comments
 (0)