Symfony2 v2.1.9 を使用していますが、インストール中に問題に直面しています StofDoctrineExtensionBundle
PHP Fatal error: Class 'Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle' not found in C:/wamp/www/Symfony/app/AppKernel.php on line 23 .
AppKernel.php
<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new JMS\AopBundle\JMSAopBundle(),
new JMS\DiExtraBundle\JMSDiExtraBundle($this),
new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
new FOS\UserBundle\FOSUserBundle(),
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
);
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
$bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
}
return $bundles;
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
}
}
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'));
return $loader;
それをインストールした後、コンソールに表示されるもの
パッケージ情報を含む composer リポジトリのロード 依存関係の更新 (require-dev を含む) - twig/extensions dev-master の更新 (5c2d515 => v1.0.0) v1.0.0 のチェックアウト
ベンダー/作曲家/autoload_namespaces.php
<?php
// autoload_namespaces.php generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'WhiteOctober\\PagerfantaBundle' => array($vendorDir . '/white-october/pagerfanta-bundle'),
'Twig_Extensions_' => array($vendorDir . '/twig/extensions/lib'),
'Twig_' => array($vendorDir . '/twig/twig/lib'),
'Symfony\\Bundle\\SwiftmailerBundle' => array($vendorDir . '/symfony/swiftmailer-bundle'),
'Symfony\\Bundle\\MonologBundle' => array($vendorDir . '/symfony/monolog-bundle'),
'Symfony\\Bundle\\AsseticBundle' => array($vendorDir . '/symfony/assetic-bundle'),
'Symfony' => array($vendorDir . '/symfony/symfony/src'),
'SessionHandlerInterface' => array($vendorDir . '/symfony/symfony/src/Symfony/Component/HttpFoundation/Resources/stubs'),
'Sensio\\Bundle\\GeneratorBundle' => array($vendorDir . '/sensio/generator-bundle'),
'Sensio\\Bundle\\FrameworkExtraBundle' => array($vendorDir . '/sensio/framework-extra-bundle'),
'Sensio\\Bundle\\DistributionBundle' => array($vendorDir . '/sensio/distribution-bundle'),
'Pagerfanta\\' => array($vendorDir . '/pagerfanta/pagerfanta/src'),
'Monolog' => array($vendorDir . '/monolog/monolog/src'),
'Metadata\\' => array($vendorDir . '/jms/metadata/src'),
'JMS\\SecurityExtraBundle' => array($vendorDir . '/jms/security-extra-bundle'),
'JMS\\DiExtraBundle' => array($vendorDir . '/jms/di-extra-bundle'),
'JMS\\AopBundle' => array($vendorDir . '/jms/aop-bundle'),
'FOS\\UserBundle' => array($vendorDir . '/friendsofsymfony/user-bundle'),
'Doctrine\\ORM' => array($vendorDir . '/doctrine/orm/lib'),
'Doctrine\\DBAL' => array($vendorDir . '/doctrine/dbal/lib'),
'Doctrine\\Common' => array($vendorDir . '/doctrine/common/lib'),
'Doctrine\\Bundle\\DoctrineBundle' => array($vendorDir . '/doctrine/doctrine-bundle'),
'CG\\' => array($vendorDir . '/jms/cg/src'),
'Assetic' => array($vendorDir . '/kriswallsmith/assetic/src'),
'' => array($baseDir . '/src'),
);