Skip to content

Commit d657544

Browse files
committed
Use new CodeNode::preventFromTransformation() method
1 parent 38a0955 commit d657544

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"prefer-stable": true,
2323
"require": {
2424
"php": ">=7.2",
25-
"phug/phug": "^1.5"
25+
"phug/phug": "^1.6"
2626
},
2727
"require-dev": {
2828
"phpunit/phpunit": "^8.5",

src/Phug/Component/ComponentExtension.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ protected function getCodeNode(NodeInterface $linkedNode, ParserNodeInterface $p
9191
$code->setValue($value);
9292
}
9393

94-
$code->noTransform = true;
94+
$code->preventFromTransformation();
9595

9696
return $code;
9797
}
@@ -128,13 +128,6 @@ public function attachEvents(): void
128128
$compiler = $this->getCompiler();
129129
$compiler->attach(CompilerEvent::NODE, [$this, 'handleNodeEvent']);
130130
$compiler->attach(CompilerEvent::OUTPUT, [$this, 'handleOutputEvent']);
131-
$compiler->attach(CompilerEvent::ELEMENT, function (ElementEvent $event) {
132-
$code = $event->getElement();
133-
134-
if ($code instanceof CodeElement && ($node = $code->getOriginNode()) && ($node->noTransform ?? false)) {
135-
$code->preventFromTransformation();
136-
}
137-
});
138131
}
139132

140133
public function detachEvents(): void

0 commit comments

Comments
 (0)