普通网友 2014-12-15 05:31
浏览 54

PHP致命错误:第25行/ va r / app / current / app / AppKernel.php中找不到类'Vich \\ UploaderBundle \\ VichUploaderBundle'

  $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\I18nRoutingBundle\JMSI18nRoutingBundle(),
        new JMS\TranslationBundle\JMSTranslationBundle(),
        new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
        new Maxmind\Bundle\GeoipBundle\MaxmindGeoipBundle(),
        new FOS\UserBundle\FOSUserBundle(),
        new Knp\Bundle\GaufretteBundle\KnpGaufretteBundle(),
        new Vich\UploaderBundle\VichUploaderBundle(),
        new JMS\DiExtraBundle\JMSDiExtraBundle($this),
        new JMS\AopBundle\JMSAopBundle(),
        new Knp\Bundle\SnappyBundle\KnpSnappyBundle(),
        new Sonata\IntlBundle\SonataIntlBundle(),
 );

please let me know why is happened?.... we need to update composer?

it seems like there's a problem with the namespace?

  • 写回答

1条回答 默认 最新

  • dowm41315 2014-12-15 06:56
    关注

    It looks like it's a composer problem since the bundle declaration is already namespaced and I'm assuming you haven't monkied with how the AppKernel sets up it's autoloader.

    Either you need to add the library to composer:

    composer require vich/uploader-bundle:0.14.0
    

    or if you've manually updated composer.json, you'll need to run:

    composer update --lock
    

    Which will install the dependency, update the lockfile, and re-generate your autoload.php file. These commands may or may not work depending on how you installed composer(may need to prepend commands with php composer.phar instead of composer). You'll need to figure that out for yourself. Also, you'll need to specify the version you want as well. I just chose the latest stable from packagist.

    评论

报告相同问题?

悬赏问题

  • ¥15 目详情-五一模拟赛详情页
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line