ReflectionException:类不存在 [英] ReflectionException: Class does not exist

查看:132
本文介绍了ReflectionException:类不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试运行作曲家时遇到了这个错误

I'm running into this error when I tried to run the composer

{
    "name": "zepluf/standard-edition",
    "description": "The \"ZePLUF Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/" }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": ">=2.1",
        "symfony/framework-bundle": ">=2.1",
        "doctrine/orm": ">=2.2.3,<2.4-dev",
        "doctrine/doctrine-bundle": "1.0.*",
        "twig/extensions": "1.0.*",
        "symfony/assetic-bundle": "2.1.*",
        "symfony/swiftmailer-bundle": "2.1.*",
        "symfony/monolog-bundle": "2.1.*",
        "sensio/distribution-bundle": "2.1.*",
        "sensio/framework-extra-bundle": "2.1.*",
        "sensio/generator-bundle": "2.1.*"
    },
    "scripts": {
        "post-install-cmd": [
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ],
        "post-update-cmd": [
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ]
    },
    "minimum-stability": "dev",
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web"
    }
}

似乎通过了一个空的类名进来,但是我不确定如何调试回溯跟踪以找到它的位置。

It seems like somehow an empty classname is passed in, but I'm not so sure how to do debug back trace to locate where it is.

D:\Programming\xampp\htdocs\demo\zepluf>composer update --verbose
Loading composer repositories with package information
Updating dependencies
Nothing to install or update
Generating autoload files



  [ReflectionException]
  Class  does not exist



Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handl
ing the post-update-cmd event terminated with an exception



  [RuntimeException]
  An error occurred when executing the ""cache:clear --no-warmup"" command.



Exception trace:
 () at D:\Programming\xampp\htdocs\demo\zepluf\vendor\sensio\distribution-bundle
\Sensio\Bundle\DistributionBundle\Composer\ScriptHandler.php:137
 Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::executeCommand() at D:
\Programming\xampp\htdocs\demo\zepluf\vendor\sensio\distribution-bundle\Sensio\B
undle\DistributionBundle\Composer\ScriptHandler.php:48
 Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache() at phar:/
/C:/ProgramData/Composer/bin/composer.phar/src/Composer/Script/EventDispatcher.p
hp:122
 Composer\Script\EventDispatcher->executeEventPhpScript() at phar://C:/ProgramDa
ta/Composer/bin/composer.phar/src/Composer/Script/EventDispatcher.php:101
 Composer\Script\EventDispatcher->doDispatch() at phar://C:/ProgramData/Composer
/bin/composer.phar/src/Composer/Script/EventDispatcher.php:74
 Composer\Script\EventDispatcher->dispatchCommandEvent() at phar://C:/ProgramDat
a/Composer/bin/composer.phar/src/Composer/Installer.php:237
 Composer\Installer->run() at phar://C:/ProgramData/Composer/bin/composer.phar/s
rc/Composer/Command/UpdateCommand.php:82
 Composer\Command\UpdateCommand->execute() at phar://C:/ProgramData/Composer/bin
/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.
php:238
 Symfony\Component\Console\Command\Command->run() at phar://C:/ProgramData/Compo
ser/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Applicati
on.php:193
 Symfony\Component\Console\Application->doRun() at phar://C:/ProgramData/Compose
r/bin/composer.phar/src/Composer/Console/Application.php:101
 Composer\Console\Application->doRun() at phar://C:/ProgramData/Composer/bin/com
poser.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:106
 Symfony\Component\Console\Application->run() at phar://C:/ProgramData/Composer/
bin/composer.phar/src/Composer/Console/Application.php:74
 Composer\Console\Application->run() at phar://C:/ProgramData/Composer/bin/compo
ser.phar/bin/composer:37
 require() at C:\ProgramData\Composer\bin\composer.phar:15


update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-custom-instal
lers] [--no-scripts] [--no-progress] [-v|--verbose] [-o|--optimize-autoloader] [
packages1] ... [packagesN]


推荐答案

似乎错误是因为我试图在依赖项编译器遍历中检索服务。我重写了代码,以避免不得不从那里检索服务。

It seems like the error was because I attempted to retrieve a service inside a dependency compiler pass. I rewrote my code to avoid having to retrieve service from there.

这篇关于ReflectionException:类不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆