Download the PHP package aretche/php-code-quality without Composer

On this page you can find all versions of the php package aretche/php-code-quality. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-code-quality

Build Status Code Style

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

FriendsOfPHP/PHP-CS-Fixer

Currently used for fixing the code.
Fixes all files in src directory according Symfony coding guidelines.

This package is not used for checking (linting), because PHP_Codesniffer prints a more readable output.

squizlabs/PHP_CodeSniffer

Currently used for checking (linting) the code.
Sniffs all files in src directory.

This package could also be used for fixing, but PHP-CS-Fixer does it better.

phpmd/phpmd

Used for mess detection.
Runs the defined ruleset (config/phpmd.xml) on all files in src directory.

phpstan/phpstan

Used for static analysis.
Perform static analysis on all files in src directory.

phpunit/phpunit

Used for testing the code.
Must be configured with a phpunit.xml file in your root folder.

lchrusciel/api-test-case

Based on PHPUnit and used for testing API methods.

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.

Installation

Run composer require --dev aretche/php-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

lint

static

md

fix

unit-test

unit-coverage

check-coverage

spec-test

spec-coverage

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 php-code-quality with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
squizlabs/php_codesniffer Version ^3.5
friendsofphp/php-cs-fixer Version ^2.16
phpmd/phpmd Version ^2.7
phpstan/phpstan Version ^0.11.19
phpstan/phpstan-doctrine Version ^0.11.6
phpstan/phpstan-symfony Version ^0.11.6
karriere/phpspec-matchers Version ^3.0
friends-of-phpspec/phpspec-code-coverage Version ^4.3
phpspec/phpspec Version ^5.0
phpunit/phpunit Version ^6.0|^7.0
lchrusciel/api-test-case Version ^3.1
symfony/console Version ^3.2 || ^4.0
symfony/process Version ^3.2 || ^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package aretche/php-code-quality contains the following files

Loading the files please wait ...