Skip to content

Commit f588c6e

Browse files
committed
Fix the translation commands when a template contains a syntax error
1 parent fa783f9 commit f588c6e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/Symfony/Bridge/Twig/Translation/TwigExtractor.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bridge\Twig\Translation;
1313

1414
use Symfony\Component\Finder\Finder;
15-
use Symfony\Component\Finder\SplFileInfo;
1615
use Symfony\Component\Translation\Extractor\AbstractFileExtractor;
1716
use Symfony\Component\Translation\Extractor\ExtractorInterface;
1817
use Symfony\Component\Translation\MessageCatalogue;
@@ -58,13 +57,7 @@ public function extract($resource, MessageCatalogue $catalogue)
5857
try {
5958
$this->extractTemplate(file_get_contents($file->getPathname()), $catalogue);
6059
} catch (Error $e) {
61-
if ($file instanceof \SplFileInfo) {
62-
$path = $file->getRealPath() ?: $file->getPathname();
63-
$name = $file instanceof SplFileInfo ? $file->getRelativePathname() : $path;
64-
$e->setSourceContext(new Source('', $name, $path));
65-
}
66-
67-
throw $e;
60+
// ignore errors, these should be fixed by using the linter
6861
}
6962
}
7063
}

0 commit comments

Comments
 (0)