0
votes

I'm trying to configure propel ORM in Symfony2 project, but I keep getting this error message when ever I run symfony command lin tool:

[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").

I configured according to the official documentation:

#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%"

And I installed the propel package properly trough composer. The propel command line works fine.

1

1 Answers

1
votes

Did you add PropelBundle to AppKernel? Looks like you didn't.

AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Propel\PropelBundle\PropelBundle(),
    );

    // ...
}

http://propelorm.org/Propel/cookbook/symfony2/working-with-symfony2.html