Augmentation vers version 3.3.0

This commit is contained in:
Gauvain Boiché
2020-03-31 15:31:03 +02:00
parent d926806907
commit a1864c0414
2618 changed files with 406015 additions and 31377 deletions

View File

@@ -12,7 +12,6 @@
namespace Symfony\Bridge\Twig\Translation;
use Symfony\Component\Finder\Finder;
use Symfony\Component\Finder\SplFileInfo;
use Symfony\Component\Translation\Extractor\AbstractFileExtractor;
use Symfony\Component\Translation\Extractor\ExtractorInterface;
use Symfony\Component\Translation\MessageCatalogue;
@@ -58,17 +57,7 @@ class TwigExtractor extends AbstractFileExtractor implements ExtractorInterface
try {
$this->extractTemplate(file_get_contents($file->getPathname()), $catalogue);
} catch (Error $e) {
if ($file instanceof \SplFileInfo) {
$path = $file->getRealPath() ?: $file->getPathname();
$name = $file instanceof SplFileInfo ? $file->getRelativePathname() : $path;
if (method_exists($e, 'setSourceContext')) {
$e->setSourceContext(new Source('', $name, $path));
} else {
$e->setTemplateName($name);
}
}
throw $e;
// ignore errors, these should be fixed by using the linter
}
}
}
@@ -106,9 +95,7 @@ class TwigExtractor extends AbstractFileExtractor implements ExtractorInterface
}
/**
* @param string|array $directory
*
* @return array
* {@inheritdoc}
*/
protected function extractFromDirectory($directory)
{