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

No more backtrace when using PHAR #4594

Closed
theredled opened this issue Jan 26, 2021 · 1 comment
Closed

No more backtrace when using PHAR #4594

theredled opened this issue Jan 26, 2021 · 1 comment
Labels
type/bug Something is broken

Comments

@theredled
Copy link

Q A
PHPUnit version 9.5.1
PHP version 7.4.13
Installation Method PHAR

Summary

I don't have any backtrace anymore, all lines are filtered out in Filter::shouldPrintFrame.

It seems "logical" to me, as Filter::getFilteredStacktrace calls Filter::shouldPrintFrame with __PHPUNIT_PHAR_ROOT__ as a $prefix parameter.
But in Filter::shouldPrintFrame, a non-empty $prefix leads to an always-false return value at line 76 :

return $prefix === null && self::fileIsExcluded($file, $excludeList) && \is_file($file);

Therefore all lines are ignored.

Current behavior

I don't have any backtrace anymore, whatever error level it is.

How to reproduce

Produce an error or simply a failed assertion.

Expected behavior

Having a backtrace to debug the problem.

@theredled theredled added the type/bug Something is broken label Jan 26, 2021
@sebastianbergmann
Copy link
Owner

Duplicate of #4573.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something is broken
Projects
None yet
Development

No branches or pull requests

2 participants