php - cvc-complex-type.2.4.a: Invalid content was found starting with element 'foo'
I am usinglaravel 4.2
. My project runs on axampp installation
and mydatabase
ismysql/phpmyadmin
.
I have installed theide helper plugin from barryvdh
. After installing the plugin I get some weird errors in myvendor/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
Mycomposer.json
plugin looks like that:
{
"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"
}
Any idea why I am getting this exception and how to fix it?
I appreciate your answer!
Answer
Solution:
It appears you are using Laravel 4.0.* and not 4.2. Also, the ide-helper should be in "require-dev" and not "require" as this will not be used in production and it's simply for your IDE helper.
I think once you fix your Laravel version and change the version of the IDE help accordingly you will be remove the error after composer update.
If this doesn't work, the issue seems to eb that your one of the Symfony dependencies has typos (non closed tags) int he files specified in your error log. You can try to fix these but I do believe the issue is with version conflicts or versions not being stable.
Let us know how you get on :)