Installation

circle-info

This installation instruction assumes that you're using Symfony Flex and Rector. If you don't, take a look at the manual installation, but we strongly recommend using Flex and Rector for speed and simplicity.

1. Prepare Your Environment

Before installing the plugin, ensure that your project:

  • Uses Symfony Flex

  • Runs a supported Sylius 2.x version

  • Has yarn and Symfony Encore correctly configured

2. Allow Symfony Contrib Recipes

To allow Symfony to install community recipes:

composer config extra.symfony.allow-contrib true

If prompted during plugin installation, accept the community recipe when asked.

3. Install the Plugin via Composer

composer require sylius/product-bundle-plugin

This will install the plugin and apply the Flex recipe, registering the necessary services and configuration automatically.

4. Update and run Rector

Update <project_root>/rector.php

Run rector

5. Install and build assets

6. Run Doctrine Migrations

The plugin comes with database changes. Run:

7. Clear the Symfony Cache

Finally, clear the Symfony cache to ensure changes are applied:

Last updated

Was this helpful?