Propel PostgreSQL Migration unable to find adapter
In the latest stable version of Propel (1.7.1) it is inpossible to add the following code:
self::$configuration['datasources'][$name]['adapter'] = 'mysql';
Resulting in the following error:
Indirect modification of overloaded element of PropelConfiguration has no effect
That's why, if you have only one adapter you could use:
/*if (!isset(self::$configuration['datasources'][$name]['adapter'])) { throw new PropelException("Unable to find adapter for datasource [" . $name . "].");}*/$db = DBAdapter::factory('mysql');// register the adapter for this nameself::$adapterMap[$name] = $db;
This error happens only when using ./propel-gen diff. Still very strange. Hope they fix it soon.
Looks like switching a Composer dependency to dev-master
fixes this - there is 20 commits difference between the current release (1.7.1) and master, at the time of writing. The migrations patch specifically is here.
Hopefully a 1.7.2 release will be made in due course, though it should be noted that the team's development effort will likely be focussed on Propel2 at present (still in alpha).