[phingcall] Unable to find adapter for datasource #725

Closed
rafa8626 opened this Issue Jul 18, 2013 · 19 comments

Comments

Projects
None yet
@rafa8626

When running propel-gen diff, you'll find that the program is complaining about missing adapter to initiate DB connection.

This happens because during that operation, self::configuration is NULL, but I don't know where is the place where is being set during the migration operation.

@rafa8626

This comment has been minimized.

Show comment
Hide comment
@rafa8626

rafa8626 Jul 18, 2013

http://stackoverflow.com/questions/17179364/propel-postgresql-migration-unable-to-find-adapter. He put a fix but it is not the right way to do it, so if you can give us some guidance about where should be the place to look for it would be very helpful

http://stackoverflow.com/questions/17179364/propel-postgresql-migration-unable-to-find-adapter. He put a fix but it is not the right way to do it, so if you can give us some guidance about where should be the place to look for it would be very helpful

@eelkevdbos

This comment has been minimized.

Show comment
Hide comment
@eelkevdbos

eelkevdbos Aug 18, 2013

I'm experiencing the same problem. Running with pgsql 9.1 configuration and latest 1.7.*@dev. release of propel. The configuration self::$configuration file at this point returns NULL. I'm about to apply the dirty solution given in the stackoverflow post above, but I'm really eager to find a more satisfying solution. I'm really curious on how it can find the correct database name, but fails to detect the driver from the buildtime-/runtime-configuration file (both identical).

I'm experiencing the same problem. Running with pgsql 9.1 configuration and latest 1.7.*@dev. release of propel. The configuration self::$configuration file at this point returns NULL. I'm about to apply the dirty solution given in the stackoverflow post above, but I'm really eager to find a more satisfying solution. I'm really curious on how it can find the correct database name, but fails to detect the driver from the buildtime-/runtime-configuration file (both identical).

@eelkevdbos

This comment has been minimized.

Show comment
Hide comment
@eelkevdbos

eelkevdbos Oct 21, 2013

I found out the following: The adapter is supplied in the $conparams argument (method initConnection). Adding the following line to Propel.php solved all my problems. This still might not be the prettiest solution there is, but it most certaily works for me.

Around line 650 in Propel.php:
Change $adapter = self::getDB($name); into $adapter = isset($conparams['adapter']) ? DBAdapter::factory($conparams['adapter']) : self::getDB($name);

I found out the following: The adapter is supplied in the $conparams argument (method initConnection). Adding the following line to Propel.php solved all my problems. This still might not be the prettiest solution there is, but it most certaily works for me.

Around line 650 in Propel.php:
Change $adapter = self::getDB($name); into $adapter = isset($conparams['adapter']) ? DBAdapter::factory($conparams['adapter']) : self::getDB($name);

@MaksSlesarenko

This comment has been minimized.

Show comment
Hide comment
@MaksSlesarenko

MaksSlesarenko Feb 7, 2014

Contributor

Is anyone going to fix this issue?

Contributor

MaksSlesarenko commented Feb 7, 2014

Is anyone going to fix this issue?

@staabm

This comment has been minimized.

Show comment
Hide comment
@staabm

staabm Feb 7, 2014

Member

fix seems to be jh-ism-online-webmaster/Propel@846640a, PR with unit test welcome

Member

staabm commented Feb 7, 2014

fix seems to be jh-ism-online-webmaster/Propel@846640a, PR with unit test welcome

@django23

This comment has been minimized.

Show comment
Hide comment

+1

@pedrocasado

This comment has been minimized.

Show comment
Hide comment

+1

@marcj marcj added the Bug label Apr 23, 2014

@sabberworm

This comment has been minimized.

Show comment
Hide comment

+1

@tgressly

This comment has been minimized.

Show comment
Hide comment

+1

@malukenho

This comment has been minimized.

Show comment
Hide comment

+1

@michaelrimbach

This comment has been minimized.

Show comment
Hide comment
@kaasdude

This comment has been minimized.

Show comment
Hide comment

kaasdude commented Nov 3, 2014

+1

@stephandesouza

This comment has been minimized.

Show comment
Hide comment
@tchalvak

This comment has been minimized.

Show comment
Hide comment

+1

@Yoann-TYT

This comment has been minimized.

Show comment
Hide comment

+1

@tdondich

This comment has been minimized.

Show comment
Hide comment
@tdondich

tdondich Sep 20, 2015

Will this ever be merged into a 1.x release? This really breaks my composer friendly installs.

Will this ever be merged into a 1.x release? This really breaks my composer friendly installs.

@saatchimatt

This comment has been minimized.

Show comment
Hide comment

+1

@rafa8626

This comment has been minimized.

Show comment
Hide comment
@rafa8626

rafa8626 Apr 4, 2017

Any updates on this?

rafa8626 commented Apr 4, 2017

Any updates on this?

@rafa8626 rafa8626 closed this May 7, 2017

@nibsirahsieu

This comment has been minimized.

Show comment
Hide comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment