8000 minor #54534 [TwigBundle] Don't register emoji extension on missing `… · symfonyaml/symfony@a8b4739 · GitHub
[go: up one dir, main page]

Skip to content

Commit a8b4739

Browse files
minor symfony#54534 [TwigBundle] Don't register emoji extension on missing intl extension (alexandre-daubois)
This PR was merged into the 7.1 branch. Discussion ---------- [TwigBundle] Don't register emoji extension on missing `intl` extension | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | - | License | MIT Appveyor is failing a log because Twig bundle tries to load Emoji transliterator even if ext-intl is not present. Snippet of the error: ``` 8) Symfony\Bundle\SecurityBundle\Tests\Functional\CsrfFormLoginTest::testFormLoginRedirectsToProtectedResourceAfterLogin with data set #0 (array('CsrfFormLogin', 'config.yml')) LogicException: You cannot use the "Symfony\Component\Emoji\EmojiTransliterator" class as the "intl" extension is not installed. See https://php.net/intl. C:\projects\symfony\src\Symfony\Component\Emoji\EmojiTransliterator.php:17 C:\projects\symfony\src\Symfony\Component\ErrorHandler\DebugClassLoader.php:304 C:\projects\symfony\src\Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\ExtensionPass.php:35 C:\projects\symfony\src\Symfony\Component\DependencyInjection\Compiler\Compiler.php:73 C:\projects\symfony\src\Symfony\Component\DependencyInjection\ContainerBuilder.php:750 C:\projects\symfony\src\Symfony\Component\HttpKernel\Kernel.php:495 C:\projects\symfony\src\Symfony\Component\HttpKernel\Kernel.php:732 C:\projects\symfony\src\Symfony\Component\HttpKernel\Kernel.php:120 C:\projects\symfony\src\Symfony\Bundle\FrameworkBundle\Test\KernelTestCase.php:67 C:\projects\symfony\src\Symfony\Bundle\FrameworkBundle\Test\WebTestCase.php:44 C:\projects\symfony\src\Symfony\Bundle\SecurityBundle\Tests\Functional\CsrfFormLoginTest.php:111 ``` Commits ------- 1a90ba8 [TwigBundle] Don't register emoji extension on missing `intl` extension
2 parents a8c43b6 + 1a90ba8 commit a8b4739

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function process(ContainerBuilder $container): void
3232
$container->removeDefinition('twig.extension.assets');
3333
}
3434

35-
if (!class_exists(EmojiTransliterator::class)) {
35+
if (!class_exists(\Transliterator::class) || !class_exists(EmojiTransliterator::class)) {
3636
$container->removeDefinition('twig.extension.emoji');
3737
}
3838

0 commit comments

Comments
 (0)
0