项目作者: frieser

项目描述 :
Quality Analyzer Bundle for Symfony
高级语言: PHP
项目地址: git://github.com/frieser/qa-bundle.git
创建时间: 2016-12-06T19:56:16Z
项目社区:https://github.com/frieser/qa-bundle

开源协议:Other

下载


Symfony QA Bundle

Bundle to check the quality of the changes in a Symfony project.

Run it

Just commit!

  1. $ git commit

Screehot of QaBundle

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:

  1. $ 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.

Step 2: 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:

  1. <?php
  2. // app/AppKernel.php
  3. // ...
  4. class AppKernel extends Kernel
  5. {
  6. public function registerBundles()
  7. {
  8. if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
  9. // ...
  10. $bundles[] = new Frieserlabs\Bundle\QABundle\FrieserlabsQABundle();
  11. // ...
  12. }
  13. // ...
  14. }
  15. // ...
  16. }

Step 3: Enable Composer script handler

You have to enable the script handler in your composer.json to auto install the git hooks in your project:

  1. "scripts": {
  2. ...
  3. "post-install-cmd": [
  4. ...
  5. "Frieserlabs\\Bundle\\QABundle\\Composer\\ScriptHandler::EnableGitHooks",
  6. ...
  7. ],
  8. ...
  9. "post-update-cmd": [
  10. ...
  11. "Frieserlabs\\Bundle\\QABundle\\Composer\\ScriptHandler::EnableGitHooks",
  12. ...
  13. ]
  14. ...
  15. },

Configuration

For example:

  1. frieserlabs_qa:
  2. pre_commit:
  3. tools:
  4. phplint:
  5. phpunit:
  6. phpcs:
  7. critical: false
  8. phpcs_fixer:
  9. critical: false
  10. phpmd:
  11. critical: false
  12. composer_check:

Create your own tools

TODO

TODO

TODO