collision icon indicating copy to clipboard operation
collision copied to clipboard

Configure Phpunit\Style "ignoreFilesIn"

Open kbond opened this issue 3 years ago • 3 comments
trafficstars

I know this was rejected in https://github.com/nunomaduro/collision/pull/183 but can I ask this be reconsidered? I have several paths I'd like to exclude to help make the failure output more useful to me. It doesn't make sense to add these to this repo directly (which appears to be the only option right now).

Maybe there could be a different way to configure? tests/bootstrap.php maybe?

// tests/bootstrap.php

NunoMaduro\Collision\Adapters\Phpunit\Style::addToErrorIgnore([
    '/vendor\/foo\/bar/',
    '/vendor\/bar\/baz/',
]);

kbond avatar Feb 04 '22 20:02 kbond

I think this would be better as mentioned as part of a PHP entry method, rather than as part of the phpunit.xml 👍🏻 It could be quite useful for things such as private app-specific exclusions.

owenvoke avatar Feb 05 '22 08:02 owenvoke

Cool, I'll put together a PR.

kbond avatar Feb 05 '22 16:02 kbond

I'm asking in which cases we want to show the line from vendor directory? So maybe all from vendor should be excluded by default? So we always get the line which we are calling.

alexander-schranz avatar Feb 09 '22 13:02 alexander-schranz

I think is a good idea, yet needs to be something like:

NunoMaduro\Collision::ignoreSomething...

nunomaduro avatar Sep 13 '22 05:09 nunomaduro