mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-13 02:46:29 +00:00
bug #2849 Fix undefined class Profile in templates (chalasr)
This PR was merged into the 1.x branch.
Discussion
----------
Fix undefined class Profile in templates
Fixes https://travis-ci.org/symfony/symfony/jobs/494506116.
~~The calling line is https://github.com/twigphp/Twig/blob/2.x/lib/Twig/Profiler/Node/EnterProfile.php#L34, let me know if we should just rollback to `new \Twig\Profiler\Profile()` there.~~ just reverted the failing line to its original state (using FQCN)
Commits
-------
c185a6e7 Fix undefined class Profile in templates
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
|
||||
use Twig\Compiler;
|
||||
use Twig\Node\Node;
|
||||
use Twig\Profiler\Profile;
|
||||
|
||||
/**
|
||||
* Represents a profile enter node.
|
||||
@@ -31,7 +30,7 @@ class Twig_Profiler_Node_EnterProfile extends Node
|
||||
->write(sprintf('$%s = $this->env->getExtension(', $this->getAttribute('var_name')))
|
||||
->repr($this->getAttribute('extension_name'))
|
||||
->raw(");\n")
|
||||
->write(sprintf('$%s->enter($%s = new Profile($this->getTemplateName(), ', $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof'))
|
||||
->write(sprintf('$%s->enter($%s = new \Twig\Profiler\Profile($this->getTemplateName(), ', $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof'))
|
||||
->repr($this->getAttribute('type'))
|
||||
->raw(', ')
|
||||
->repr($this->getAttribute('name'))
|
||||
|
||||
Reference in New Issue
Block a user