1. Installation¶
We assume you’re familiar with Composer and you have Composer installed globally.
Use the following command to add repository configuration to your composer.json.
composer config repositories.openjet-core '{"type": "vcs", "reference": "master", "url": "git@gitlab.openjetlab.fr:openjet/core.git"}' && \
composer config repositories.openjet-core-bundle '{"type": "vcs", "reference": "master", "url": "git@gitlab.openjetlab.fr:openjet/core-bundle.git"}' && \
composer config repositories.openjet-doctrine '{"type": "vcs", "reference": "master", "url": "git@gitlab.openjetlab.fr:openjet/doctrine.git"}' && \
composer config repositories.openjet-doctrine-bundle '{"type": "vcs", "reference": "master", "url": "git@gitlab.openjetlab.fr:openjet/doctrine-bundle.git"}'
And use this command to add the bundle and download the package.
$ composer require openjet/doctrine-bundle
1.1. Adding required bundles to the kernel¶
You need to enable the bundle inside the kernel.
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = [
new Openjet\Bundle\CoreBundle\OpenjetCoreBundle(),
new Openjet\Bundle\DoctrineBundle\OpenjetDoctrineBundle(),
];
}
Congratulations! The bundle is now installed and ready to use.