-
Notifications
You must be signed in to change notification settings - Fork 265
Fix error with SF 7.3 in prod environment #487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Translation/Translator.php
Outdated
|
|
||
| protected function loadCatalogue(string $locale): void | ||
| { | ||
| if (!$this->isResourcesLoaded && ('all' === $this->options['resources_type'] || 'database' === $this->options['resources_type'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you capture $this->options['resources_type'] in a variable, your condition gets shorter
|
@dsoriano Thank you for your MR! I ran the checks. The tests fail for php8.4, can you fix that? I added one suggestion to make your changes a tiny bit more readable, maybe you want to look into that as well? |
|
@bartmcleod sure, i'll take a look asap |
|
Well done @dsoriano and thank you for fixing this ! 👍 |
|
@dsoriano Thank you for your contribution! |
|
When I try to clear the cache using the button in the interface, it doesn't seem to work anymore after these changes: LexikTranslationBundle/Translation/Translator.php Lines 109 to 111 in ecb7f02
When executing the code, the I have configured the bundle with simply: |
|
@nicodemuz Can you specify reproduction steps so that we can know when to expect a cache file? Do you expect it to always be generated? Do we have a setting for that that you are aware of? |
|
@nicodemuz yes your right, I discover this bug also this week. It's a problem I introduced in the configuration in the bundle. I had not time this week for a PR, next week I will take a look. As a quick fix you can override the configuration in your |

This fix the issue #484
I removed the call of
addDatabaseResourceson the service initialization and manage it in theloadCataloguecall. With this there is no more errors with the Doctrine proxies because the cache generation is made when the catalogues are generated, not before.