/PriceHistoryPlugin

Implementation of "Directive (EU) 2019/2161 of the European Parliament and of the Council", also known as the "Omnibus Directive".

Primary LanguagePHPMIT LicenseMIT

Price History Plugin

⚙️ Installation

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.

Installation with Recipes and Rector

Before you start, you need to have both SyliusRecipes and SyliusRector installed. You can find how to install them here:

  1. Run:

    composer require sylius/price-history-plugin --no-scripts
  2. Update <project_root>/rector.php

    + use Sylius\SyliusRector\Set\SyliusPriceHistory;
    
    return static function (RectorConfig $rectorConfig): void {
        // ...
    +    $rectorConfig->sets([SyliusPriceHistory::PRICE_HISTORY_PLUGIN]);
    };
    
  3. Run:

    vendor/bin/rector
  4. 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
  5. Execute migrations:

    bin/console doctrine:migrations:migrate
  6. Rebuild the cache to display all new translations correctly:

    bin/console cache:clear
    bin/console cache:warmup
  7. Run messenger consumer:

    bin/console messenger:consume main

    For more information check official Symfony docs.