Merge branch '2.8' into 3.1
* 2.8: [Validator] Fix annotation [TwigBridge] Use non-deprecated Twig_Node::getTemplateLine() [WebProfilerBundle][btn-link] add `cursor: pointer` Update README.md
This commit is contained in:
commit
a01cc6d8c4
|
@ -39,7 +39,7 @@ Running Symfony Tests
|
|||
Information on how to run the Symfony test suite can be found in the
|
||||
[Running Symfony Tests][6] section.
|
||||
|
||||
[1]: https://symfony.com/get_started
|
||||
[1]: https://symfony.com/doc/current/quick_tour/index.html
|
||||
[2]: https://symfony.com/doc/current/
|
||||
[3]: https://symfony.com/doc/current/contributing/code/index.html
|
||||
[4]: https://symfony.com/doc/current/contributing/code/patches.html#check-list
|
||||
|
|
|
@ -37,7 +37,7 @@ class SearchAndRenderBlockNode extends \Twig_Node_Expression_Function
|
|||
// the variables in the third argument
|
||||
$label = $arguments[1];
|
||||
$variables = isset($arguments[2]) ? $arguments[2] : null;
|
||||
$lineno = $label->getLine();
|
||||
$lineno = $label->getTemplateLine();
|
||||
|
||||
if ($label instanceof \Twig_Node_Expression_Constant) {
|
||||
// If the label argument is given as a constant, we can either
|
||||
|
|
|
@ -109,18 +109,18 @@ class TransNode extends \Twig_Node
|
|||
preg_match_all('/(?<!%)%([^%]+)%/', $msg, $matches);
|
||||
|
||||
foreach ($matches[1] as $var) {
|
||||
$key = new \Twig_Node_Expression_Constant('%'.$var.'%', $body->getLine());
|
||||
$key = new \Twig_Node_Expression_Constant('%'.$var.'%', $body->getTemplateLine());
|
||||
if (!$vars->hasElement($key)) {
|
||||
if ('count' === $var && $this->hasNode('count')) {
|
||||
$vars->addElement($this->getNode('count'), $key);
|
||||
} else {
|
||||
$varExpr = new \Twig_Node_Expression_Name($var, $body->getLine());
|
||||
$varExpr = new \Twig_Node_Expression_Name($var, $body->getTemplateLine());
|
||||
$varExpr->setAttribute('ignore_strict_check', $ignoreStrictCheck);
|
||||
$vars->addElement($varExpr, $key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array(new \Twig_Node_Expression_Constant(str_replace('%%', '%', trim($msg)), $body->getLine()), $vars);
|
||||
return array(new \Twig_Node_Expression_Constant(str_replace('%%', '%', trim($msg)), $body->getTemplateLine()), $vars);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,10 +50,10 @@ class TranslationDefaultDomainNodeVisitor extends \Twig_BaseNodeVisitor
|
|||
return $node;
|
||||
} else {
|
||||
$var = $env->getParser()->getVarName();
|
||||
$name = new \Twig_Node_Expression_AssignName($var, $node->getLine());
|
||||
$this->scope->set('domain', new \Twig_Node_Expression_Name($var, $node->getLine()));
|
||||
$name = new \Twig_Node_Expression_AssignName($var, $node->getTemplateLine());
|
||||
$this->scope->set('domain', new \Twig_Node_Expression_Name($var, $node->getTemplateLine()));
|
||||
|
||||
return new \Twig_Node_Set(false, new \Twig_Node(array($name)), new \Twig_Node(array($node->getNode('expr'))), $node->getLine());
|
||||
return new \Twig_Node_Set(false, new \Twig_Node(array($name)), new \Twig_Node(array($node->getNode('expr'))), $node->getTemplateLine());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ class TranslationDefaultDomainNodeVisitor extends \Twig_BaseNodeVisitor
|
|||
} else {
|
||||
if (!$arguments->hasNode($ind)) {
|
||||
if (!$arguments->hasNode($ind - 1)) {
|
||||
$arguments->setNode($ind - 1, new \Twig_Node_Expression_Array(array(), $node->getLine()));
|
||||
$arguments->setNode($ind - 1, new \Twig_Node_Expression_Array(array(), $node->getTemplateLine()));
|
||||
}
|
||||
|
||||
$arguments->setNode($ind, $this->scope->get('domain'));
|
||||
|
|
|
@ -64,7 +64,7 @@ class TransChoiceTokenParser extends TransTokenParser
|
|||
$body = $this->parser->subparse(array($this, 'decideTransChoiceFork'), true);
|
||||
|
||||
if (!$body instanceof \Twig_Node_Text && !$body instanceof \Twig_Node_Expression) {
|
||||
throw new \Twig_Error_Syntax('A message inside a transchoice tag must be a simple text.', $body->getLine(), $stream->getSourceContext()->getName());
|
||||
throw new \Twig_Error_Syntax('A message inside a transchoice tag must be a simple text.', $body->getTemplateLine(), $stream->getSourceContext()->getName());
|
||||
}
|
||||
|
||||
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
|
||||
|
|
|
@ -64,7 +64,7 @@ class TransTokenParser extends \Twig_TokenParser
|
|||
$body = $this->parser->subparse(array($this, 'decideTransFork'), true);
|
||||
|
||||
if (!$body instanceof \Twig_Node_Text && !$body instanceof \Twig_Node_Expression) {
|
||||
throw new \Twig_Error_Syntax('A message inside a trans tag must be a simple text.', $body->getLine(), $stream->getSourceContext()->getName());
|
||||
throw new \Twig_Error_Syntax('A message inside a trans tag must be a simple text.', $body->getTemplateLine(), $stream->getSourceContext()->getName());
|
||||
}
|
||||
|
||||
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
|
||||
|
|
|
@ -133,6 +133,7 @@ button {
|
|||
outline: none;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btn-link:hover {
|
||||
text-decoration: underline;
|
||||
|
|
|
@ -761,7 +761,7 @@ class RecursiveContextualValidator implements ContextualValidatorInterface
|
|||
* @param int $traversalStrategy The strategy used for
|
||||
* traversing the value
|
||||
* @param GroupSequence $groupSequence The group sequence
|
||||
* @param string[]|null $cascadedGroup The group that should
|
||||
* @param string|null $cascadedGroup The group that should
|
||||
* be passed to cascaded
|
||||
* objects instead of
|
||||
* the group sequence
|
||||
|
|
Reference in New Issue