gpt4 book ai didi

php - 更新到 Symfony 3.0 时找不到类 'Appkernel'

转载 作者:可可西里 更新时间:2023-11-01 13:27:37 27 4
gpt4 key购买 nike

我尝试将我的代码和结构更新到 Symfony 3.0。执行通常的 Composer 更新,当 Composer 执行 post-update-cmd 时出现此错误:

    Fatal error: Class 'AppKernel' not found in C:\wamp\www\tharmofos\bin\console on line 20

Call Stack:
0.0002 235192 1. {main}() C:\wamp\www\tharmofos\bin\console:0


Fatal error: require_once(): Failed opening required 'C:\wamp\www\tharmofos\vendor\jms\security-extra-bundle\Tests\Functiona
l/../../vendor/autoload.php' (include_path='.;C:\php\pear') in C:\wamp\www\tharmofos\vendor\jms\security-extra-bundle\Tests\
Functional\AppKernel.php on line 5

Call Stack:
0.0002 235192 1. {main}() C:\wamp\www\tharmofos\bin\console:0
0.0249 1144472 2. Symfony\Component\Debug\ErrorHandler::handleFatalError() C:\wamp\www\tharmofos\vendor\symfony\sym
fony\src\Symfony\Component\Debug\ErrorHandler.php:0
0.0263 1162640 3. Symfony\Component\Debug\ErrorHandler->handleException() C:\wamp\www\tharmofos\vendor\symfony\symf
ony\src\Symfony\Component\Debug\ErrorHandler.php:600
0.0292 1260456 4. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->handleError() C:\wamp\w
ww\tharmofos\vendor\symfony\symfony\src\Symfony\Component\Debug\ErrorHandler.php:530
0.0292 1262144 5. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->getClassCandidates() C:
\wamp\www\tharmofos\vendor\symfony\symfony\src\Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler.php:
62
2.5849 1595232 6. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->findClassInPath() C:\wa
mp\www\tharmofos\vendor\symfony\symfony\src\Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler.php:118

2.6446 1600616 7. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->convertFileToClass() C:
\wamp\www\tharmofos\vendor\symfony\symfony\src\Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler.php:
143
2.6453 1642120 8. require_once('C:\wamp\www\tharmofos\vendor\jms\security-extra-bundle\Tests\Functional\AppKernel.p
hp') C:\wamp\www\tharmofos\vendor\symfony\symfony\src\Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandl
er.php:188

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated wit
h an exception


[RuntimeException]
An error occurred when executing the ""cache:clear --no-warmup"" command:
Fatal error: Class 'AppKernel' not found in C:\wamp\www\tharmofos\bin\console on line 20
Call Stack:
0.0002 235192 1. {main}() C:\wamp\www\tharmofos\bin\console:0
Fatal error: require_once(): Failed opening required 'C:\wamp\www\tharmofos\vendor\jms\security-extra-bundle\Tests\Func
tional/../../vendor/autoload.php' (include_path='.;C:\php\pear') in C:\wamp\www\tharmofos\vendor\jms\security-extra-bun
dle\Tests\Functional\AppKernel.php on line 5
Call Stack:
0.0002 235192 1. {main}() C:\wamp\www\tharmofos\bin\console:0
0.0249 1144472 2. Symfony\Component\Debug\ErrorHandler::handleFatalError() C:\wamp\www\tharmofos\vendor\symfon
y\symfony\src\Symfony\Component\Debug\ErrorHandler.php:0
0.0263 1162640 3. Symfony\Component\Debug\ErrorHandler->handleException() C:\wamp\www\tharmofos\vendor\symfony
\symfony\src\Symfony\Component\Debug\ErrorHandler.php:600
0.0292 1260456 4. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->handleError() C:\w
amp\www\tharmofos\vendor\symfony\symfony\src\Symfony\Component\Debug\ErrorHandler.php:530
0.0292 1262144 5. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->getClassCandidates
() C:\wamp\www\tharmofos\vendor\symfony\symfony\src\Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHa
ndler.php:62
2.5849 1595232 6. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->findClassInPath()
C:\wamp\www\tharmofos\vendor\symfony\symfony\src\Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandl
er.php:118
2.6446 1600616 7. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->convertFileToClass
() C:\wamp\www\tharmofos\vendor\symfony\symfony\src\Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHa
ndler.php:143
2.6453 1642120 8. require_once('C:\wamp\www\tharmofos\vendor\jms\security-extra-bundle\Tests\Functional\AppKer
nel.php') C:\wamp\www\tharmofos\vendor\symfony\symfony\src\Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatal
ErrorHandler.php:188

截至目前,我尝试删除 vendor 文件夹并安装了 composer,但我一直收到此错误。当我尝试访问我的网站时,出现此错误:

Fatal error: Class 'Symfony\Bundle\FrameworkBundle\FrameworkBundle' not found in C:\wamp\www\tharmofos\app\AppKernel.php on line 11

我认为是结构更新的问题。

你有什么线索吗?

最佳答案

我发现了如何通过在 composer.json 中自动加载 AppKernel.php 来消除这个错误:https://github.com/symfony/symfony-standard/issues/868

关于php - 更新到 Symfony 3.0 时找不到类 'Appkernel',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36270101/

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