After installation I got an error:
Sylius\Bundle\ResourceBundle\Controller\FlashHelper::__construct() must be an instance of Symfony\Component\Translation\TranslatorBagInterface, instance of Symfony\Component\Translation\IdentityTranslator given
I've to override service like this:
translator:
class: "%translator.class%"
arguments:
- "@service_container"
- "@translator.selector"
- []
- { cache_dir: "%kernel.cache_dir%/translations", debug: "%kernel.debug%" }
calls:
- [setConfigCacheFactory, ['@config_cache_factory']]
Just installed sylius/sylius and sylius/sylius-standard and in both cases FlashHelper works.
My guess is something went wrong with your config file.
Please check if you have the default sylius config.yml, the part concerning translation should look something like:
framework:
translator: { fallbacks: ["%locale%"] }
And if you'd prefer not having fallbacks go:
framework:
translator: { enabled: true }
or:
framework:
translator:
enabled: true
Whichever of those will overwrite the translator service id with the symfony's default translator, and the flash helper will work anew.
@NeverResponse, thanks, it helps. I was blind enough to miss that framework: translator was commented out
Most helpful comment
Just installed sylius/sylius and sylius/sylius-standard and in both cases FlashHelper works.
My guess is something went wrong with your config file.
Please check if you have the default sylius config.yml, the part concerning translation should look something like:
And if you'd prefer not having fallbacks go:
or:
Whichever of those will overwrite the
translatorservice id with the symfony's default translator, and the flash helper will work anew.