2

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?

1 Answer 1

2

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

2
  • 1
    It may be obvious to some, but you should point WHERE the "require" part should be added, in this case, composer.json. Sep 6, 2013 at 16:59
  • It should be in Symfony/composer.json
    – califrench
    May 11, 2014 at 7:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.