8000 Merge branch '2.7' into 2.8 · symfony/symfony@5a08a32 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5a08a32

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: [Validator] Fix annotation [TwigBridge] Use non-deprecated Twig_Node::getTemplateLine() Update README.md
2 parents 265bb5f + 8974d77 commit 5a08a32

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Running Symfony Tests
4747
Information on how to run the Symfony test suite can be found in the
4848
[Running Symfony Tests][6] section.
4949

50-
[1]: https://symfony.com/get_started
50+
[1]: https://symfony.com/doc/current/quick_tour/index.html
5151
[2]: https://symfony.com/doc/current/
5252
[3]: https://symfony.com/doc/current/contributing/code/index.html
5353
[4]: https://symfony.com/doc/current/contributing/code/patches.html#check-list

src/Symfony/Bridge/Twig/Node/SearchAndRenderBlockNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function compile(\Twig_Compiler $compiler)
3737
// the variables in the third argument
3838
$label = $arguments[1];
3939
$variables = isset($arguments[2]) ? $arguments[2] : null;
40-
$lineno = $label->getLine();
40+
$lineno = $label->getTemplateLine();
4141

4242
if ($label instanceof \Twig_Node_Expression_Constant) {
4343
// If the label argument is given as a constant, we can either

src/Symfony/Bridge/Twig/Node/TransNode.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,18 +109,18 @@ protected function compileString(\Twig_Node $body, \Twig_Node_Expression_Array $
109109
preg_match_all('/(?<!%)%([^%]+)%/', $msg, $matches);
110110

111111
foreach ($matches[1] as $var) {
112-
$key = new \Twig_Node_Expression_Constant('%'.$var.'%', $body->getLine());
112+
$key = new \Twig_Node_Expression_Constant('%'.$var.'%', $body->getTemplateLine());
113113
if (!$vars->hasElement($key)) {
114114
if ('count' === $var && $this->hasNode('count')) {
115115
$vars->addElement($this->getNode('count'), $key);
116116
} else {
117-
$varExpr = new \Twig_Node_Expression_Name($var, $body->getLine());
117+
$varExpr = new \Twig_Node_Expression_Name($var, $body->getTemplateLine());
118118
$varExpr->setAttribute('ignore_strict_check', $ignoreStrictCheck);
119119
$vars->addElement($varExpr, $key);
120120
}
121121
}
122122
}
123123

124-
return array(new \Twig_Node_Expression_Constant(str_replace('%%', '%', trim($msg)), $body->getLine()), $vars);
124+
return array(new \Twig_Node_Expression_Constant(str_replace('%%', '%', trim($msg)), $body->getTemplateLine()), $vars);
125125
}
126126
}

src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ protected function doEnterNode(\Twig_Node $node, \Twig_Environment $env)
5050
return $node;
5151
} else {
5252
$var = $env->getParser()->getVarName();
53-
$name = new \Twig_Node_Expression_AssignName($var, $node->getLine());
54-
$this->scope->set('domain', new \Twig_Node_Expression_Name($var, $node->getLine()));
53+
$name = new \Twig_Node_Expression_AssignName($var, $node->getTemplateLine());
54+
$this->scope->set('domain', new \Twig_Node_Expression_Name($var, $node->getTemplateLine()));
5555

56-
return new \Twig_Node_Set(false, new \Twig_Node(array($name)), new \Twig_Node(array($node->getNode('expr'))), $node->getLine());
56+
return new \Twig_Node_Set(false, new \Twig_Node(array($name)), new \Twig_Node(array($node->getNode('expr'))), $node->getTemplateLine());
5757
}
5858
}
5959

@@ -71,7 +71,7 @@ protected function doEnterNode(\Twig_Node $node, \Twig_Environment $env)
7171
} else {
7272
if (!$arguments->hasNode($ind)) {
7373
if (!$arguments->hasNode($ind - 1)) {
74-
$arguments->setNode($ind - 1, new \Twig_Node_Expression_Array(array(), $node->getLine()));
74+
$arguments->setNode($ind - 1, new \Twig_Node_Expression_Array(array(), $node->getTemplateLine()));
7575
}
7676

7777
$arguments->setNode($ind, $this->scope->get('domain'));

src/Symfony/Bridge/Twig/TokenParser/TransChoiceTokenParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function parse(\Twig_Token $token)
6464
$body = $this->parser->subparse(array($this, 'decideTransChoiceFork'), true);
6565

6666
if (!$body instanceof \Twig_Node_Text && !$body instanceof \Twig_Node_Expression) {
67-
throw new \Twig_Error_Syntax('A message inside a transchoice tag must be a simple text.', $body->getLine(), $stream->getSourceContext()->getName());
67+
throw new \Twig_Error_Syntax('A message inside a transchoice tag must be a simple text.', $body->getTemplateLine(), $stream->getSourceContext()->getName());
6868
}
6969

7070
$stream->expect(\Twig_Token::BLOCK_END_TYPE);

src/Symfony/Bridge/Twig/TokenParser/TransTokenParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function parse(\Twig_Token $token)
6464
$body = $this->parser->subparse(array($this, 'decideTransFork'), true);
6565

6666
if (!$body instanceof \Twig_Node_Text && !$body instanceof \Twig_Node_Expression) {
67-
throw new \Twig_Error_Syntax('A message inside a trans tag must be a simple text.', $body->getLine(), $stream->getSourceContext()->getName());
67+
throw new \Twig_Error_Syntax('A message inside a trans tag must be a simple text.', $body->getTemplateLine(), $stream->getSourceContext()->getName());
6868
}
6969

7070
$stream->expect(\Twig_Token::BLOCK_END_TYPE);

src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ private function validateGenericNode($value, $object, $cacheKey, MetadataInterfa
790790
* @param int $traversalStrategy The strategy used for
791791
* traversing the value
792792
* @param GroupSequence $groupSequence The group sequence
793-
* @param string[]|null $cascadedGroup The group that should
793+
* @param string|null $cascadedGroup The group that should
794794
* be passed to cascaded
795795
* objects instead of
796796
* the group sequence

0 commit comments

Comments
 (0)
0