Download the PHP package digitalrevolution/phpunit-file-coverage-inspection without Composer

On this page you can find all versions of the php package digitalrevolution/phpunit-file-coverage-inspection. 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 phpunit-file-coverage-inspection

Minimum PHP Version Run tests

PHPUnit coverage inspection

A tool to allow code coverage rules be defined per file. Set a minimum coverage threshold for every file and configure custom minimum coverage for existing files if the current test coverage is not up to standards yet. Inspection failure will be output in checkstyle format, allowing it to be imported in ci/cd tools.

Use case

Standard coverage calculation is calculated over the whole codebase. If for example the threshold is 80% and one file drops below 80% you never notice this because the overall coverage went from 87.6% to 87.4%. This package makes sure that that doesn't happen anymore and coverage is calculated on a per-file basis.

Supported formats

Installation

Include the library as dependency in your own project via:

Configuration

File: phpfci.xml

Option Required Default Description
min-coverage yes - The minimum global coverage
allow-uncovered-methods no false All methods should have atleast some coverage

or generate a config file based on existing coverage results

The base directory will be subtracted from the filepaths in coverage.xml

Usage

Checkstyle format:

Gitlab format:

Gitlab format to file and text output to stdout:

Text format to stdout:

Command line arguments

Option Values Description
argument 1 inspect, baseline the command to execute.
argument 2 coverage.xml the phpunit clover coverage input file.
--reportGitlab=[<file>] filepath or if absent stdout the file (or stdout) to write the gitlab format to.
--reportCheckstyle=[<file>] filepath or if absent stdout the file (or stdout) to write the checkstyle format to.
--reportText=[<file>] filepath or if absent stdout the file (or stdout) to write the checkstyle format to.
--config=<path-to-file> phpfci.xml the path to the config file.
--baseDir=<path> defaults to directory of the output file The root directory of the project, will be used to make paths relative.
--exit-code-on-failure - Set exit code to 1 when there are failures.

Note: if no --reportGitlab, --reportCheckstyle or --reportText is set, it will default to --reportText=php://stdout

Migrating from 1 to 2

The third required argument and --report has been removed, and should be replaced by: --reportGitlab=<file>, --reportCheckstyle=<file> or --reportText=<file>

About us

At 123inkt (Part of Digital Revolution B.V.), every day more than 50 development professionals are working on improving our internal ERP and our several shops. Do you want to join us? We are looking for developers.


All versions of phpunit-file-coverage-inspection with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-dom Version *
ext-json Version *
ext-libxml Version *
ext-xmlwriter Version *
symfony/console Version ^6.2 || ^7.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 digitalrevolution/phpunit-file-coverage-inspection contains the following files

Loading the files please wait ....