phpunit-pretty-print icon indicating copy to clipboard operation
phpunit-pretty-print copied to clipboard

Support for PHPUnit 10 and Laravel 10.x

Open Braunson opened this issue 2 years ago • 10 comments

  • Add support for PHPUnit 10 (and Laravel 10.x in the process)
  • Added Travis support for testing in PHP 8.1

Braunson avatar Mar 03 '23 21:03 Braunson

The build with PHP 8.1 fails on travis. This is related to an outdated composer.lock file in this repository. I think we might need to do a bit of cleaning here before adding support to php 8.1.

ventrec avatar Mar 08 '23 08:03 ventrec

@ventrec Ah yeah, we'll need to switch away from listeners and to use the new Event/subscribers system for PHPUnit 10. I've made progress converting the package but I'm not sure how to override the output of PHPUnit. The write/writeWithColor methods don't seem to do anything now?

Braunson avatar Mar 08 '23 16:03 Braunson

FYI: I'm working on a PHPUnit pretty output based on https://pestphp.com/docs/installation. I'm using PHPUnit 10 and got an working example...

robiningelbrecht avatar Mar 29 '23 19:03 robiningelbrecht

@robiningelbrecht How close of a replacement to this package is it and when will it be ready?

Braunson avatar Apr 03 '23 16:04 Braunson

@Braunson it's ready and based on Pest PHPs output. Not sure if I should post it here? It's a separate repo

robiningelbrecht avatar Apr 03 '23 16:04 robiningelbrecht

@robiningelbrecht How close of a replacement to this package is it and when will it be ready?

Just check my repo's it's in the list :) Let me know what you think

robiningelbrecht avatar Apr 03 '23 17:04 robiningelbrecht

@robiningelbrecht I think it's this one, right? https://github.com/robiningelbrecht/phpunit-pretty-print

I love Pest output... so I'm on it :)

TomasVotruba avatar Aug 20 '23 10:08 TomasVotruba

@TomasVotruba indeed it is :)

robiningelbrecht avatar Aug 20 '23 10:08 robiningelbrecht

@robiningelbrecht I see :) thanks. I'm just trying it and it seems it can be only enabled in every run in xml. Is there some way to turn it optionally in the CLI? I want to have PHPUnit runner by default and enable this one only for debugging.

E.g.:

vendor/bin/phpunit --output-formatter=PrettyOne

Any idea how to achieve this?

TomasVotruba avatar Aug 20 '23 10:08 TomasVotruba

@TomasVotruba no, not right now. Could you create a feature request in the issue queue? I'll look into it. Let's move the discussion there

robiningelbrecht avatar Aug 20 '23 11:08 robiningelbrecht