fpondepeyre / php-conventions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP conventions

This development tool provides a pre-defined configuration for GrumPHP with the following checks enabled:

The package provides a default configuration for each task, and it's customizable at will through a simple configuration file.

The package will install the required dependencies, so it works out of the box.

Tasks can be also added or skipped according to your need.

The following versions of PHP are supported:

  • PHP 7.2

Installation

composer require agora/php-conventions --dev

If you're not using GrumPHP

Manually add to your composer.json file

    "extra": {
        "grumphp": {
            "config-default-path": "vendor/agora/php-conventions/config/grumphp.yml"
        }
    }

If you're using GrumPHP already

Edit the file grumphp.yml.dist or grumphp.yml and add on the top it:

imports:
  - { resource: vendor/agora/php-conventions/config/grumphp.yaml }

To add an extra Grumphp task:

imports:
  - { resource: vendor/agora/php-conventions/config/grumphp.yaml }

parameters:
  extra_tasks:
    infection: ~
  skip_tasks:
    - phpcsfixer

In conjunction with extra_tasks, use skip_tasks to skip tasks if needed.

About


Languages

Language:PHP 100.0%