Skip to content

Commit 55fcd0d

Browse files
committed
[Translator] Revert #1965, which break cache warmup for Symfony applications
1 parent 92ad2de commit 55fcd0d

File tree

5 files changed

+0
-55
lines changed

5 files changed

+0
-55
lines changed

src/Translator/doc/index.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ For a better developer experience, TypeScript types definitions are also generat
7171
Then, you will be able to import those JavaScript translations in your assets.
7272
Don't worry about your final bundle size, only the translations you use will be included in your final bundle, thanks to the `tree shaking <https://webpack.js.org/guides/tree-shaking/>`_.
7373

74-
.. note::
75-
76-
This package requires the `translator` to be enabled in your Symfony application. If you don't use the `translator` service, the warmup command will not generate any translations.
77-
7874
Configuring the dumped translations
7975
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8076

src/Translator/src/DependencyInjection/TranslatorCompilerPass.php

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/Translator/src/UxTranslatorBundle.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Symfony\Component\DependencyInjection\ContainerBuilder;
1515
use Symfony\Component\HttpKernel\Bundle\Bundle;
16-
use Symfony\UX\Translator\DependencyInjection\TranslatorCompilerPass;
1716

1817
/**
1918
* @author Hugo Alliaume <hugo@alliau.me>
@@ -28,9 +27,4 @@ public function getPath(): string
2827
{
2928
return \dirname(__DIR__);
3029
}
31-
32-
public function build(ContainerBuilder $container): void
33-
{
34-
$container->addCompilerPass(new TranslatorCompilerPass());
35-
}
3630
}

src/Translator/tests/Kernel/FrameworkAppKernel.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ public function registerContainerConfiguration(LoaderInterface $loader)
3838
'secret' => '$ecret',
3939
'test' => true,
4040
'translator' => [
41-
'enabled' => match ($this->environment) {
42-
'test_without_translator' => false,
43-
default => true,
44-
},
4541
'fallbacks' => ['en'],
4642
],
4743
'http_method_override' => false,

src/Translator/tests/UxTranslatorBundleTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ public static function provideKernels()
2222
{
2323
yield 'empty' => [new EmptyAppKernel('test', true)];
2424
yield 'framework' => [new FrameworkAppKernel('test', true)];
25-
yield 'framework without translator' => [new FrameworkAppKernel('test_without_translator', true)];
2625
}
2726

2827
/**

0 commit comments

Comments
 (0)