Bundle to check the quality of the changes in a Symfony project.
Just commit!
$ git commit
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require --dev frieserlabs/qa-bundle "~0.1"
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
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()
{
if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
// ...
$bundles[] = new Frieserlabs\Bundle\QABundle\FrieserlabsQABundle();
// ...
}
// ...
}
// ...
}
You have to enable the script handler in your composer.json to auto install the git hooks in your project:
"scripts": {
...
"post-install-cmd": [
...
"Frieserlabs\\Bundle\\QABundle\\Composer\\ScriptHandler::EnableGitHooks",
...
],
...
"post-update-cmd": [
...
"Frieserlabs\\Bundle\\QABundle\\Composer\\ScriptHandler::EnableGitHooks",
...
]
...
},
For example:
frieserlabs_qa:
pre_commit:
tools:
phplint:
phpunit:
phpcs:
critical: false
phpcs_fixer:
critical: false
phpmd:
critical: false
composer_check:
TODO
TODO