Skip to content

Commit

Permalink
[TwigBundle] removed deprecated syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Mar 23, 2013
1 parent 45bd413 commit 4f4a5d1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
Expand Up @@ -54,29 +54,6 @@ public function getTestsForRender()
'render'
)
),
// deprecated in 2.2
array(
'{% render "foo" with {foo: 2} %}',
new RenderNode(
new \Twig_Node_Expression_Constant('foo', 1),
new \Twig_Node_Expression_Array(array(), 1),
1,
'render'
)
),
// deprecated in 2.2
array(
'{% render "foo" with {foo: 2}, {foo: 1} %}',
new RenderNode(
new \Twig_Node_Expression_Constant('foo', 1),
new \Twig_Node_Expression_Array(array(
new \Twig_Node_Expression_Constant('foo', 1),
new \Twig_Node_Expression_Constant('1', 1),
), 1),
1,
'render'
)
),
);
}
}
Expand Up @@ -31,15 +31,6 @@ public function parse(\Twig_Token $token)
{
$expr = $this->parser->getExpressionParser()->parseExpression();

// attributes (not used anymore, kept for BC reasons)
// @deprecated in 2.2 and will be removed in 2.3
if ($this->parser->getStream()->test(\Twig_Token::NAME_TYPE, 'with')) {
$this->parser->getStream()->next();
$attributes = $this->parser->getExpressionParser()->parseExpression();
} else {
$attributes = new \Twig_Node_Expression_Array(array(), $token->getLine());
}

// options
if ($this->parser->getStream()->test(\Twig_Token::PUNCTUATION_TYPE, ',')) {
$this->parser->getStream()->next();
Expand Down

0 comments on commit 4f4a5d1

Please sign in to comment.