Symfony 致命错误 [英] Symfony fatal error
本文介绍了Symfony 致命错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Symfony 运行正常,但在浏览器中打开后出现此错误所有我的控制器为空响应
Symfony runs correctly but I get this error after I open in browser All my controller is empty Response
FatalThrowableError
Type error: Return value of Doctrine\Common\Annotations\AnnotationRegistry::registerLoader() must be an instance of Doctrine\Common\Annotations\void, none returned
这是我的配置文件,我使用了多个数据库
Here is my config file, I use multiple database
# Doctrine Configuration
doctrine:
dbal:
default_connection: admin
connections:
admin:
driver: pdo_mysql
host: '%database_host%'
port: '%database_port%'
dbname: '%database_name%'
user: '%database_user%'
password: '%database_password%'
charset: UTF8
public_branch:
driver: pdo_mysql
host: '%database_host1%'
port: '%database_port1%'
dbname: '%database_name1%'
user: '%database_user1%'
password: '%database_password1%'
charset: UTF8
orm:
auto_generate_proxy_classes: '%kernel.debug%'
default_entity_manager: admin
entity_managers:
admin:
connection: admin
auto_mapping: true
public_branch:
connection: public_branch
mappings:
AdminBundle: ~
PublicBranchBundle: ~
我能做什么?
推荐答案
我通过使用以下命令将我的 php 从 7.0 更新到 7.1 解决了这个问题:
I solved this problem by updating my php from 7.0 to 7.1 , using the following commands:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.1-curl php7.1-xml php7.1-zip php7.1-gd php7.1-mysql php7.1-mbstring php7.1
这篇关于Symfony 致命错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文