Search code examples
phpsymfonypropelsymfony-2.1

PropelBundle Installation On Symfony 2.1


I'm trying to install the PropelBundle branch 1.1 on Symfony 2.1. I followed the instructions for a manual install, but not sure where to register the namespaces anymore.

Now I get this error message: Fatal error: Class 'Propel\PropelBundle\PropelBundle' not found in D:\www-files\Symfony\app\AppKernel.php on line 22

Line 22 looks like this: new Propel\PropelBundle\PropelBundle()

And my autoload.php looks like this:

use Doctrine\Common\Annotations\AnnotationRegistry;

$loader = require __DIR__.'/../vendor/autoload.php';

// intl
if (!function_exists('intl_get_error_code')) {
    require_once __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';

    $loader->add('', __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs');
}

AnnotationRegistry::registerLoader(array($loader, 'loadClass'));

return $loader;

Should I add something to the autoload.php?


Solution

  • Add the following in composer.json

    "require" :  {
       .....
        "propel/propel-bundle" :  "1.1.*" 
    } , 
    

    And run

    php composer.phar update propel/propel-bundle
    

    the tutorial is http://www.mon-code.net/article/45/initialisation-dun-projet-symfony-2-1-avec-un-depot-git-et-composer