Skip to content

Commit 95f2cac

Browse files
authored
fix: missing debug argument for translator (#482)
1 parent 0a7f23c commit 95f2cac

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Resources/config/services.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@
6363
<argument key="$loaderIds" type="collection"></argument>
6464
<argument key="$options" type="collection" >
6565
<argument key="cache_dir">%kernel.cache_dir%</argument>
66+
<argument key="debug">%kernel.debug%</argument>
67+
<argument key="resource_files" type="collection" />
68+
<argument key="scanned_directories" type="collection" />
69+
<argument key="cache_vary" type="collection" />
6670
</argument>
6771
</service>
6872
<service id="lexik_translation.translator" alias="Lexik\Bundle\TranslationBundle\Translation\Translator" public="true"/>

Translation/Translator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ public function __construct(
4545
$this->options['resource_files'] = $this->options['resource_files'] ?? [];
4646
$this->options['scanned_directories'] = $this->options['scanned_directories'] ?? [];
4747
$this->options['cache_vary'] = $this->options['cache_vary'] ?? [];
48+
$this->options['cache_dir'] = $this->options['cache_dir'] ?? sys_get_temp_dir();
49+
$this->options['debug'] = $this->options['debug'] ?? false;
4850

4951
parent::__construct(
5052
container: $this->container,

0 commit comments

Comments
 (0)