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

[IDEA] ERROR: could not find driver - Should be more explained #1479

Closed
yassinrais opened this issue Jan 13, 2021 · 4 comments
Closed

[IDEA] ERROR: could not find driver - Should be more explained #1479

yassinrais opened this issue Jan 13, 2021 · 4 comments
Assignees

Comments

@yassinrais
Copy link

When a Database Driver Extension is missed

its should say
ERROR: could not find php extension driver postgress

because its take more time to understand that the extension who is missed and not an issue about the name of adapater

Thanks :D !

@BeMySlaveDarlin
Copy link
Contributor

BeMySlaveDarlin commented Mar 21, 2021

This is base message related to PHP core \Exception

} catch (Exception $e) {
    fwrite(STDERR, 'ERROR: ' . $e->getMessage() . PHP_EOL);
    exit(1);
}

As its created outside of phalcon, we cannot properly customize message.
Available options is:

  • We can change message to DATABASE ERROR: could not find driver, catching directly PDOException
  • We can add trace of exception after message to output

@Jeckerson Jeckerson modified the milestones: 4.0.x, 5.0.x Mar 21, 2021
@Jeckerson
Copy link
Member

@BeMySlaveDarlin Ok, we will return to this in next major version.

@Ultimater
Copy link
Member

Devtools provides tools which can save a developer a few minutes.
But a vague error like this will send a developer on a totally avoidable quest trying to figure out what's wrong.
In the spirit of devtools, where we want to save people time, I believe this issue is very important to fix.

I'll work on releasing a fix for this on 3.4.x, 4.0.x, and 4.1.x

Ultimater added a commit to Ultimater/phalcon-devtools that referenced this issue Jul 6, 2021
Ultimater added a commit that referenced this issue Jul 6, 2021
Fix #1479 more verbose pdo driver missing errors for 3.4.x
Ultimater added a commit to Ultimater/phalcon-devtools that referenced this issue Jul 7, 2021
Ultimater added a commit that referenced this issue Jul 7, 2021
Fix #1479 more verbose pdo driver missing errors for 4.0.x
Ultimater added a commit to Ultimater/phalcon-devtools that referenced this issue Jul 7, 2021
Ultimater added a commit that referenced this issue Jul 7, 2021
Fix #1479 more verbose pdo driver missing errors for 4.1.x
@Ultimater
Copy link
Member

This is fixed in v3.4.14, v4.0.8 and v4.1.1

@Ultimater Ultimater removed this from the 5.0.x milestone Jul 7, 2021
BeMySlaveDarlin pushed a commit to BeMySlaveDarlin/phalcon-devtools that referenced this issue Sep 16, 2021
niden pushed a commit that referenced this issue Sep 18, 2021
* Fix #1479 more verbose pdo driver missing errors

* Fix #1508 devtools version showing phalcon version instead for 4.1.x

* Bump version to 4.1.1

* Fix #1515 Devtools version errors with Phalcon 5

* Adjusting dependencies for PHP 8 support

* #1455 - New code generation

* #1455 - New tests and fix old tests

* #1455 - CHANGELOG

* #1455 - Removed TODOs

* #1455 - Changed static calls

* #1455 - Added escaping namespace placeholder

Co-authored-by: Kevin Yarmak <ultimater@gmail.com>
Co-authored-by: Aziz Muzafarov <aziz.muzafarov@alg.team>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants