Paraunit 0.9: PHP 7, PHPUnit 6 and the pipelines

This is a republished tag announcement for facile-it/paraunit. You can find the release here.

After a long time and a lot of work, Paraunit 0.9 has been released. This release is a big step ahead: now Paraunit runs with PHPUnit 6, and support to older versions is dropped; this also means that the minimum supported PHP version is now 7.0, and the minimum version of the Symfony components is bumped to 2.7, since older versions are out of support since may.

All these changes brought along a lot of refactoring, and I took the occasion to sprinkle scalar and return types everywhere in the code (see #93); this was also behind a blog post of mine that I wrote in response to the “visual debt” controversy.

But the biggest change of all is the new pipeline system: now every test is run in a pipeline collection, where each pipe is numbered. This number is the injected in the test as an environment variable, meaning that Paraunit itself can be leveraged to achieve separation in resource access while testing your application. More details on this feature are available in the documentation.

Here’s the full changelog:

Changed

  • Implement pipelines: now every single test process has an environment variable called PARAUNIT_PIPELINE_NUMBER injected which is a number that identifies the pipeline in which the test is executed; it can be used as a discriminator to access a different set of resources (i.e. a different copy of a test DB). See the documentation for more details.
  • Support for PHPUnit 6
  • Drop support for PHPUnit 4 & 5
  • Minimum PHP version required: 7.0
  • Improvement to the whole codebase (scalar and return type hints, strict types enforced, see #93)
  • Realign options passed through to PHPUnit:
    • Added --strict-coverage
    • Added --disallow-resource-usage
    • Added --no-coverage
    • Added --no-extensions
    • Changed --report-useless-tests to --dont-report-useless-tests
    • Changed --no-globals-backup to --globals-backup

Fixed

  • The --repeat option now works correctly (see #92)
  • The PHPUnit configuration is no longer copied temporarily in the current working folder, it’s no longer needed