From 735c848f352e5b560a47f287cb691c91dec4f5f7 Mon Sep 17 00:00:00 2001 From: neothone Date: Sun, 20 Jul 2025 21:11:05 +0200 Subject: [PATCH 1/2] Update editInPlace.js For HMR compatibility. Fix the javascript error display in console and webpack error overlay : "Failed to execute 'define' on 'CustomElementRegistry': the name "x-trans" has already been used with this registry" --- Resources/public/js/editInPlace.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Resources/public/js/editInPlace.js b/Resources/public/js/editInPlace.js index cf9b52e..fffdf87 100644 --- a/Resources/public/js/editInPlace.js +++ b/Resources/public/js/editInPlace.js @@ -11,8 +11,10 @@ // it is not possible to use HTMLElement directly class XTrans extends HTMLElement {} - customElements.define("x-trans", XTrans); - + if (!customElements.get('x-trans')) { + customElements.define("x-trans", XTrans); + } + return; } From c49be6bd89117bfbadd82d29d4f0c632bf069b6b Mon Sep 17 00:00:00 2001 From: neothone Date: Wed, 23 Jul 2025 15:19:55 +0200 Subject: [PATCH 2/2] Update DefaultApplyingNodeVisitor.php Fix Translation\Bundle\Tests\Unit\Twig\DefaultApplyingNodeVisitorTest::testApply --- Twig/Visitor/DefaultApplyingNodeVisitor.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/Twig/Visitor/DefaultApplyingNodeVisitor.php b/Twig/Visitor/DefaultApplyingNodeVisitor.php index 7d682c6..d9bb7d6 100644 --- a/Twig/Visitor/DefaultApplyingNodeVisitor.php +++ b/Twig/Visitor/DefaultApplyingNodeVisitor.php @@ -116,8 +116,6 @@ public function enterNode(Node $node, Environment $env): Node $expr = new EqualBinary($testNode, $transNode->getNode('node'), $wrappingNode->getTemplateLine()); if (Environment::VERSION_ID >= 31700) { - $expr->setAttribute('operator', 'binary_=='); - $condition = new ConditionalTernary( $expr, $defaultNode,