[英]Errors with configuring Propel ORM in Symfony2
我正在嘗試在Symfony2項目中配置propel ORM,但是每次運行symfony command lin工具時,我都會不斷收到此錯誤消息:
[Symfony\Component\Config\Exception\FileLoaderLoadException]
There is no extension able to load the configuration for "propel" (in C:\Program Files (x86)\Zend\Apache2\htdocs\se\app/config\config.yml). Looked for namespace "propel", found "
framework", "security", "twig", "monolog", "swiftmailer", "assetic", "doctrine", "sensio_framework_extra", "acme_demo", "debug", "web_profiler", "sensio_distribution" in C:\Progr
am Files (x86)\Zend\Apache2\htdocs\se\app/config\config.yml (which is being imported from "C:\Program Files (x86)\Zend\Apache2\htdocs\se\app/config/config_dev.yml").
我根據官方文檔配置:
#Propel Configuration
propel:
dbal:
driver: "%database_driver%"
user: "%database_user%"
password: "%database_password%"
dsn: "%database_driver%:host=%database_host%;dbname=%database_name%;charset=%database_charset%"
我通過作曲家正確地安裝了propel軟件包。 propel
命令行工作正常。
您是否將PropelBundle
添加到AppKernel
? 好像你沒有。
AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Propel\PropelBundle\PropelBundle(),
);
// ...
}
http://propelorm.org/Propel/cookbook/symfony2/working-with-symfony2.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.