When connecting to Postgresql, using option "adapter" in my config, I get the error:
SQLSTATE[08006] [7] invalid connection option "adapter"
I easily resolved this by simply removing that parameter altogether. But now I'm starting to use Webtools, and so having removed the "adapter" part, webtools tries to connect to Mysql instead (and does so succefully, as I have a database with the same credentials there). So I try and add:
'adapter' => 'Postgresql',
This makes webtools connect successfully to Postgresql, producing a list of my Postgresql tables in the migrations dropdown-menu. But of course, the error re-emerges in my app. Needless to say, I would like to have this to work both in my app and in webtools with the same setting, preffereably by using the "adapter" parameter. If webtools can make this work, so should I.
What am I doing wrong?
I also found this very old issue (#58) that describes this error, but marks it as fixed:
https://github.com/phalcon/phalcon-devtools/issues/58
If it helps any, I'm using only the PDO:
use Phalcon\Db\Adapter\Pdo\Postgresql as DbAdapter;
$di->set('db', function () use ($config) {
return new DbAdapter($config->database->toArray());
});