我按照symfony 教程创建了一个独立的包,但是自从我将包从我的应用程序中移出后,就没有任何工作了。
一步一步地,我意识到 flex 不会自动将我的包注册到我的项目中。通常它应该是自动的,因为我的 bunlde include "type": "symfony-bundle"。我想我在一些命名上犯了错误(在这个问题中),但我不能把手放在上面:
有实验的人可以快速查看以下代码并解释我做错了什么吗?
//the bundle json
{
"name": "btba/chat-bundle",
"type": "symfony-bundle",
"description": "Chat generator for Symfony applications",
"keywords": ["chat", "generator"],
"homepage": "https://github.com/12rambau/Chat-bundle",
"license": "MIT",
"authors": [
{
"name": "Project Contributors",
"homepage": "https://github.com/12rambau/Chat-bundle/blob/master/CONTRIBUTORS.md"
}
],
"autoload": {
"psr-4": {
"Btba\\ChatBundle\\": "src/"
}
}
}
// the bundle load in my app
{
"type": "project",
"license": "proprietary",
"require": {
"btba/chat-bundle": "*@dev"
}
"repositories": [
{
"type": "path",
"url": "../ChatBundle"
}
]
}
// the bundle class
namespace Btba\ChatBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class BtbaChatBundle extends Bundle
{
}