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

Tracy distributed in phar file doesn't work on PHP7 from version 2.9.5 #562

Closed
lysyjan opened this issue May 4, 2023 · 1 comment
Closed

Comments

@lysyjan
Copy link

lysyjan commented May 4, 2023

From Version: 2.9.5 to 2.9.7

Bug Description

The class \Tracy\DefaultBarPanel cannot be found because PHP code in phar files is without new lines, and class attribute #[\AllowDynamicProperties] is considered as a one-line comment.

PHP Fatal error:  Uncaught Error: Class 'Tracy\DefaultBarPanel' not found in phar:///var/www/html/sandbox/tracy.phar/Tracy/Debugger/Debugger.php:435
Stack trace:
#0 phar:///var/www/html/sandbox/tracy.phar/Tracy/Debugger/Debugger.php(478): Tracy\Debugger::getBar()
#1 phar:///var/www/html/sandbox/tracy.phar/Tracy/Debugger/Debugger.php(276): Tracy\Debugger::getStrategy()
#2 /var/www/html/sandbox/sandbox.php(5): Tracy\Debugger::renderLoader()
#3 {main}
  thrown in phar:///var/www/html/sandbox/tracy.phar/Tracy/Debugger/Debugger.php on line 435

Steps To Reproduce

  1. Download tracy.phar
  2. Require tracy via phar file
  3. Call \Tracy\Debugger::renderLoader();
  4. Observe the error

Expected Behavior

Render Tracy without an error.

Possible Solution

In my opinion, the easier solution is to mark version 2.9.5 and higher as incompatible with PHP 7.*

@dg
Copy link
Member

dg commented Jul 30, 2023

Thanks, fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants