https://github.com/phpro/grumphp

A PHP code-quality tool

https://github.com/phpro/grumphp

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 219 committers (0.5%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.7%) to scientific vocabulary

Keywords

code-quality composer-plugin git-hooks hacktoberfest php

Keywords from Contributors

distributed operating-system deep-neural-networks cryptocurrencies embeddings interactive sequencing interpretability ecosystem-models networks
Last synced: 5 months ago · JSON representation

Repository

A PHP code-quality tool

Basic Info
  • Host: GitHub
  • Owner: phpro
  • License: mit
  • Language: PHP
  • Default Branch: v2.x
  • Homepage:
  • Size: 20 MB
Statistics
  • Stars: 4,235
  • Watchers: 73
  • Forks: 439
  • Open Issues: 3
  • Releases: 105
Topics
code-quality composer-plugin git-hooks hacktoberfest php
Created almost 11 years ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License Security

README.md

Github Actions AppVeyor Installs Packagist

Twitter Join the chat at https://gitter.im/phpro/grumphp

GrumPHP

Sick and tired of defending code quality over and over again? GrumPHP will do it for you! This composer plugin will register some git hooks in your package repository. When somebody commits changes, GrumPHP will run some tests on the committed code. If the tests fail, you won't be able to commit your changes. This handy tool will not only improve your codebase, it will also teach your co-workers to write better code following the best practices you've determined as a team.

GrumPHP has a set of common tasks built-in. You will be able to use GrumPHP with a minimum of configuration.

We don't want to bore you with all the details, so quick: install it yourself and unleash the power of GrumPHP!

Demo

demo

Installation

In order for this package to work, you have to make sure following tools are discoverable on the command-line:

  • php
  • composer
  • git

This package is a composer plugin and should be installed to your project's dev dependency using composer:

Install GrumPHP as a phar without dependencies: sh composer require --dev phpro/grumphp-shim

Install GrumPHP with dependencies: composer require --dev phpro/grumphp

Install GrumPHP without dependencies and automated git hooks through phive phive install grumphp

When the package is installed, GrumPHP will attach itself to the git hooks of your project. You will see following message in the composer logs:

Watch out! GrumPHP is sniffing your commits!

GrumPHP will never push you into using a specific task. You can choose the tasks that fit your needs, and activate or deactivate any task in no time! See the suggest section in composer.json.

Note: GrumPHP will overwrite existing hooks unless you run composer install with --no-plugins or --no-scripts. We do create a backup of your git hook, but it's best to make sure you also have a backup of your custom hooks before you try to install GrumPHP.

Having trouble installing GrumPHP? Find out how to:

Configuration

Some things in GrumPHP can be configured in a grumphp.yml or grumphp.yml.dist or grumphp.dist.yml file in the root of your project (the directory where you run the grumphp command). You can specify a custom config filename and location in composer.json or in the --config option of the console commands.

```yaml

grumphp.yml

grumphp: hooksdir: ~ hookspreset: local githookvariables: VAGRANTHOSTDIR: . VAGRANTPROJECTDIR: /var/www EXECGRUMPHPCOMMAND: exec ENV: {} stoponfailure: false ignoreunstagedchanges: false hidecircumventiontip: false processtimeout: 60 ascii: failed: grumphp-grumpy.txt succeeded: grumphp-happy.txt parallel: enabled: true maxworkers: 32 fixer: enabled: true fixbydefault: false environment: files: [] variables: {} paths: [] tasks: {} testsuites: [] extensions: [] ```

Details of the configuration are broken down into the following sections.

Commands

Since GrumPHP is just a CLI tool, these commands can be triggered:

Compatibility

GrumPHP works with PHP 5.6 or above.

This package has been tested with following git clients:

  • CLI Unix
  • CLI Mac
  • CLI Windows
  • PhpStorm Git
  • Atlassian SourceTree
  • Syntevo SmartGit

Roadmap

Lots of tasks are already available to make sure your team writes great code. We are always looking to support new tasks. Feel free to log an issue or create a pull request for a task we forgot.

Are you missing a feature or did you find a bug? Log it in the issue tracker! Want to help out? Feel free to contact us!

FAQ

About

Submitting bugs and feature requests

Bugs and feature request are tracked on GitHub. Please take a look at our rules before contributing your code.

License

GrumPHP is licensed under the MIT License.

Owner

  • Name: PHPro
  • Login: phpro
  • Kind: organization
  • Location: Kontich, Belgium

GitHub Events

Total
  • Create event: 6
  • Release event: 6
  • Issues event: 15
  • Watch event: 103
  • Delete event: 2
  • Issue comment event: 68
  • Push event: 17
  • Pull request review event: 16
  • Pull request review comment event: 18
  • Pull request event: 35
  • Fork event: 17
Last Year
  • Create event: 6
  • Release event: 6
  • Issues event: 15
  • Watch event: 103
  • Delete event: 2
  • Issue comment event: 68
  • Push event: 17
  • Pull request review event: 16
  • Pull request review comment event: 18
  • Pull request event: 35
  • Fork event: 17

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 1,620
  • Total Committers: 219
  • Avg Commits per committer: 7.397
  • Development Distribution Score (DDS): 0.554
Past Year
  • Commits: 57
  • Committers: 18
  • Avg Commits per committer: 3.167
  • Development Distribution Score (DDS): 0.772
Top Committers
Name Email Commits
Toon Verwerft t****t@g****m 722
Lander Vanderstraeten l****n@p****e 97
Alexander Deruwe a****e@p****e 52
Kanti g****t@k****e 30
Bilge b****e@s****m 30
Michaël Jacobs m****2@g****m 27
Jonas Stendahl j****l@g****m 23
adev a****0@g****m 20
Olivier ALLAIN o****n@s****m 19
Igor Mukhin i****n@g****m 14
poppabear8883 s****x@g****m 13
Jeroen Tubex J****x 13
Jeffrey Cafferata j****y@j****l 13
Tom Bevers t****s@g****m 12
Yassine Guedidi y****e@g****m 11
Filippe PHPro f****s@p****e 11
Mattheo Geoffray m****y@g****m 11
Derek Stephen McLean d****k@g****m 11
Wouter Cleymans w****s@p****e 11
Jan Vernieuwe j****e@p****e 9
Bert Peters b****s@g****m 9
Alex Verbruggen v****x@g****m 9
Joe Stewart j****t@m****m 9
Gábor Egyed g****d@g****m 8
Johan Eklund h****o@j****m 8
Michael Fitzpatrick f****z@m****k 8
Mitchell McKenna m****a@g****m 8
dependabot[bot] 4****] 8
Jeroen de Graaf j****f@g****m 8
Pierre Rudloff p****f@i****p 7
and 189 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 81
  • Total pull requests: 111
  • Average time to close issues: 6 months
  • Average time to close pull requests: about 2 months
  • Total issue authors: 67
  • Total pull request authors: 56
  • Average comments per issue: 3.42
  • Average comments per pull request: 1.83
  • Merged pull requests: 85
  • Bot issues: 0
  • Bot pull requests: 10
Past Year
  • Issues: 4
  • Pull requests: 22
  • Average time to close issues: 11 days
  • Average time to close pull requests: 19 days
  • Issue authors: 4
  • Pull request authors: 13
  • Average comments per issue: 1.5
  • Average comments per pull request: 0.95
  • Merged pull requests: 17
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
  • veewee (4)
  • sandipansaha (3)
  • benr77 (3)
  • delboy1978uk (2)
  • adaniloff (2)
  • yguedidi (2)
  • TravisCarden (2)
  • prafullazee (2)
  • jigarius (2)
  • mischabraam (2)
  • palakaccorin (2)
  • drupol (2)
  • dxvargas (1)
  • nntoan (1)
  • pottink (1)
Pull Request Authors
  • veewee (23)
  • dependabot[bot] (15)
  • jreklund (5)
  • echernyavskiy (4)
  • saidatom (4)
  • peterjaap (4)
  • danepowell (3)
  • peter279k (3)
  • petrisorciprian-vitals (3)
  • naveensrinivasan (3)
  • bart-jaskulski (3)
  • claudiu-cristea (2)
  • wucdbm (2)
  • JTubex (2)
  • mrmishmash (2)
Top Labels
Issue Labels
help wanted (16) question (13) bug (12) enhancement (10) Windows (3) easy-pick (3) Feature Request (2) Needs Documentation (1) wip (1) RFC (1)
Pull Request Labels
enhancement (67) dependencies (15) inactive (9) Documentation (8) php (6) BC BREAK (4) hacktoberfest (2) new feature (1) wip (1) bug (1) github_actions (1)

Packages

  • Total packages: 2
  • Total downloads:
    • packagist 13,471,620 total
  • Total docker downloads: 253
  • Total dependent packages: 1,121
    (may contain duplicates)
  • Total dependent repositories: 2,147
    (may contain duplicates)
  • Total versions: 210
  • Total maintainers: 1
packagist.org: phpro/grumphp

A composer plugin that enables source code quality checks.

  • License: MIT
  • Latest release: v2.15.0
    published 6 months ago
  • Versions: 105
  • Dependent Packages: 1,121
  • Dependent Repositories: 2,147
  • Downloads: 13,471,620 Total
  • Docker Downloads: 253
Rankings
Dependent packages count: 0.0%
Stargazers count: 0.1%
Forks count: 0.1%
Dependent repos count: 0.2%
Average: 0.2%
Downloads: 0.3%
Docker downloads count: 0.8%
Maintainers (1)
Funding
Last synced: 6 months ago
proxy.golang.org: github.com/phpro/grumphp
  • Versions: 105
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.5%
Average: 6.7%
Dependent repos count: 7.0%
Last synced: 6 months ago

Dependencies

composer.json packagist
  • amphp/sync ^v1.4 development
  • brianium/paratest ^6.4 development
  • composer/composer ^2.2.6 development
  • nikic/php-parser ~4.13 development
  • php-parallel-lint/php-parallel-lint ^1.3 development
  • phpspec/phpspec ^7.2 development
  • phpspec/prophecy-phpunit ^2.0 development
  • phpunit/phpunit ^9.5.13 development
  • amphp/amp ^2.6
  • amphp/parallel ^1.4
  • amphp/parallel-functions ^1.1
  • composer-plugin-api ~2.0
  • doctrine/collections ^1.6.8 || ^2.0
  • ext-json *
  • gitonomy/gitlib ^1.3
  • laravel/serializable-closure ^1.1
  • monolog/monolog ^2.0 || ^3.0
  • ondram/ci-detector ^4.0
  • php ^8.0
  • psr/container ^1.1 || ^2.0
  • seld/jsonlint ~1.8
  • symfony/config ~5.4 || ~6.0
  • symfony/console ~5.4 || ~6.0
  • symfony/dependency-injection ~5.4 || ~6.0
  • symfony/dotenv ~5.4 || ~6.0
  • symfony/event-dispatcher ~5.4 || ~6.0
  • symfony/filesystem ~5.4 || ~6.0
  • symfony/finder ~5.4 || ~6.0
  • symfony/options-resolver ~5.4 || ~6.0
  • symfony/process ~5.4 || ~6.0
  • symfony/yaml ~5.4 || ~6.0