Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collision #6566

Open
wants to merge 7 commits into
base: 5.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 8 additions & 7 deletions composer.json
Expand Up @@ -28,13 +28,14 @@
"phpunit/php-timer": "^5.0.3",
"sebastian/comparator": "^4.0.5",
"sebastian/diff": "^4.0.3",
"symfony/console": ">=4.4.24 <7.0",
"symfony/css-selector": ">=4.4.24 <7.0",
"symfony/event-dispatcher": ">=4.4.24 <7.0",
"symfony/finder": ">=4.4.24 <7.0",
"symfony/yaml": ">=4.4.24 <7.0",
"symfony/var-dumper": ">=4.4.24 < 7.0",
"psy/psysh": "^0.11.2"
"symfony/console": ">=6.0 <7.0",
"symfony/css-selector": ">=6.0 <7.0",
"symfony/event-dispatcher": ">=6.0 <7.0",
"symfony/finder": ">=6.0 <7.0",
"symfony/yaml": ">=6.0 <7.0",
"symfony/var-dumper": ">=6.0 < 7.0",
"psy/psysh": "^0.11.2",
"nunomaduro/collision": "^6.3"
},
"require-dev": {
"ext-simplexml": "*",
Expand Down
17 changes: 17 additions & 0 deletions src/Codeception/Subscriber/Console.php
Expand Up @@ -38,7 +38,9 @@
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use NunoMaduro\Collision\Writer;

use Whoops\Exception\Inspector;
use function array_map;
use function array_merge;
use function array_reverse;
Expand Down Expand Up @@ -650,6 +652,21 @@ public function printExceptionTrace($exception): void
return;
}

$writer = (new Writer())->setOutput($this->output);
$inspector = new Inspector($exception);

$writer->ignoreFilesIn([
'/vendor\/codeception/',
'/vendor\/phpunit\/phpunit\/src/',
'/vendor\/mockery\/mockery/',
'/vendor\/laravel\/framework\/src\/Illuminate\/Testing/',
'/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Testing/',
]);

$writer->showTrace(false);
$writer->showTitle(false);
$writer->write($inspector);

if ($this->rawStackTrace) {
$this->message(OutputFormatter::escape(StackTraceFilter::getFilteredStacktrace($exception, true, false)))->writeln();

Expand Down