我按照以下步骤重命名Symfony 3中的默认Bundle
将以下事件重命名为TestBundle:
答案 0 :(得分:1)
在你的composer.json
中用以下代码替换自动加载部件:
"autoload": {
"psr-4": {
"": "src/"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
答案 1 :(得分:1)
app/config/services.yml
到TestBundle src/TestBundle/DefaultController.php
到TestBundle "autoload": {
"psr-4": {
"TestBundle\\": "src/TestBundle"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
composer clear-cache
composer install