我在composer更新时出错
这是composer.json
{
"name": "trigui/symfony",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-4": {
"": "src/"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"autoload": {
"psr-4": {
"": "src/",
"VotreNamespace": "chemin/vers/la/bibliotheque"
},
"files": [ "app/AppKernel.php" ]
},
"autoload-dev": {
"psr-4": {
"Tests\": "tests/"
},
"files": [
"vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php"
]
},
"require": {
"php": ">=5.5.9",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/orm": "^2.5",
"incenteev/composer-parameter-handler": "^2.0",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^3.0.2",
"symfony/monolog-bundle": "^3.1.0",
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.3.10",
"symfony/symfony": "3.3.*",
"twig/twig": "^1.0||^2.0",
"doctrine/doctrine-fixtures-bundle":"~2.3"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
},
"branch-alias": null
}
}
这就是错误:
密钥自动加载在中是重复的/第20行的composer.json
非空PSR-4前缀必须以命名空间分隔符结尾。
请问问题出在哪里?
谢谢大家,我已经像@Jorge Augusto Morêra de Moura 的答案一样更改了json
我删除了
"VotreNamespace":"chemin/vers/la/bibliotheque">
在第5行和第20行有两个自动加载键。第48行和第49行的文件末尾有双括号
试试这个json
{
"name": "trigui/symfony",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-4": {
"": "src/",
"VotreNamespace": "chemin/vers/la/bibliotheque"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
],
"files": [ "app/AppKernel.php" ]
},
"autoload-dev": {
"psr-4": {
"Tests\": "tests/"
},
"files": [
"vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php"
]
},
"require": {
"php": ">=5.5.9",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/orm": "^2.5",
"incenteev/composer-parameter-handler": "^2.0",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^3.0.2",
"symfony/monolog-bundle": "^3.1.0",
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.3.10",
"symfony/symfony": "3.3.*",
"twig/twig": "^1.0||^2.0",
"doctrine/doctrine-fixtures-bundle":"~2.3"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
},
"branch-alias": null
}