Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Grumphp Laravel Package

phpro/grumphp

GrumPHP is a Composer plugin that installs Git hooks to run quality checks on every commit. It executes configured tasks like tests and linters, blocks failing commits, and helps teams enforce coding standards and best practices automatically.

View on GitHub
Deep Wiki
Context7

PHP-CS-Fixer fixer

The PHP-CS-Fixer task will run codestyle checks.

Composer

composer require --dev friendsofphp/php-cs-fixer

Config

The task lives under the phpcsfixer namespace and has following configurable parameters:

# grumphp.yml
grumphp:
    tasks:
        phpcsfixer:
            allow_risky: ~
            cache_file: ~
            config: ~
            rules: []
            using_cache: ~
            config_contains_finder: true
            verbose: true
            diff: false
            triggered_by: ['php']

allow_risky

Default: null

The allow_risky option allows you to set whether risky rules may run. Risky rule is a rule, which could change code behaviour. If not set, the default value is taken from config file (if it exists). By default, no risky rules are run.

cache_file

Default: null

You can change the location of the cache file by changing this property. When no cache_file is set, the default file .php-cs-fixer.cache will be used.

config

Default: null

By default, the .php-cs-fixer.php (local) or .php-cs-fixer.dist.php (to be distributed) will be used. You can specify an alternate location for this file by changing this option.

rules

Default: []

Rules may be specified as either a list or map. A list of rules may only turn certain rules on or off whereas a map may also configure rules where applicable.

In the following list-style example, PSR-2 rules are enabled but the line_ending rule is removed from the set, while the array_syntax rule is added.

rules:
    - '@[@PSR2](https://github.com/PSR2)'
    - -line_ending
    - array_syntax

The following map-style example is the same as the previous, except we take advantage of rule configuration to change the array_syntax validation mode to short array syntax ([]) instead of the default long syntax (array()).

rules:
    '[@PSR2](https://github.com/PSR2)': true
    line_ending: false
    array_syntax:
        syntax: short

Note that rule sets, beginning with the at symbol (@), must be escaped by being quoted and doubled due to limitations of the parser. However, when appearing in the key position as in the previous example, doubling is incorrect.

using_cache

Default: null

By using using_cache option you can set if the caching mechanism should be used. If not set, the default value is taken from config file (if it exists). The caching mechanism is enabled by default. This will speed up further runs by fixing only files that were modified since the last run. The tool will fix all files if the tool version has changed or the list of fixers has changed. Cache is supported only for tool downloaded as phar file or installed via composer.

config_contains_finder

Default: true

Intersection mode can only be used when you have a configuration file which contains a Finder. This mode works best since only files that are being commit and are in your configuration will be checked. When there is no Finder in your configuration, you'll have set this parameter to false. Otherwise, php-cs-fixer will crash the execution.

Note that activating this option with a consequent target directory will be slow on certain envs such as osx+docker.

verbose

Default: true

Show applied fixers.

diff

Default: false

Show the full diff that will be applied.

triggered_by

Default: [php]

This option will specify which file extensions will trigger the phpcsfixer task.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
cadot.eu/make
besmartand-pro/php-quality-config
sentix/ai-chatbot
codifyo/ts-generator-bundle
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky