fourtekit / laragrum
A composer plugin for laravel that enables source code quality checks.
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:composer-plugin
Requires
- php: >=5.6.0
- composer-plugin-api: ~1.0
- composer/composer: ^1.0
- doctrine/collections: ~1.2
- gitonomy/gitlib: ^1.0.3
- monolog/monolog: ~1.16
- seld/jsonlint: ~1.1
- symfony/config: ~2.7|~3.0|~4.0
- symfony/console: ~2.7|~3.0|~4.0
- symfony/dependency-injection: ~2.7|~3.0|~4.0
- symfony/event-dispatcher: ~2.7|~3.0|~4.0
- symfony/filesystem: ~2.7|~3.0|~4.0
- symfony/finder: ~2.7|~3.0|~4.0
- symfony/options-resolver: ~2.7|~3.0|~4.0
- symfony/process: ~2.7|~3.0|~4.0
- symfony/yaml: ~2.7|~3.0|~4.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1|~2
- jakub-onderka/php-parallel-lint: ^0.9.2
- nikic/php-parser: ~2.1
- phpspec/phpspec: ^3.2.2
- phpspec/prophecy: ^1.6.2
- phpunit/phpunit: ^5.7.27|^6.4.4
- sebastian/comparator: ^1.2.4
- sensiolabs/security-checker: ^4.0
- squizlabs/php_codesniffer: ~2.4
Suggests
- atoum/atoum: Lets GrumPHP run your unit tests.
- behat/behat: Lets GrumPHP validate your project features.
- 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.
- friendsofphp/php-cs-fixer: Lets GrumPHP automatically fix your codestyle.
- 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.
- vimeo/psalm: Lets GrumPHP discover errors in your code without running it.
This package is not auto-updated.
Last update: 2024-11-14 11:05:13 UTC
README
This is purely inspired by GrumPHP. this is only a wrapper over original 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
Installation
If you are trying to install GrumPHP on Windows: please read the windows pre-install section.
This package is a composer plugin and should be installed to your project's dev dependency using composer:
composer require --dev FourtekIt/laraGrum
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
. Be sure to backup your 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
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.
# grumphp.yml parameters: bin_dir: "./vendor/bin" git_dir: "." hooks_dir: ~ hooks_preset: local stop_on_failure: false ignore_unstaged_changes: false hide_circumvention_tip: false process_async_limit: 10 process_async_wait: 1000 process_timeout: 60 ascii: failed: grumphp-grumpy.txt succeeded: grumphp-happy.txt tasks: ant: ~ atoum: ~ behat: ~ brunch: ~ clover_coverage: ~ codeception: ~ composer: ~ composer_require_checker: ~ composer_script: ~ deptrac: ~ doctrine_orm: ~ file_size: ~ gherkin: ~ git_blacklist: ~ git_branch_name: ~ git_commit_message: ~ grunt: ~ gulp: ~ infection: ~ jsonlint: ~ kahlan: ~ make: ~ npm_script: ~ phan: ~ phing: ~ php7cc: ~ phpcpd: ~ phpcs: ~ phpcsfixer: ~ phpcsfixer2: ~ phplint: ~ phpmd: ~ phpmnd: ~ phpparser: ~ phpspec: ~ phpstan: ~ phpunit: ~ phpversion: ~ progpilot: ~ psalm: ~ robo: ~ securitychecker: ~ shell: ~ xmllint: ~ yamllint: ~ testsuites: [] extensions: []
Details of the configuration are broken down into the following sections.
- Parameters – Configuration settings for GrumPHP itself.
- Tasks – External tasks performing code validation and their respective configurations.
- TestSuites
- Extensions
- Events
- Conventions checker
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. There is one major part missing before we can release v1.0.0:
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!
Solving issues
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.