Symfony 我不知道如何启用我的开发环境

Symfony 我不知道如何启用我的开发环境,symfony,Symfony,每当我尝试切换到我的dev env时,我的站点就会崩溃而没有任何错误(甚至在apache日志中) 当我尝试运行composer update时,总是遇到以下问题: [Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException] 服务“web_profiler.controller.profiler”依赖于不存在的服务“profiler” 下面是我的AppKernel的内容 <?php use Symfo

每当我尝试切换到我的dev env时,我的站点就会崩溃而没有任何错误(甚至在apache日志中)

当我尝试运行composer update时,总是遇到以下问题:

[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException] 服务“web_profiler.controller.profiler”依赖于不存在的服务“profiler”

下面是我的AppKernel的内容

<?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 Zepluf\Bundle\StoreBundle\StoreBundle(),
        );

        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');
    }
}

为了回答我自己的问题,如果我想使用web_profiler,我需要在配置文件中将profiler设置为on

所以我在config_dev.yml中使用了如下内容:

framework:
  profiler: { only_exceptions: false }

你的
composer.json
中有什么内容?要查看错误,请在你的php.ini(/etc/php5/apache2/php.ini)中打开shure display\u errors和display\u startup\u errors@cheesemacfly:我更新了我的问题。@nord\u-ua:我试过了,但似乎仍然没有帮助,奇怪
framework:
  profiler: { only_exceptions: false }