Symfony 7/8 Fixes & Compatibility#505
Conversation
# Conflicts: # Tests/Unit/Translation/TranslatorTest.php # Translation/Translator.php
…fined in the Symfony Translator
|
@bartmcleod hi ! |
There was a problem hiding this comment.
Every time I try to review this I get stuck on the sheer amount of changes.
I have added one comment so far, more of a question, that applies to more than one location.
Also, when I load this PR in my Symfony 8 project, I get an error "TypeError
HTTP 500 Internal Server Error
Lexik\Bundle\TranslationBundle\Translation\Translator::__construct(): Argument #2 ($container) must be of type Psr\Container\ContainerInterface, Symfony\Component\Translation\Formatter\MessageFormatter given, called in /app/var/cache/dev/ContainerEprdT7G/getLexikTranslation_TranslatorService.php on line 26"
Maybe I need to clear the cache [Edit] yes, that works
| } | ||
|
|
||
| if ($this->input->getOption('cache-clear')) { | ||
| if ($this->input->getOption('cache-clear') && method_exists($this->translator, 'removeLocalesCacheFiles')) { |
There was a problem hiding this comment.
@dsoriano Why do you need to call method_exists? Is there no interface defined for a translator that covers this?
|
@dsoriano When I try to eport translations it goes to |
|
@dsoriano When I save and add a new translation, I get the error
|
|
@dsoriano I noticed that a new translation is also broken in current master, so it need not block this PR. Can you rebase please and resolve any conflicts? |
|
@dsoriano I'm also trying to fix this, as currently master is broken |

This pull request aim to improve the whole bundle compatibility with Symfony 7 / 8
✅ Unit tests OK
✅ Tested on a real project
There is still a lot of work to do but this PR is a good start !
Fix #500 and #490