Thursday, February 10, 2011

Symfony Upgrade Issues

1. XXXPeer::doselectrs()
Fatal error: Call to undefined method XXXPeer::doselectrs() in /root/workspace/ProjectName/lib/model/XXXPeer.php on line 37
That method belongs to Propel 1.2, and you are using Propel 1.3, which was introduced into symfony in symfony version 1.2

New Propel Method Signatures
Another change is related to PDO's lack of a ResultSet correlate. The generated Peer doSelectRS() method has been renamed doSelectStmt(). PDO does not have a ResultSet class, so the doSelectStmt() will return an executed statement.

Change doSelectRS() to doSelectStmt()

2. PDOStatement::next()
Fatal error: Call to undefined method PDOStatement::next() /root/workspace/ProjectName/lib/model/XXXPeer.php on line 39
same link as above


$rs = AuthorPeer::doSelectRS(new Criteria());
while($rs->next()) {
$a = new Author();


// example of how to manually hydrate objects
$stmt = AuthorPeer::doSelectStmt(new Criteria());
while($row = $stmt->fetch(PDO::FETCH_NUM)) {
$a = new Author();

3. PDOStatement::getInt()
Fatal error: Call to undefined method PDOStatement::getInt() in /root/workspace/ProjectName/lib/model/XXXPeer.php on line 41


$ cd /path/to/project/root/
$ svn co plugins/sfPropelPlugin

no luck

4. stdClass::getName()
Fatal error: Call to undefined method stdClass::getName() in /root/workspace/PHPLIB_ResourceServiceAdapter/ResourceService/service/search/RES_ResourceConditionManager.php on line 54

5. Enable the Compatibility with the Version 1.0

compat_10: true

No comments:

Post a Comment