Download the PHP package mediawiki/phpunit-patch-coverage without Composer

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

phpunit-patch-coverage

A tool to generate coverage reports for a Git patch without actually running the entire coverage report.

Purpose

Running PHPUnit coverage reports with Xdebug can be extremely slow. For example, the MediaWiki core coverage report takes around 2 hours to run. This makes it hard for developers to get quick feedback on their patches to see how they affected the overall coverage.

The goal of this is to be able to generate coverage reports for Git patches without running the full coverage tests.

Implementation

We look at the files that were changed in the last commit. We identify classes that were changed, as well as tests that were changed. We then find all the tests that cover those classes, and run the tests with coverage for those files.

Next we'll checkout the previous commit, and re-calculate to see which tests should be run (@covers and modified files). We'll re-run the coverage, and then diff the result!

There are probably plenty of edge cases where this won't work, but I think it will do reasonably well.

Usage

Add the composer dependency to your project:

The current working directory must be your git repository. With full options:

The options shown in the example above are the defaults, and do not need to be specified again. You may find it useful to have xdebug disabled by default, and then specify it at runtime with: php -d zend_extension=xdebug.so .... Or if you have a PHPUnit wrapper (like MediaWiki), you can call that.

License

phpunit-patch-coverage is (C) 2018 Kunal Mehta, under the terms of the GPL v3 or any later version. See COPYING for more details.


All versions of phpunit-patch-coverage with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4.0
nikic/php-parser Version ^4.15.1
phalcongelist/php-diff Version 2.0.4
symfony/console Version ^3.3 || ^4 || ^5 || ^6
symfony/finder Version ^3.3 || ^4 || ^5 || ^6
symfony/process Version ^3.3 || ^4 || ^5 || ^6
wikimedia/clover-diff Version ^2.0.0
wikimedia/scoped-callback Version ^1.0 || ^2.0 || ^3.0 || ^4.0 || ^5.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 mediawiki/phpunit-patch-coverage contains the following files

Loading the files please wait ....