Download the PHP package karriere/code-quality without Composer
On this page you can find all versions of the php package karriere/code-quality. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download karriere/code-quality
More information about karriere/code-quality
Files in karriere/code-quality
Package code-quality
Short Description Code Quality scripts that can be run via Composer.
License Apache-2.0
Informations about the package code-quality
❗️ This package is no longer being actively developed. ❗
Code Quality for PHP packages
This package provides code quality scripts that can be run via Composer.
The scripts also work on continous integration (CI) servers like Jenkins.
Used packages
phpspec/phpspec
Used for testing (SpecBDD) the code.
Must be configured with a phpspec.yml file in your root folder.
We are using the leanphp/phpspec-code-coverage extension for generating coverage reports.
This extension requires a phpspec-coverage.yml file in your root folder and Xdebug enabled.
squizlabs/PHP_CodeSniffer
Currently used for checking (linting) and fixing the code.
Sniffs all files in src directory.
phpmd/phpmd
Used for mess detection.
Runs the defined ruleset (config/phpmd.xml) on all files in src directory.
Installation
Run composer require --dev karriere/code-quality to install this package.
After installing, insert the desired scripts to your composer.json.
Usage
You can run a script like this: composer {script} -- {options}.
If you are using Git-Shell on Windows (or Git-Shell in Intellij Terminal on Windows), call scripts like this:
composer.bat {script}. Otherwise colors will not work.
You can disable TTY by adding the --notty flag (needed for Jenkins).
On Windows platform it's disabled automatically.
Scripts
test
coverage
lint
md
fix
Using custom matchers
This package integrates karriere/phpspec-matchers.
In order to use the custom matchers defined in this package,
please include the extension configuration in your phpspec.yml.
FAQ
Why do I have to provide two phpspec configuration files?
The code-coverage-extension slows down the phpspec tests, so we excluded it from the normal configuration file. Keep tests fast!
How do I increase the verbosity of the test-script output?
Run composer test -- -v.
All versions of code-quality with dependencies
dg/bypass-finals Version ^1.1
friends-of-phpspec/phpspec-code-coverage Version ^4.3
karriere/phpspec-matchers Version ^3.0
phpmd/phpmd Version ^2.6
phpspec/phpspec Version ^5.1 || ^6.0
squizlabs/php_codesniffer Version ^3.3
symfony/console Version ^3.2 || ^4.0
symfony/process Version ^3.2 || ^4.0