Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require bayardev/shared-tools-bundle
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Create an empty file named VERSION in root dir of the project
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php
file of your project:
<?php
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new Bayard\Bundle\SharedToolsBundle\BayardSharedToolsBundle(),
);
// ...
}
// ...
}
Before you can put this ScriptHandler in composer.json of your project ensure that you have in bundles list in APPKernel.php DoctrineMigrationsBundle :
<?php
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
);
// ...
}
// ...
}
Than you can add this in composer.json like this :
{
/*...*/
"scripts": {
/*...*/
"post-install-cmd": [
"@symfony-scripts",
"Bayard\\Bundle\\SharedToolsBundle\\Composer\\ScriptHandler::checkDoctrineMigrations"
]
/*...*/
}
/*...*/
}
Just add in your config.yml or/and in config_dev.yml, config_prod.yml theses parameters :
monolog:
handlers:
#...
syslog:
type: syslog
level: error
ident: app
facility: local7
formatter: bayardlog.formatter.syslog_line
Be free to chnage level parameter but you must leave intouched the others parameters for all Bayard Projects ...