Error message: When MySQL driver is not installed
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 4
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
I just ran into this issue: Error - Undefined constant Gt\Database\Connection\Connection::MYSQL_ATTR_INIT_COMMAND /home/g105b/Code/PhpGt/Database/src/Connection/Driver.php:49
It seems such an obscure error, but really it should say "Your PHP install does not have PDO's MySQL module installed". This should be detectable during the constructor.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/Connection/Driver.php at line 49 and inspect how the constructor handles the MySQL PDO option. Reproduce the missing-driver error if possible, then make the constructor detect the absent PDO MySQL module and report that requirement clearly. Done means the obscure undefined-constant error is replaced by the requested message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- database
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100