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

PHP 7 Compatibility #497

Closed
iwex opened this issue May 11, 2016 · 19 comments
Closed

PHP 7 Compatibility #497

iwex opened this issue May 11, 2016 · 19 comments

Comments

@iwex
Copy link

iwex commented May 11, 2016

I have such exception:
FatalThrowableError in ExceptionsCollector.php line 28: Type error: Argument 1 passed to DebugBar\DataCollector\ExceptionsCollector::addException() must be an instance of Exception, instance of ParseError given, called in /home/iwex/vagrant/chicago/vendor/maximebf/debugbar/src/DebugBar/DataCollector/ExceptionsCollector.php on line 32

@barryvdh
Copy link
Owner

We can't typehint the new Errors right? So no typehinting at all then?

@iwex
Copy link
Author

iwex commented May 11, 2016

Hmm, is it possible to create a new branch for php7? For typehinting you can use Throwable interface.
Sorry for writing here.. I should write it to this repo

@marktopper
Copy link

@iwex did you create an issue about this on maximebf/php-debugbar?

@iwex
Copy link
Author

iwex commented May 16, 2016

@marktopper no :)

@barryvdh
Copy link
Owner

So perhaps just like this; remove the typehint and Check at runtime.
Seldaek/monolog@481fc4c

jamiehd added a commit to jamiehd/laravel-debugbar that referenced this issue Jun 10, 2016
jamiehd added a commit to jamiehd/laravel-debugbar that referenced this issue Jun 10, 2016
@tje3d
Copy link

tje3d commented Jul 12, 2016

Works fine with: PHP 7.0.4

@vjoao
Copy link

vjoao commented Jul 13, 2016

@tje3d
It's not working with PHP 7.0.5-2... should I downgrade?

@tje3d
Copy link

tje3d commented Jul 13, 2016

@vjoao
hmm, didnt tried that, im not sure with 7.0.5

@marktopper
Copy link

It should work in PHP 7.x when exceptions are thrown, but not when errors are thrown.

@vjoao
Copy link

vjoao commented Jul 14, 2016

It was a mistake on my side. Exceptions are namespaced and I forgot to use them.

@alejandrozorita
Copy link

alejandrozorita commented Jul 20, 2016

Hi!
I have the same problem with PHP 7.0.7...

@ThomasRalee
Copy link

@alejandrozorita
Same am facing problems with PHP 7.0.8

@barryvdh
Copy link
Owner

Can you try disabling collectors until it doesn't happen, so we can narrow down which one it is?
Or if it's the debugbar itself (without collectors)

@siegerhansma
Copy link

@barryvdh Just tried this. It seems to be the Exceptions collector that is giving issues.

@DrudgeRajen
Copy link

DrudgeRajen commented Sep 1, 2016

Same problem with 7.0.9 .

@mpathy
Copy link

mpathy commented Sep 5, 2016

Same with PHP 7.0.5-2 on a default Laravel Homestead

@iget-master
Copy link

iget-master commented Sep 15, 2016

Same problem here...

FatalThrowableError in ExceptionsCollector.php line 28:
Type error: Argument 1 passed to DebugBar\DataCollector\ExceptionsCollector::addException() must be an instance of Exception, instance of ParseError given, called in /home/esoares/Sandbox/cdtsys/vendor/maximebf/debugbar/src/DebugBar/DataCollector/ExceptionsCollector.php on line 32

@barryvdh
Copy link
Owner

Does the above commit fix it for you (Try ^2.3@dev)

@iget-master
Copy link

Fixed! :) Thanks!

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