gpt4 book ai didi

symfony - 反射异常 : Class does not exist

转载 作者:行者123 更新时间:2023-12-02 16:07:46 26 4
gpt4 key购买 nike

当我尝试运行 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"
}
}

似乎不知何故传入了一个空类名,但我不太确定如何进行调试回溯以找到它所在的位置。

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]

最佳答案

该错误似乎是因为我尝试在依赖项编译器传递中检索服务。我重写了代码以避免必须从那里检索服务。

关于symfony - 反射异常 : Class does not exist,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13947831/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com