Add this to your deps file:
[RelationBundle]
git=git://github.com/Ph3nol/RelationBundle
target=/bundles/Sly/RelationBundle
Then run vendors installation:
php bin/vendors install
Add this package to your composer.json
file:
"sly/relation-bundle": "dev-master"
Then make a Composer vendors installation/update:
php composer.phar install # or update
git submodule add git://github.com/Ph3nol/RelationBundle vendor/bundles/Sly/RelationBundle
git submodule update --init
<?php
// app/autoload.php
$loader->registerNamespaces(array(
// ...
'Sly' => __DIR__.'/../vendor/bundles',
));
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Sly\RelationBundle\SlyRelationBundle(),
);
}
Finally, you have to generate your database schema with this Symfony command:
php app/console doctrine:schema:update --force
Now, take a look at the usage part of this bundle.