Php cvc复杂类型.2.4.a:发现以元素';foo';

Php cvc复杂类型.2.4.a:发现以元素';foo';,php,symfony,laravel,laravel-4,Php,Symfony,Laravel,Laravel 4,我使用的是Laravel4.2。我的项目运行在xampp安装上,我的数据库是mysql/phpmyadmin。 我已经从barryvdh安装了ide帮助器插件。安装插件后,我的供应商/symfony/routing/symfony/Component/routing中出现了一些奇怪的错误 cvc-complex-type.2.4.a: Invalid content was found starting with element 'foo'. One of '{"http://symfony.c

我使用的是
Laravel4.2
。我的项目运行在
xampp安装上
,我的
数据库
mysql/phpmyadmin
。 我已经从barryvdh安装了
ide帮助器插件
。安装插件后,我的
供应商/symfony/routing/symfony/Component/routing
中出现了一些奇怪的错误

cvc-complex-type.2.4.a: Invalid content was found starting with element 'foo'. One of '{"http://symfony.com/schema/routing":default, "http://symfony.com/schema/routing":requirement, "http://symfony.com/schema/routing":option}' is expected. nonvalidroute.xml   /laravelProject/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures line 11 XML Problem
cvc-complex-type.2.4.a: Invalid content was found starting with element 'foo'. One of '{"http://symfony.com/schema/routing":import, "http://symfony.com/schema/routing":route}' is expected.    nonvalidnode.xml    /laravelProject/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures line 7  XML Problem
cvc-complex-type.4: Attribute 'id' must appear on element 'route'.  missing_id.xml  /laravelProject/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures line 7  XML Problem
The end-tag for element type "route" must end with a '>' delimiter. nonvalid.xml    /laravelProject/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures line 11 XML Problem
我的
composer.json
插件如下所示:

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "require": {
        "laravel/framework": "4.0.*",
        "cartalyst/sentry": "2.0.*",
        "barryvdh/laravel-ide-helper": "1.*",
        "fzaninotto/faker": "1.3.*@dev"
    },
    "autoload": {
        "classmap": [
            "app/commands",
            "app/controllers",
            "app/models",
            "app/database/migrations",
            "app/database/seeds",
            "app/tests/TestCase.php"
        ]
    },
    "scripts": {
        "post-install-cmd": [
            "php artisan optimize"
        ],
        "pre-update-cmd": [
            "php artisan clear-compiled"
        ],
        "post-update-cmd": [
            "php artisan optimize"
        ],
        "post-update-cmd": [
             "php artisan ide-helper:generate"
        ],       
        "post-create-project-cmd": [
            "php artisan key:generate"
        ]
    },
    "config": {
        "preferred-install": "dist"
    },
    "minimum-stability": "dev"
}
知道我为什么会遇到这个异常以及如何修复它吗


谢谢你的回答

看来您使用的是Laravel 4.0.*而不是4.2。此外,ide帮助程序应该位于“require dev”而不是“require”中,因为这不会在生产中使用,而且它只是用于ide帮助程序

我认为,一旦您修复了Laravel版本并相应地更改了IDE帮助的版本,您将在composer更新后删除错误

如果这不起作用,那么问题似乎是您的一个Symfony依赖项在错误日志中指定的文件中有输入错误(非闭合标记)。您可以尝试修复这些问题,但我相信问题在于版本冲突或版本不稳定

让我们知道你的进展:)