1. Installation


We’re sorry but this documentation section is outdated. Please have that in mind when trying to use it. You can help us making documentation up to date via Sylius Github. Thank you!

We assume you’re familiar with Composer, a dependency manager for PHP. Use the following command to add the bundle to your composer.json and download package.

If you have Composer installed globally.

composer require sylius/order-bundle

Otherwise you have to download .phar file.

curl -sS https://getcomposer.org/installer | php
php composer.phar require sylius/order-bundle

1.1. Adding required bundles to the kernel

First, you need to enable the bundle inside the kernel.

If you’re not using any other Sylius bundles, you will also need to add SyliusResourceBundle and its dependencies to the kernel. Don’t worry, everything was automatically installed via Composer.

// app/AppKernel.php

public function registerBundles()
    $bundles = array(
        new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
        new FOS\RestBundle\FOSRestBundle(),
        new JMS\SerializerBundle\JMSSerializerBundle(),
        new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
        new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),

        new Sylius\Bundle\ResourceBundle\SyliusResourceBundle(),
        new Sylius\Bundle\MoneyBundle\SyliusMoneyBundle(),
        new Sylius\Bundle\OrderBundle\SyliusOrderBundle(),

        // Other bundles...
        new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),

1.2. Updating database schema

Remember to update your database schema.

For “doctrine/orm” driver run the following command.

php bin/console doctrine:schema:update --force


This should be done only in dev environment! We recommend using Doctrine migrations, to safely update your schema.