Skip to content

Commit

Permalink
[Translator] Revert #1965, which break cache warmup for Symfony appli…
Browse files Browse the repository at this point in the history
…cations
  • Loading branch information
Kocal committed Aug 13, 2024
1 parent 92ad2de commit 55fcd0d
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 55 deletions.
4 changes: 0 additions & 4 deletions src/Translator/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ For a better developer experience, TypeScript types definitions are also generat
Then, you will be able to import those JavaScript translations in your assets.
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/>`_.

.. note::

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.

Configuring the dumped translations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
40 changes: 0 additions & 40 deletions src/Translator/src/DependencyInjection/TranslatorCompilerPass.php

This file was deleted.

6 changes: 0 additions & 6 deletions src/Translator/src/UxTranslatorBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\UX\Translator\DependencyInjection\TranslatorCompilerPass;

/**
* @author Hugo Alliaume <[email protected]>
Expand All @@ -28,9 +27,4 @@ public function getPath(): string
{
return \dirname(__DIR__);
}

public function build(ContainerBuilder $container): void
{
$container->addCompilerPass(new TranslatorCompilerPass());
}
}
4 changes: 0 additions & 4 deletions src/Translator/tests/Kernel/FrameworkAppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ public function registerContainerConfiguration(LoaderInterface $loader)
'secret' => '$ecret',
'test' => true,
'translator' => [
'enabled' => match ($this->environment) {
'test_without_translator' => false,
default => true,
},
'fallbacks' => ['en'],
],
'http_method_override' => false,
Expand Down
1 change: 0 additions & 1 deletion src/Translator/tests/UxTranslatorBundleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public static function provideKernels()
{
yield 'empty' => [new EmptyAppKernel('test', true)];
yield 'framework' => [new FrameworkAppKernel('test', true)];
yield 'framework without translator' => [new FrameworkAppKernel('test_without_translator', true)];
}

/**
Expand Down

0 comments on commit 55fcd0d

Please sign in to comment.