Protoqol / Prequel

Prequel for Laravel. Clear and concise database management. Unfortunately, not actively maintained due to time constraints.
https://packagist.org/packages/protoqol/prequel
MIT License
1.54k stars 96 forks source link

[BUG] Undefined variable $className causing dd() when visiting /prequel #165

Closed caendesilva closed 6 months ago

caendesilva commented 7 months ago

Describe the bug Just installed Prequel and went to /prequel, only to be greeted with this:

ErrorException {#559 ▼ // vendor/protoqol/prequel/src/Http/Middleware/Authorised.php:74
  #message: "Undefined variable $className"
  #code: 0
  #file: "
vendor/protoqol/prequel/
src/Connection/DatabaseConnector.php"
  #line: 32
  #severity: E_WARNING
  trace: {▶}
}

To Reproduce Steps to reproduce the behavior:

  1. Follow readme install instructions
  2. Visit /prequel

PHP Version

Database type

caendesilva commented 7 months ago

Oh, I went further into the stacktrace and figured out that you don't support SQLite. https://github.com/Protoqol/Prequel/issues/46

Until that's supported, maybe throw a clearer exception?

QuintenJustus commented 7 months ago

@caendesilva Thank you for submitting this issue, a clearer exception is certainly more useful. Will pick this up when I have time for Prequel.

PhillipMwaniki commented 6 months ago

I have the same issue while using mysql

Update: I've figured out the issue. The problem occurs when the default database config has been renamed.

Solution: Default to mysql if the connection in use isn't part of the list.

PhillipMwaniki commented 6 months ago

Update Here is a fix https://github.com/Protoqol/Prequel/pull/166

QuintenJustus commented 6 months ago

Fixed by #166, update to 1.23.13