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 8.0: TraceablePDO causes Fatal error #459

Open
caugner opened this issue Nov 30, 2020 · 11 comments
Open

PHP 8.0: TraceablePDO causes Fatal error #459

caugner opened this issue Nov 30, 2020 · 11 comments

Comments

@caugner
Copy link
Contributor

caugner commented Nov 30, 2020

Whoops\Exception\ErrorException thrown with message "Declaration of DebugBar\DataCollector\PDO\TraceablePDO::query($statement) must be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs)"

Stacktrace:
#2 Whoops\Exception\ErrorException in C:\***\vendor\maximebf\debugbar\src\DebugBar\DataCollector\PDO\TraceablePDO.php:146
#1 Whoops\Run:handleError in C:\***\vendor\filp\whoops\src\Whoops\Run.php:408
#0 Whoops\Run:handleShutdown in [internal]:0
@ynssenem
Copy link

ynssenem commented Dec 7, 2020

Hi, I also have this problem. We need update to PHP 8

@glensc
Copy link
Contributor

glensc commented Dec 10, 2020

#460 got merged but this is not auto-closed.

@IonBazan
Copy link

@barryvdh can you tag a new release including #460?

@phpfui
Copy link
Contributor

phpfui commented Jan 19, 2021

Any progress on PHP 8.0 support? I commented out Debug Bar for now, as it is completely broken in PHP 8.0. Sounds like a version tag issue. Any reason not to release label a v1.16.5 release? Seems like the last commit is pretty trivial and will fix the issue.

@barryvdh
Copy link
Collaborator

Isn't this fixed in v1.6.4?

@phpfui
Copy link
Contributor

phpfui commented Jan 19, 2021

From composer.lock:

        "name": "maximebf/debugbar",
        "version": "v1.16.4",

PHP 8.0.0:

Fatal error: Declaration of DebugBar\DataCollector\PDO\TraceablePDO::query($statement) must be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs)

Looks like the most recent commit will fix this.

@barryvdh
Copy link
Collaborator

I've tagged a new release, unfortunately it can take up to 24 hours to detect this tag, as the hook is not configured correctly and I can't change that.
You can use composer require maximebf/debugbar:1.16.x@dev for now

@phpfui
Copy link
Contributor

phpfui commented Jan 19, 2021

Awesome! Thanks. Not updated on Packagist yet, but I'll check tonight. Now to get my Slack library to update to 8.0.

@phpfui
Copy link
Contributor

phpfui commented Jan 20, 2021

Packagist has been updated. I upgraded and all good now. I think we can close this issue. Thanks again for the new tag.

@fisharebest
Copy link

fisharebest commented Jan 26, 2022

This still isn't included in the latest release?

No annotations or return type hint present in 1.17.3?

https://github.com/maximebf/php-debugbar/blob/v1.17.3/src/DebugBar/DataCollector/PDO/TraceablePDO.php#L32

@phpfui
Copy link
Contributor

phpfui commented Jan 26, 2022

There are still several outstanding PHP 8.1 issues. I put in PR #497 that should fix most of them. Since these are all trivial non logic type fixes, they should be no-brainers to merge and release. Right now, DebugBar does not work on PHP 8.1 really.

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

7 participants