尝试使用php 7.3启动Symfony应用3.4会引发异常:
致命错误:未被捕获的LogicException:缓存必须返回ClassMetadata的实例,但在/var/www/contoso/vendor/jms/metadata/src/Metadata/MetadataFactory.php:73中得到了1.堆栈跟踪:
.0 /var/www/contoso/vendor/jms/security-extra-bundle/Security/Authorization/Interception/SecurityPointcut.php(84):Metadata \ MetadataFactory-> getMetadataForClass('AppBundle \ Contr ...' )
.1 /var/www/contoso/vendor/jms/aop-bundle/DependencyInjection/Compiler/PointcutMatchingPass.php(149):JMS \ SecurityExtraBundle \ Security \ Authorization \ Interception \ SecurityPointcut-> matchesMethod(Object(ReflectionMethod) )
.2 /var/www/contoso/vendor/jms/aop-bundle/DependencyInjection/Compiler/PointcutMatchingPass.php(65):JMS \ AopBundle \ DependencyInjection \ Compiler \ PointcutMatchingPass-> processDefinition(Object(Symfony \ Component \ DependencyInjection \ Definition),数组,数组
.3 / var / www / contoso / vendor / symfony / symfony / src / Sy在/var/www/contoso/vendor/jms/metadata/src/Metadata/MetadataFactory.php在第73行上
我已将chmod 777的文件权限更改为app / cache和app / logs文件夹,但是不起作用。
答案 0 :(得分:0)
好吧,几个小时后,我发现这个问题是由于memcached扩展引起的。 因此,我最终使用phpbrew进行安装。
phpbrew ext install memcached stable
phpbrew ext enable memached
我在GitHub上找到了基于this thread的参考书
如果您不使用phpbrew,请尝试this link