minor #30233 [Twig] removed usage of non-namespaced classes (fabpot)
This PR was merged into the 3.4 branch.
Discussion
----------
[Twig] removed usage of non-namespaced classes
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Commits
-------
bd719cd7e1
[Twig] removed usage of non-namespaced classes
This commit is contained in:
commit
5a154538c7
@ -16,6 +16,7 @@ use Symfony\Component\HttpFoundation\Response;
|
|||||||
use Symfony\Component\HttpKernel\DataCollector\DataCollector;
|
use Symfony\Component\HttpKernel\DataCollector\DataCollector;
|
||||||
use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface;
|
use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface;
|
||||||
use Twig\Environment;
|
use Twig\Environment;
|
||||||
|
use Twig\Error\LoaderError;
|
||||||
use Twig\Markup;
|
use Twig\Markup;
|
||||||
use Twig\Profiler\Dumper\HtmlDumper;
|
use Twig\Profiler\Dumper\HtmlDumper;
|
||||||
use Twig\Profiler\Profile;
|
use Twig\Profiler\Profile;
|
||||||
@ -70,7 +71,7 @@ class TwigDataCollector extends DataCollector implements LateDataCollectorInterf
|
|||||||
if ($profile->isTemplate()) {
|
if ($profile->isTemplate()) {
|
||||||
try {
|
try {
|
||||||
$template = $this->twig->load($name = $profile->getName());
|
$template = $this->twig->load($name = $profile->getName());
|
||||||
} catch (\Twig_Error_Loader $e) {
|
} catch (LoaderError $e) {
|
||||||
$template = null;
|
$template = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user