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
propel SQLDiffTasks returns adapter error #741
Comments
Seems to be the fix for #725 (comment) |
We only need a propel-guru to find us the method to reference the compiled php configuration file. Some builder classes seem to have access to it. |
Does anyone know how to link the compiled php buildtime configuration file? That would be a real lifesafer! |
Hi all, I solve the "propel" problem putting
at the top of the PropelSQLDiffTask class file for loading and initializing propel, I modified my build.properties file writing
and then in the main of PropelSQLDiffTask I put this snippet
just after the $generatorConfig = $this->getGeneratorConfig(); command. Hope this help. Dany |
idem the same thing in class PropelMigrationTask |
Experiencing the same problem with mysql on 1.7.1-dev and 1.7.0. Works as expected with 1.6.9 |
I'm also getting this same problem in 1.7.0. |
Is there an update on this issue? Migration and Diff task are not usable anymore but there is no good fix found yet |
I dont know how to write tests for this specific case, so generally there will be no fix accepted. I have a solution though that will work. On line 652 of Propel.php:
Will do the trick. If there is anyone that can write a test that will expose the problem in version 1.7.1-dev and will fix it with this line, it would be really great. Right now, im considering just to fork 1.7.1-dev and apply the fix. |
Last time I looked in Propel's tests I could not wrap my head around them. They just felt like a big mess to me. |
SQLDiffTasks returns an error. On line 112 of SQLDiffTasks.php the method
hasPendingMigrations
gets called. This fires eventually theinitConnection
method inside Propel.php without the Propel class being initialized by theinit
method. Without initializing, the self::$configuration stays empty and the correct adapter configurations cannot be read. This will throw an Exception ongetDB
line 756.We're using propel 1.7.*@dev and postgresql 9.1. My suggestion would be to check wether the
Propel
class has been initiated in thegetDB
or theinitConnection
method and if not, initialize it.I haven't worked out a solution myself because I don't know how to link to the generic path of the compiled php configuration file. Otherwise, I would ammend the methods mentioned above with 3 lines of code:
The text was updated successfully, but these errors were encountered: