Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b9a4586

Browse filesBrowse files
committed
[TwigBridge] fixed Twig_Source required argument
1 parent 8974d77 commit b9a4586
Copy full SHA for b9a4586

File tree

Expand file treeCollapse file tree

4 files changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+4
-4
lines changed

‎src/Symfony/Bridge/Twig/Tests/Extension/RoutingExtensionTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Tests/Extension/RoutingExtensionTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function testEscaping($template, $mustBeEscaped)
2323
$twig = new \Twig_Environment($this->getMock('Twig_LoaderInterface'), array('debug' => true, 'cache' => false, 'autoescape' => 'html', 'optimizations' => 0));
2424
$twig->addExtension(new RoutingExtension($this->getMock('Symfony\Component\Routing\Generator\UrlGeneratorInterface')));
2525

26-
$nodes = $twig->parse($twig->tokenize(new \Twig_Source($template)));
26+
$nodes = $twig->parse($twig->tokenize(new \Twig_Source($template, '')));
2727

2828
$this->assertSame($mustBeEscaped, $nodes->getNode('body')->getNode(0)->getNode('expr') instanceof \Twig_Node_Expression_Filter);
2929
}

‎src/Symfony/Bridge/Twig/Tests/NodeVisitor/TwigNodeProvider.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Tests/NodeVisitor/TwigNodeProvider.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static function getModule($content)
2525
new \Twig_Node_Expression_Array(array(), 0),
2626
new \Twig_Node_Expression_Array(array(), 0),
2727
null,
28-
new \Twig_Source('')
28+
new \Twig_Source('', '')
2929
);
3030
}
3131

‎src/Symfony/Bridge/Twig/Tests/TokenParser/FormThemeTokenParserTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Tests/TokenParser/FormThemeTokenParserTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function testCompile($source, $expected)
2323
{
2424
$env = new \Twig_Environment($this->getMock('Twig_LoaderInterface'), array('cache' => false, 'autoescape' => false, 'optimizations' => 0));
2525
$env->addTokenParser(new FormThemeTokenParser());
26-
$stream = $env->tokenize(new \Twig_Source($source));
26+
$stream = $env->tokenize(new \Twig_Source($source, ''));
2727
$parser = new \Twig_Parser($env);
2828

2929
$this->assertEquals($expected, $parser->parse($stream)->getNode('body')->getNode(0));

‎src/Symfony/Bridge/Twig/Translation/TwigExtractor.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Translation/TwigExtractor.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ protected function extractTemplate($template, MessageCatalogue $catalogue)
8585
$visitor = $this->twig->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->getTranslationNodeVisitor();
8686
$visitor->enable();
8787

88-
$this->twig->parse($this->twig->tokenize(new \Twig_Source($template)));
88+
$this->twig->parse($this->twig->tokenize(new \Twig_Source($template, '')));
8989

9090
foreach ($visitor->getMessages() as $message) {
9191
$catalogue->set(trim($message[0]), $this->prefix.trim($message[0]), $message[1] ?: $this->defaultDomain);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.