propelorm/Propel2 — Issue #6: reset_tests.sh fails at "propel > sql-template"
Author: vworldat
Created: 2011-10-17 09:30:28+00:00
State: open

After finding out where to put my database credentials I ran into a blocking issue with the reset_tests.sh script:

```
propel > sql-template:

[propel-sql] Loading XML schema files...
[propel-sql] 8 tables found in 6 schema files.
PHP Fatal error: Call to a member function addTable() on a non-object in Propel2/src/Propel/Generator/Task/PropelSQLTask.php on line 255
PHP Stack trace:
PHP 1. {main}() /usr/share/php5/PEAR/phing.php:0
PHP 2. Phing::fire() /usr/share/php5/PEAR/phing.php:37
PHP 3. Phing::start() /usr/share/php5/PEAR/phing/Phing.php:270
PHP 4. Phing->runBuild() /usr/share/php5/PEAR/phing/Phing.php:170
PHP 5. Project->executeTargets() /usr/share/php5/PEAR/phing/Phing.php:564
PHP 6. Project->executeTarget() /usr/share/php5/PEAR/phing/Project.php:706
PHP 7. Target->performTasks() /usr/share/php5/PEAR/phing/Project.php:733
PHP 8. Target->main() /usr/share/php5/PEAR/phing/Target.php:300
PHP 9. Task->perform() /usr/share/php5/PEAR/phing/Target.php:277
PHP 10. PhingTask->main() /usr/share/php5/PEAR/phing/Task.php:253
PHP 11. PhingTask->processFile() /usr/share/php5/PEAR/phing/tasks/system/PhingTask.php:150
PHP 12. Project->executeTarget() /usr/share/php5/PEAR/phing/tasks/system/PhingTask.php:275
PHP 13. Target->performTasks() /usr/share/php5/PEAR/phing/Project.php:733
PHP 14. Target->main() /usr/share/php5/PEAR/phing/Target.php:300
PHP 15. Task->perform() /usr/share/php5/PEAR/phing/Target.php:277
PHP 16. PhingCallTask->main() /usr/share/php5/PEAR/phing/Task.php:253
PHP 17. PhingTask->main() /usr/share/php5/PEAR/phing/tasks/system/PhingCallTask.php:158
PHP 18. PhingTask->processFile() /usr/share/php5/PEAR/phing/tasks/system/PhingTask.php:150
PHP 19. Project->executeTarget() /usr/share/php5/PEAR/phing/tasks/system/PhingTask.php:275
PHP 20. Target->performTasks() /usr/share/php5/PEAR/phing/Project.php:733
PHP 21. Target->main() /usr/share/php5/PEAR/phing/Target.php:300
PHP 22. Task->perform() /usr/share/php5/PEAR/phing/Target.php:277
PHP 23. PhingCallTask->main() /usr/share/php5/PEAR/phing/Task.php:253
PHP 24. PhingTask->main() /usr/share/php5/PEAR/phing/tasks/system/PhingCallTask.php:158
PHP 25. PhingTask->processFile() /usr/share/php5/PEAR/phing/tasks/system/PhingTask.php:150
PHP 26. Project->executeTarget() /usr/share/php5/PEAR/phing/tasks/system/PhingTask.php:275
PHP 27. Target->performTasks() /usr/share/php5/PEAR/phing/Project.php:733
PHP 28. Target->main() /usr/share/php5/PEAR/phing/Target.php:300
PHP 29. Task->perform() /usr/share/php5/PEAR/phing/Target.php:277
PHP 30. Propel\Generator\Task\PropelSQLTask->main() /usr/share/php5/PEAR/phing/Task.php:253
PHP 31. Propel\Generator\Task\PropelSQLTask->packageDataModels() Propel2/src/Propel/Generator/Task/PropelSQLTask.php:140

```

For those not wanting to search: credentials have to be set in:
* tests/Fixtures/bookstore/build.properties (uncomment lines 21 and 22 for mysql)
* tests/Fixtures/bookstore/runtime-conf.xml (uncomment user and password blocks for mysql)

The same goes for the other test configurations, but at the moment it seems I'm stuck with the bookstore.