bayardev / shared-tools-bundle
Symfony Bundle with shared tools for Bayard projects (but every symfony project can use it)
Installs: 279
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 9
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.6
- doctrine/doctrine-migrations-bundle: ^1.2
- sensio/distribution-bundle: ^5.0
- symfony/symfony: >=2.7
- twig/extensions: ^1.2
Requires (Dev)
- phpspec/phpspec: 3.0.0
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2024-11-03 08:09:49 UTC
README
Installation
Step 1: Download the Bundle
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.
Step 2: Create VERSION file
Create an empty file named VERSION in root dir of the project
Step 3: Enable the Bundle
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(), ); // ... } // ... }
Use of ScriptHandler::checkDoctrineMigrations
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" ] /*...*/ } /*...*/ }
Use of syslog handler
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 ...