Download the PHP package teamntime/grumphp-phpunit-diff without Composer

On this page you can find all versions of the php package teamntime/grumphp-phpunit-diff. 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 grumphp-phpunit-diff

GrumPHP PHPUnit Diff Task

Whoa, another PHPUnit task for GrumPHP? Well kind of.

We at Team n Time run GrumPHP both on our development machines and on our CI servers. All of our PHPUnit test suites run on CI to ensure we didn't create a regression or broke something. You could opt to run your testsuites also locally but that might not always be practical. If you get over a certain amount of assertions, this could become cumbersome.

For us, the goal is to balance not wasting developer hours vs. not wasting CI runs. It's in this balancing act that we've dreamt up having tooling that runs just tests on the difference. But what does that mean? GrumPHP handily provides you with the file names of the changed files, but there is no standard that makes locating test files of PHP classes easy.

That's where this task comes in. It allows you to define the structure of your project by creating a simple PHP function that gives you the PHP class filepath and allows you to define where it's test is located. We do this with simple str_replace, but you might opt for any other strategy.

Install and using

Install by running composer:

Create a PHP file with your location function that have the following structure:

If you would like to see a more in-depth example, you can reference the default implementation

Update your grumphp.yml file:

How does it work?

There's two problems that this package solves:

  1. How to locate a test for a changed file/class: We've solved this by introducing a function that allows any project to customise how the relation between test <-> class is set up
  2. PHPUnit does not allow you to pass multiple files as arguments, only directories: We've solved this by duplicating the existing PHPUnit config and adding a Testsuite with the changed files.

All versions of grumphp-phpunit-diff with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
phpro/grumphp Version ^1.3.3
symfony/dependency-injection Version ^5.4|^6.1
symfony/process Version ^5.4|^6.1
symfony/options-resolver Version ^5.4|^6.1
symfony/filesystem Version ^5.4|^6.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 teamntime/grumphp-phpunit-diff contains the following files

Loading the files please wait ....