我正在关注这个 FOSTwitterBundle 文档: https ://github.com/FriendsOfSymfony/FOSTwitterBundle
我是一步一步做的,但是当我访问我的网站时,我收到了这个错误:
Fatal error: Call to undefined method Composer\Autoload\ClassLoader::registerNamespaces() in C:\xampp\htdocs\Symfony\app\autoload.php on line 16
我的 autoload.php 是这样的:
<?php
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'));
$loader->registerNamespaces(array(
// ...
'FOS' => __DIR__.'/../vendor/bundles',
// ...
));
return $loader;
我应该怎么办?