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-resource '{"type": "vcs", "reference": "master", "url": "git@gitlab.openjetlab.fr:openjet/resource.git"}' && \
composer config repositories.openjet-resource-bundle '{"type": "vcs", "reference": "master", "url": "git@gitlab.openjetlab.fr:openjet/resource-bundle.git"}' && \
composer config repositories.openjet-serializer '{"type": "vcs", "reference": "master", "url": "git@gitlab.openjetlab.fr:openjet/serializer.git"}' && \
composer config repositories.openjet-tag '{"type": "vcs", "reference": "master", "url": "git@gitlab.openjetlab.fr:openjet/tag.git"}' && \
composer config repositories.openjet-tag-bundle '{"type": "vcs", "reference": "master", "url": "git@gitlab.openjetlab.fr:openjet/tag-bundle.git"}'
And use this command to add the bundle and download the package.
$ composer require openjet/tag-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 FOS\RestBundle\FOSRestBundle(),
new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
new Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle(),
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
new Sylius\Bundle\ResourceBundle\SyliusResourceBundle(),
new Openjet\Bundle\CoreBundle\OpenjetCoreBundle(),
new Openjet\Bundle\ResourceBundle\OpenjetResourceBundle(),
new Openjet\Bundle\TagBundle\OpenjetTagBundle(),
];
}
Congratulations! The bundle is now installed and ready to use.