Skip to content

Commit

Permalink
Merge pull request #611 from deguif/remove-twig-legacy-code
Browse files Browse the repository at this point in the history
Remove twig trans node backward compatibility
  • Loading branch information
goetas authored Feb 9, 2025
2 parents d465379 + ec1a0ac commit 2a51f8a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Translation/Extractor/File/TwigFileExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ public function enterNode(Node $node, Environment $env): Node
if ($node instanceof TransNode) {
$id = $node->getNode('body')->getAttribute('data');
$domain = 'messages';
// Older version of Symfony are storing null in the node instead of omitting it
if ($node->hasNode('domain') && null !== $domainNode = $node->getNode('domain')) {
$domain = $domainNode->getAttribute('value');

if ($node->hasNode('domain')) {
$domain = $node->getNode('domain')->getAttribute('value');
}

$message = new Message($id, $domain);
Expand Down

0 comments on commit 2a51f8a

Please sign in to comment.