Download the PHP package df/php-coverfish without Composer

On this page you can find all versions of the php package df/php-coverfish. 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-coverfish

PHPCoverFish

phpCoverFish (coverfish) is an open source php cli static code validator used for code coverage pre-processing. coverFish will analyze all of your @covers annotations inside your test files before the big code coverage train will run through all of your tests and may collide with bad coverage annotations scattered along the rails. Coverfish is using plugin base validators and is easy to extend / fulfill changes or extension in code coverage annotations.

Build Status Scrutinizer Code Quality Code Climate Code Coverage

Installation

If you use Composer to manage the dependencies of your project, edit your projects composer.json file and add a dependency on df/phpcoverfish. Below you can find find a minimal example of a composer.json file that just defines a dev-time dependency on PHPCoverFish (stable strain):

...
{
    "require-dev": {
        "df/php-coverfish": "~1.0"
}
...

You can also execute the following composer command in your console:

composer require df/php-coverfish

In order to use upcoming PHPCoverFish beta releases you will need to take down the minimum-stability key in your composer.json file (set "beta"). Simply place this line above your "extra" property key:

...
"minimum-stability": "beta",
"extra": {
...

Afterwards, just call composer install "df/phpcoverfish=~1.0" or use composer update and create a symbolic link from vendor/df/coverfish/bin/coverfish.php to your web application tool directory (this step is optional).

composer install "df/php-coverfish=~1.0"

To provide coverfish system-wide just type the following command:

composer global require "df/php-coverfish=~1.0"

Don't forget to make sure you've got your composers vendor binary path available in your global shell path:

PATH=$PATH:~/.composer/vendor/bin/

As soon as coverfish will reach it's stable state we will not only provide an additional phar file but also a corresponding download link / installer for wget related installation of PHPCoverFish.

Usage

To call coverfish from your shell after installation use the following two modes: if you bound coverfish in your symfony application, composer will be create a symbolic link inside your bin/ directory so you can call this tool like others (phpunit, ...) from this path directly.

PHPUnit-Mode scan (the recommended scan mode), using existing phpunit.xml instead of "raw" parameter for scan-path, exclude-path and autoload-file:

php ./bin/coverfish scan tests/phpunit.xml \
        --phpunit-config-suite "PHPCoverFish Suite" \ 
        --output-level 1 \
        --no-ansi

for example (using phpunit.xml without any test suite name will take first test suite configuration for this scan) :

php ./bin/coverfish scan tests/phpunit.xml --output-level 1 --no-ansi

or (using phpunit test suite name "PHPCoverFish Suite" ):

php ./bin/coverfish scan tests/phpunit.xml --phpunit-config-suite "PHPCoverFish Suite" --output-level 1 --no-ansi   

the screen result for code with and without called test suite should be the same:

phpunit mode result

RAW-Mode scan (alternative scan mode), using additional parameters for required scan-path, autoload-file (exclude path will be used optional here)

php <path/to/your/coverfish/vendor/>bin/coverfish.php *scan* \
        --raw-scan-path "<path/to/your/phpunit/tests>" \
        --raw-autoload-file "<path/to/your/autoload.php>" \
        --raw-exclude-path "<path/to/your/excluded/test/files>"

for example:

php ./bin/coverfish scan --raw-scan-path tests/ --raw-autoload-file "vendor/autoload.php" --raw-exclude-path "tests/data" --output-level 1 --no-ansi

the result should looking like: raw mode result

PHPCoverfish arguments and parameter

To call the PHPCoverFish help page use:

php <path/to/your/coverfish/vendor/>bin/coverfish.php help scan

Arguments

scan                     scan/analyze command (currently the only available mode of coverfish)
phpunit-config           path to your project phpunit.xml config file (e.g. tests/phpunit.xml)
                         this argument override all raw-parameters (raw-scan-path, raw-autoload-path ...)

Parameters (optional)

raw-scan-path            path to your target php unit class test files or a single test file
raw-exclude-path         exclude a specific path from your planned scan 
raw-autoload-file        your application used autoload file (psr-0/psr-4 standard)
                         will be replaced by phpunit.xml file in our upcoming beta version
-f | --output-format     json, text (default) - rendering of scan result output format (json or text)
-l | --output-level      detail of scan result output (0=minimal, 1=normal(default), 2=detailed)
-n | --no-interaction    not necessary, no virtual interaction planned yet
-v | --verbose           will be handled by option '--output-level <n>'
-q | --quiet             if you fetch results in json format, you can hide direct output and analyse results as as a json object directly

--no-ansi                prevent colorful output of rendering results (default: false | 0)
--stop-on-error          stop on first application error | exception (default: false | 0)
--stop-on-failure        stop on first detected coverFish scan failure (default: false | 0)

Missing features, annoying bugs and project thoughts

Feel free to contact us for missing features, discovered bugs or nice ideas around this project :)

We are currently working on:

Some screenshots of result screens

Depending on the chosen --output-level option coverfish will provide different output of test results

using minimal output level (—ouput-level 0), no errors in code coverage found Level 0, test validated same mode, errors in code coverage identified Level 0, test failed

using moderate (default) output level (—ouput-level 1) Level 1, test validated same mode, errors in code coverage identified and shown detailed Level 1, test failed

and using maximum output level, showing partial output of large screen result (—ouput-level 2) Level 2, test validated same mode, errors in code coverage identified and shown more detailed Level 2, test failed

Version and compatibility

Please use our latest stable version 1.0.2 of phpCoverFish for your productive static code analyzing process. This Documentation was last updated on 2018-05-15 (internal version 1.0.2)

phpCoverFish (>= 1.0.2) works fine with php7.0, php7.1 and php7.2 phpCoverFish (<= 1.0.1) is compatible with php5.5, php5.6 and php7.n

Contribute

PHPCoverFish is still under development and contributors are always welcome! Feel free to join our coverFish distributor team. Please refer to CONTRIBUTING.md to find out how to contribute to the PHPCoverFish Project.

License

Copyright (c) 2015 - 2018 Patrick Paechnatz [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


All versions of php-coverfish with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
symfony/console Version >=2.3
phpunit/php-token-stream Version ~1.2
sebastian/finder-facade Version ~1.1
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 df/php-coverfish contains the following files

Loading the files please wait ....