Skip to content

Commit

Permalink
Remove obsolete TemplateNameParser
Browse files Browse the repository at this point in the history
It no longer parses (and should not have been stripping namespaces as it did before)
  • Loading branch information
sneakyvv committed Jan 16, 2025
1 parent b4b3ff3 commit 99cb909
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 85 deletions.
2 changes: 1 addition & 1 deletion src/TwigComponent/src/Twig/ComponentNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function compile(Compiler $compiler): void
->raw('), ')
->raw($this->getAttribute('only') ? '[]' : '$context')
->raw(', ')
->string(TemplateNameParser::parse($this->getAttribute('embedded_template')))
->string($this->getAttribute('embedded_template'))
->raw(', ')
->raw($this->getAttribute('embedded_index'))
->raw(");\n");
Expand Down
2 changes: 1 addition & 1 deletion src/TwigComponent/src/Twig/ComponentTokenParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function parse(Token $token): Node
$this->parser->embedTemplate($module);

// override the embedded index with a deterministic value, so it can be loaded in a controlled manner
$module->setAttribute('index', $this->generateEmbeddedTemplateIndex(TemplateNameParser::parse($stream->getSourceContext()->getName()), $token->getLine()));
$module->setAttribute('index', $this->generateEmbeddedTemplateIndex($stream->getSourceContext()->getName(), $token->getLine()));

$stream->expect(Token::BLOCK_END_TYPE);

Expand Down
36 changes: 0 additions & 36 deletions src/TwigComponent/src/Twig/TemplateNameParser.php

This file was deleted.

47 changes: 0 additions & 47 deletions src/TwigComponent/tests/Unit/Twig/TemplateNameParserTest.php

This file was deleted.

0 comments on commit 99cb909

Please sign in to comment.