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

Support for Read-Only PDO in QueryCollector #1365

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

iamacarpet
Copy link
Contributor

Hello,

We've run into a few problems using Debugbar on our project as it is configured read-only.

To ensure there are no development mistakes, the read connection is configured with a live DB instance and the write connection is configured with invalid details, so it'll throw an error if anyone tries to write to the DB.

Debugbar appears to be trying to use the write connection rather than read, with read being Laravel's default for SELECT statements (and it would also be fine for EXPLAIN SELECT).

Would you consider replicating Laravel's default behaviour with this change to use the read PDO when nothing other than SELECTs are being used?

Regards,
iamacarpet

@iamacarpet
Copy link
Contributor Author

@barryvdh we are still seeing this problem on Laravel 11.x with the latest version of debug bar.

Any chance you'd consider merging this please?

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

Successfully merging this pull request may close these issues.

None yet

1 participant