We encourage you to use the installation instructions based on Rector and Recipes as it is more convenient and faster. The legacy installation guide is available here.
Before you start, you need to have both SyliusRecipes and SyliusRector installed. You can find how to install them here:
-
Run:
composer require sylius/price-history-plugin --no-scripts
-
Update
<project_root>/rector.php
+ use Sylius\SyliusRector\Set\SyliusPriceHistory; return static function (RectorConfig $rectorConfig): void { // ... + $rectorConfig->sets([SyliusPriceHistory::PRICE_HISTORY_PLUGIN]); };
-
Run:
vendor/bin/rector
-
Ensure you have modified resource configured in
config/packages/_sylius.yaml
:sylius_channel: resources: channel: classes: model: App\Entity\Channel\Channel sylius_core: resources: channel_pricing: classes: model: App\Entity\Channel\ChannelPricing
-
Execute migrations:
bin/console doctrine:migrations:migrate
-
Rebuild the cache to display all new translations correctly:
bin/console cache:clear bin/console cache:warmup
-
Run messenger consumer:
bin/console messenger:consume main
For more information check official Symfony docs.