Hi!
So I'm trying to install some Sylius parts to a project at work. To be precise product,cart and payment bundles. But some errors keep on popping up.
Firstly, after downloading the product bundle via composer and adding the needed dependencies to the AppKernel.php file, cach:clear --env=prod command displays the following error:
Fatal error: Class 'Sylius\Bundle\TranslationBundle\SyliusTranslationBundle' not found in /var/www/horus/app/AppKernel.php on line 36
I guess that this means that the Translation Bundle didn't get downloaded at the same time as the Production Bundle.
I tried to install it separatly using the composer require sylius/translation-bundle command but that gave me another error :
An error occurred when executing the
cache:clear --no-warmupcommand:
Fatal error: Cannot make non static method Sylius\Bundle\ResourceBundle\Res
ourceBundleInterface::getSupportedDrivers() static in class Sylius\Bundle\T
ranslationBundle\SyliusTranslationBundle in /var/www/horus/vendor/sylius/tr
anslation-bundle/SyliusTranslationBundle.php on line 37
But the most confusing part is that there is no Sylius folder in my Vendors although the composer show -i command clearly shows that sylius dependencies have been installed.
So at this point i have no idea what to do next and any help would be nice.
TranslationBundle was merged into ResourceBundle, so removing that line in AppKernel should help. Documentation might be quite outdated, but there's #5275 to help us deal with it :)
thx for a quick response. :)
Removing the new Sylius\Bundle\TranslationBundle\SyliusTranslationBundle() line from the AppKernel got me another error :
The service "sylius.factory.product" has a dependency on a non-existent service "sylius.translation.locale_provider".
Obviously some Product Bundle dependencies have not been downloaded at the same time as the Product Bundle
Adding the following configuration should help:
sylius_resource:
translation:
enabled: true
default_locale: "%locale%"
another error:
The service "sylius.factory.product" has a dependency on a non-existent service "sylius.repository.product_archetype".
Solved it. #4928 had all I needed. Non the less thanks :).
@ImSmoking Great! Please close the issue if everything is ok, we will update the docs.