Commit 496dd305 authored by Fabrice Gangler's avatar Fabrice Gangler 🎨
Browse files

CHORE(git hooks): add GrumPHP (require-dev)

Documentation:
https://github.com/phpro/grumphp

Installation:
composer require --dev phpro/grumphp

Refs: #8
parent f26e17a6
......@@ -38,6 +38,7 @@
},
"require-dev": {
"fzaninotto/faker": "^1.9",
"phpro/grumphp": "^0.18.0",
"symfony/browser-kit": "5.0.*",
"symfony/css-selector": "5.0.*",
"symfony/debug-pack": "*",
......
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "8e21c3b6d23badbba23ad8c15fe12ab7",
"content-hash": "1bd0f4c341187428f76c1716b65ae915",
"packages": [
{
"name": "doctrine/annotations",
......@@ -6213,6 +6213,68 @@
],
"time": "2019-12-12T13:22:17+00:00"
},
{
"name": "gitonomy/gitlib",
"version": "v1.2.0",
"source": {
"type": "git",
"url": "https://github.com/gitonomy/gitlib.git",
"reference": "a0bea921266ad1c9626d712e7f8687dcc08ca528"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/gitonomy/gitlib/zipball/a0bea921266ad1c9626d712e7f8687dcc08ca528",
"reference": "a0bea921266ad1c9626d712e7f8687dcc08ca528",
"shasum": ""
},
"require": {
"php": "^5.6 || ^7.0",
"symfony/process": "^3.4|^4.0|^5.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7|^6.5|^7.0",
"psr/log": "^1.0"
},
"suggest": {
"psr/log": "Required to use loggers for reporting of execution"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.2-dev"
}
},
"autoload": {
"psr-4": {
"Gitonomy\\Git\\": "src/Gitonomy/Git/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Graham Campbell",
"email": "graham@alt-three.com"
},
{
"name": "Julien Didier",
"email": "genzo.wm@gmail.com"
},
{
"name": "Grégoire Pineau",
"email": "lyrixx@lyrixx.info"
},
{
"name": "Alexandre Salomé",
"email": "alexandre.salome@gmail.com"
}
],
"description": "Library for accessing git",
"homepage": "http://gitonomy.com",
"time": "2019-12-08T12:42:25+00:00"
},
{
"name": "nikic/php-parser",
"version": "v4.3.0",
......@@ -6330,6 +6392,160 @@
],
"time": "2020-02-17T08:14:38+00:00"
},
{
"name": "phpro/grumphp",
"version": "v0.18.0",
"source": {
"type": "git",
"url": "https://github.com/phpro/grumphp.git",
"reference": "b3d80bbcbac8068f21ea5f5da18a4af01d2d471d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpro/grumphp/zipball/b3d80bbcbac8068f21ea5f5da18a4af01d2d471d",
"reference": "b3d80bbcbac8068f21ea5f5da18a4af01d2d471d",
"shasum": ""
},
"require": {
"composer-plugin-api": "~1.0",
"doctrine/collections": "~1.2",
"ext-json": "*",
"gitonomy/gitlib": "^1.0.3",
"monolog/monolog": "~1.16 || ^2.0",
"php": "^7.2",
"seld/jsonlint": "~1.1",
"symfony/config": "~3.4 || ~4.0 || ~5.0",
"symfony/console": "~3.4 || ~4.0 || ~5.0",
"symfony/dependency-injection": "~3.4 || ~4.0 || ~5.0",
"symfony/event-dispatcher": "~3.4 || ~4.0 || ~5.0",
"symfony/filesystem": "~3.4 || ~4.0 || ~5.0",
"symfony/finder": "~3.4 || ~4.0 || ~5.0",
"symfony/options-resolver": "~3.4 || ~4.0 || ~5.0",
"symfony/process": "~3.4 || ~4.0 || ~5.0",
"symfony/yaml": "~3.4 || ~4.0 || ~5.0"
},
"require-dev": {
"brianium/paratest": "~3.1",
"composer/composer": "~1.9",
"ergebnis/composer-normalize": "~2.1",
"friendsofphp/php-cs-fixer": "~2.16",
"jakub-onderka/php-parallel-lint": "~1.0",
"nikic/php-parser": "~3.1",
"phpspec/phpspec": "~6.1",
"phpunit/phpunit": "^7.5.17",
"sensiolabs/security-checker": "~6.0",
"squizlabs/php_codesniffer": "~3.5"
},
"suggest": {
"atoum/atoum": "Lets GrumPHP run your unit tests.",
"behat/behat": "Lets GrumPHP validate your project features.",
"brianium/paratest": "Lets GrumPHP run PHPUnit in parallel.",
"codeception/codeception": "Lets GrumPHP run your project's full stack tests",
"codegyre/robo": "Lets GrumPHP run your automated PHP tasks.",
"designsecurity/progpilot": "Lets GrumPHP be sure that there are no vulnerabilities in your code.",
"doctrine/orm": "Lets GrumPHP validate your Doctrine mapping files.",
"ergebnis/composer-normalize": "Lets GrumPHP tidy and normalize your composer.json file.",
"friendsofphp/php-cs-fixer": "Lets GrumPHP automatically fix your codestyle.",
"friendsoftwig/twigcs": "Lets GrumPHP check Twig coding standard.",
"infection/infection": "Lets GrumPHP evaluate the quality your unit tests",
"jakub-onderka/php-parallel-lint": "Lets GrumPHP quickly lint your entire code base.",
"maglnet/composer-require-checker": "Lets GrumPHP analyze composer dependencies.",
"malukenho/kawaii-gherkin": "Lets GrumPHP lint your Gherkin files.",
"nikic/php-parser": "Lets GrumPHP run static analyses through your PHP files.",
"phan/phan": "Lets GrumPHP unleash a static analyzer on your code",
"phing/phing": "Lets GrumPHP run your automated PHP tasks.",
"phpmd/phpmd": "Lets GrumPHP sort out the mess in your code",
"phpspec/phpspec": "Lets GrumPHP spec your code.",
"phpstan/phpstan": "Lets GrumPHP discover bugs in your code without running it.",
"phpunit/phpunit": "Lets GrumPHP run your unit tests.",
"povils/phpmnd": "Lets GrumPHP help you detect magic numbers in PHP code.",
"roave/security-advisories": "Lets GrumPHP be sure that there are no known security issues.",
"sebastian/phpcpd": "Lets GrumPHP find duplicated code.",
"sensiolabs/security-checker": "Lets GrumPHP be sure that there are no known security issues.",
"squizlabs/php_codesniffer": "Lets GrumPHP sniff on your code.",
"sstalle/php7cc": "Lets GrumPHP check PHP 5.3 - 5.6 code compatibility with PHP 7.",
"symfony/phpunit-bridge": "Lets GrumPHP run your unit tests with the phpunit-bridge of Symfony.",
"symplify/easycodingstandard": "Lets GrumPHP check coding standard.",
"vimeo/psalm": "Lets GrumPHP discover errors in your code without running it."
},
"bin": [
"bin/grumphp"
],
"type": "composer-plugin",
"extra": {
"class": "GrumPHP\\Composer\\GrumPHPPlugin"
},
"autoload": {
"psr-4": {
"GrumPHP\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Toon Verwerft",
"email": "toon.verwerft@phpro.be"
},
{
"name": "Community",
"homepage": "https://github.com/phpro/grumphp/graphs/contributors"
}
],
"description": "A composer plugin that enables source code quality checks.",
"time": "2020-02-25T17:51:17+00:00"
},
{
"name": "seld/jsonlint",
"version": "1.7.2",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/jsonlint.git",
"reference": "e2e5d290e4d2a4f0eb449f510071392e00e10d19"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/e2e5d290e4d2a4f0eb449f510071392e00e10d19",
"reference": "e2e5d290e4d2a4f0eb449f510071392e00e10d19",
"shasum": ""
},
"require": {
"php": "^5.3 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
},
"bin": [
"bin/jsonlint"
],
"type": "library",
"autoload": {
"psr-4": {
"Seld\\JsonLint\\": "src/Seld/JsonLint/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "JSON Linter",
"keywords": [
"json",
"linter",
"parser",
"validator"
],
"time": "2019-10-24T14:27:39+00:00"
},
{
"name": "symfony/browser-kit",
"version": "v5.0.4",
......
parameters:
git_dir: ..
bin_dir: vendor/bin
ascii:
failed: ~
succeeded: ~
testsuites:
# test-suite for the "vendor/bin/grumphp git:commit-msg" command:
git_commit_msg:
tasks:
- git_commit_message
# test-suite for the "vendor/bin/grumphp git:pre-commit" command:
# ---> run following tasks only on files in the git "stage" (index) : added by "git add <file>"
git_pre_commit:
tasks:
- composer
# - phpcs
# - phplint
# - jsonlint
# - xmllint
# - yamllint
# - git_blacklist
# test-suite for the "vendor/bin/grumphp run --testsuite php_testSuite" command:
# ---> run following tasks on the full codebase
# php_testSuite:
# tasks:
# - phplint
# - phpcs
# - phpcpd
# test-suite for the "vendor/bin/grumphp run --testsuite php_testSuite_full" command:
# ---> run following tasks on the full codebase
# php_testSuite_full:
# tasks:
# - phplint
# - phpcs
# - phpcpd
# - phpmd
tasks:
##
######## git_commit_msg
##################################################################################################
##
## Blacklisted keywords: https://github.com/phpro/grumphp/blob/master/doc/tasks/git_blacklist.md
git_blacklist:
keywords:
- "die("
- "var_dump("
- "exit;"
- "exit();"
- "print_r("
- "dump(" # Symfony function
whitelist_patterns: []
triggered_by: ['php']
regexp_type: G
##
## Git commit message: https://github.com/phpro/grumphp/blob/master/doc/tasks/git_commit_message.md
git_commit_message:
allow_empty_message: false
enforce_capitalized_subject: true
enforce_no_subject_punctuations: false
enforce_no_subject_trailing_period: true
enforce_single_lined_subject: true
type_scope_conventions:
- types:
- build
- ci
- chore
- docs
- feat
- fix
- perf
- refactor
- revert
- style
- test
- scopes: []
max_body_width: 72
max_subject_width: 60
matchers: []
case_insensitive: true
multiline: true
additional_modifiers: ''
##
######## git_pre_commit
##################################################################################################
##
## Composer: https://github.com/phpro/grumphp/blob/master/doc/tasks/composer.md
composer:
file: ./composer.json
no_check_all: false
no_check_lock: false
no_check_publish: false
no_local_repository: false
with_dependencies: false
strict: false
##
## File size: https://github.com/phpro/grumphp/blob/master/doc/tasks/file_size.md
file_size:
max_size: 12M
ignore_patterns: []
##
## Composer Require Checker: https://github.com/phpro/grumphp/blob/master/doc/tasks/composer_require_checker.md
## -----> impossible to install at the moment because conflict between dependencies
# composer_require_checker:
# composer_file: 'composer.json'
# config_file: ~
# ignore_parse_errors: false
# triggered_by: ['composer.json', 'composer.lock', '*.php']
##
## PHP CodeSniffer: https://github.com/phpro/grumphp/blob/master/doc/tasks/phpcs.md
# phpcs:
# standard: []
# severity: ~
# error_severity: ~
# warning_severity: ~
# tab_width: ~
# report: full
# report_width: ~
# whitelist_patterns: []
# encoding: ~
# ignore_patterns: []
# sniffs: []
# triggered_by: [php]
# exclude: []
##
## PHP Copy/Paste Detector: https://github.com/phpro/grumphp/blob/master/doc/tasks/phpcpd.md
## -----> scan every file, everytime!
# phpcpd:
# metadata:
# blocking: false
# priority: 0
# directory: '.'
# exclude: ['vendor', 'tests/Fixture', 'tests/TestCase']
# names_exclude: []
# regexps_exclude: []
# fuzzy: false
# min_lines: 5
# min_tokens: 70
# triggered_by: ['php']
##
## PHP-CS-Fixer 2: https://github.com/phpro/grumphp/blob/master/doc/tasks/phpcsfixer2.md
## -----> not work at the moment with the code source
# phpcsfixer2:
# allow_risky: ~
# cache_file: ~
# config: ~
# rules: []
# using_cache: ~
# config_contains_finder: true
# verbose: true
# diff: false
# triggered_by: ['php']
##
## PHP Mess Detector: https://github.com/phpro/grumphp/blob/master/doc/tasks/phpmd.md
## -----> detects too many errors for the current source code
# phpmd:
# whitelist_patterns: []
# exclude: []
# ruleset: ['cleancode', 'codesize', 'naming']
# triggered_by: ['php']
##
## PhpMnd (detect magic numbers): https://github.com/phpro/grumphp/blob/master/doc/tasks/phpmnd.md
## -----> impossible to install at the moment because conflict between dependencies
# phpmnd:
# directory: .
# whitelist_patterns: []
# exclude: []
# exclude_name: []
# exclude_path: []
# extensions: []
# hint: false
# ignore_funcs: []
# ignore_numbers: []
# ignore_strings: []
# strings: false
# triggered_by: ['php']
##
## JsonLint: https://github.com/phpro/grumphp/blob/master/doc/tasks/jsonlint.md
# jsonlint:
# ignore_patterns: []
# detect_key_conflicts: false
##
## PHPLint: https://github.com/phpro/grumphp/blob/master/doc/tasks/phplint.md
# phplint:
# exclude: []
# jobs: ~
# short_open_tag: false
# ignore_patterns: []
# triggered_by: ['php']
##
## XmlLint: https://github.com/phpro/grumphp/blob/master/doc/tasks/xmllint.md
# xmllint:
# ignore_patterns: []
# load_from_net: false
# x_include: false
# dtd_validation: false
# scheme_validation: false
# triggered_by: ['xml']
##
## YamlLint: https://github.com/phpro/grumphp/blob/master/doc/tasks/yamllint.md
# yamllint:
# whitelist_patterns: []
# ignore_patterns: []
# object_support: false
# exception_on_invalid_type: false
# parse_constant: false
# parse_custom_tags: false
......@@ -93,6 +93,9 @@
"fzaninotto/faker": {
"version": "v1.9.1"
},
"gitonomy/gitlib": {
"version": "v1.2.0"
},
"jdorn/sql-formatter": {
"version": "v1.2.17"
},
......@@ -123,6 +126,9 @@
"phpdocumentor/type-resolver": {
"version": "1.0.1"
},
"phpro/grumphp": {
"version": "v0.18.0"
},
"psr/cache": {
"version": "1.0.1"
},
......@@ -138,6 +144,9 @@
"psr/log": {
"version": "1.1.2"
},
"seld/jsonlint": {
"version": "1.7.2"
},
"sensio/framework-extra-bundle": {
"version": "5.2",
"recipe": {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment