I've a weird problem with propel. My configuration in config.yml
:
propel:
dbal:
driver: %database_driver%
user: %database_user%
password: %database_password%
dsn: %database_driver%:host=%database_host%;dbname=%database_name%;charset=UTF8
path: %kernel.root_dir%/../vendor/propel
phing_path: %kernel.root_dir%/../vendor/phing
I created my database with that command: php app/console propel:database:create
and it worked very well but when I'm trying to create my first table with php app/console propel:model:build
i've a fatal error telling: PHP Fatal error: Class 'Phing' not found.
I verified in the folder, everything is there. I guess that is an autoloading problem but I've followed the documentation at http://www.propelorm.org/cookbook/symfony2/working-with-symfony2.html and http://symfony.com/doc/master/book/propel.html
Any idea? Thanks a lot!
Which dependencies management system do you use?
This is an autoloading issue, and you should add the following definition:
$loader->registerPrefixes(array(
...
'Phing' => __DIR__.'/../path/to/phing/classes/phing',
));
where path/to/phing
is the path where you installed Phing.