Skip to content

Commit

Permalink
Remove deprecation, update code
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Nov 29, 2024
1 parent 81c7e8f commit fd83319
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 207 deletions.
3 changes: 1 addition & 2 deletions src/Extension/CoreExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
use Twig\Node\Expression\FunctionNode\EnumCasesFunction;
use Twig\Node\Expression\FunctionNode\EnumFunction;
use Twig\Node\Expression\GetAttrExpression;
use Twig\Node\Expression\NullCoalesceExpression;
use Twig\Node\Expression\ParentExpression;
use Twig\Node\Expression\Test\ConstantTest;
use Twig\Node\Expression\Test\DefinedTest;
Expand Down Expand Up @@ -326,7 +325,7 @@ public function getOperators(): array
],
[
'?:' => ['precedence' => 5, 'class' => ElvisBinary::class, 'associativity' => ExpressionParser::OPERATOR_RIGHT],
'??' => ['precedence' => 5, 'class' => NullCoalesceExpression::class, 'associativity' => ExpressionParser::OPERATOR_RIGHT],
'??' => ['precedence' => 5, 'class' => NullCoalesceBinary::class, 'associativity' => ExpressionParser::OPERATOR_RIGHT],
'or' => ['precedence' => 10, 'class' => OrBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
'xor' => ['precedence' => 12, 'class' => XorBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
'and' => ['precedence' => 15, 'class' => AndBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT],
Expand Down
54 changes: 0 additions & 54 deletions src/Node/Expression/ConditionalExpression.php

This file was deleted.

1 change: 0 additions & 1 deletion src/Node/Expression/Filter/DefaultFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\FilterExpression;
use Twig\Node\Expression\GetAttrExpression;
use Twig\Node\Expression\NameExpression;
use Twig\Node\Expression\Ternary\ConditionalTernary;
use Twig\Node\Expression\Test\DefinedTest;
use Twig\Node\Expression\Variable\ContextVariable;
Expand Down
65 changes: 0 additions & 65 deletions src/Node/Expression/NullCoalesceExpression.php

This file was deleted.

5 changes: 1 addition & 4 deletions src/NodeVisitor/EscaperNodeVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,7 @@ public function leaveNode(Node $node, Environment $env): ?Node
return $node;
}

/**
* @param AbstractExpression&OperatorEscapeInterface $expression
*/
private function escapeConditional($expression, Environment $env, string $type): void
private function escapeConditional(AbstractExpression&OperatorEscapeInterface $expression, Environment $env, string $type): void
{
foreach ($expression->getOperandNamesToEscape() as $name) {
$operand = $expression->getNode($name);
Expand Down
2 changes: 0 additions & 2 deletions src/NodeVisitor/SafeAnalysisNodeVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
use Twig\Node\Expression\FunctionExpression;
use Twig\Node\Expression\GetAttrExpression;
use Twig\Node\Expression\MacroReferenceExpression;
use Twig\Node\Expression\MethodCallExpression;
use Twig\Node\Expression\NameExpression;
use Twig\Node\Expression\OperatorEscapeInterface;
use Twig\Node\Expression\ParentExpression;
use Twig\Node\Expression\Variable\ContextVariable;
Expand Down
47 changes: 0 additions & 47 deletions tests/Node/Expression/ConditionalTest.php

This file was deleted.

32 changes: 0 additions & 32 deletions tests/Node/Expression/NullCoalesceTest.php

This file was deleted.

0 comments on commit fd83319

Please sign in to comment.