Skip to content

Commit 8cceb66

Browse files
committed
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
2 parents 5bb577c + b050169 commit 8cceb66

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

DataCollector/TwigDataCollector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Symfony\Component\HttpKernel\DataCollector\DataCollector;
1717
use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface;
1818
use Twig\Environment;
19+
use Twig\Error\LoaderError;
1920
use Twig\Markup;
2021
use Twig\Profiler\Dumper\HtmlDumper;
2122
use Twig\Profiler\Profile;
@@ -70,7 +71,7 @@ public function lateCollect()
7071
if ($profile->isTemplate()) {
7172
try {
7273
$template = $this->twig->load($name = $profile->getName());
73-
} catch (\Twig_Error_Loader $e) {
74+
} catch (LoaderError $e) {
7475
$template = null;
7576
}
7677

0 commit comments

Comments
 (0)