我有一个托管在私有gitlab repo上的本地依赖项。然而,我有困难通过作曲家把这个纳入我的项目。
我的
composer.json
以下内容:
"require": {
"crmpicco/GolfBundle": "dev-master"
},
"repositories": [
{
"type": "package",
"package": {
"name": "crmpicco/GolfBundle",
"version": "dev-master",
"source": {
"url": "https://git.crmpicco.com/rfc1872/golfbundle.git",
"type": "git",
"reference": "master"
},
"autoload": {
"psr-4": {
"crmpicco\\GolfBundle\\": ""
}
}
}
}
],
当我在供应商目录中查找时,目录会在我不希望看到的情况下翻倍,例如。
/vendor/crmpicco/GolfBundle/crmpicco/GolfBundle
当我运行一个
composer update crmpicco\GolfBundle
当Symfony尝试执行缓存时,出现以下错误:clear:
script sensio\bundle\distributionbundle\composer\scripthandler::处理更新后命令事件的clearcache因异常而终止
[运行时异常]
执行“cache:clear--no warmup”命令时出错:
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted
to load class "crmpiccoGolfBundle from namespace "crmpicco\GolfBundle".
Did you forget a "use" statement for "crmpicco\GolfBundle\crmpiccoGolfBundle"?
in /var/www/crmpicco/symfony/app/AppKernel.php:31
我有什么遗漏/做错了
作曲家.json
设置?
捆绑目录结构:
/crmpicco
/GolfBundle
/Component
/DependencyInjection
crmpiccoGolfBundle.php
bundle composer.json版本:
{
"name": "crmpicco/GolfBundle",
"type": "library",
"description": "A Symfony 2 bundle which provides an easy way to handle billing and subscriptions.",
"license": "MIT",
"require": {
"php": ">=7.0",
"symfony/config": "~2.8.34",
"symfony/dependency-injection": "~2.8.34",
"symfony/http-kernel": "~2.8.34",
},
"autoload": {
"psr-4": {
"crmpicco\\GolfBundle\\": ""
}
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"symfony-assets-install": "relative"
}
}