douzha5990 2012-05-01 08:47
浏览 68

Symfony 2 / Propel:找不到类'Phing',自动加载?

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!

  • 写回答

1条回答 默认 最新

  • dongshou6041 2012-05-01 12:32
    关注

    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.

    评论

报告相同问题?

悬赏问题

  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP