Symfony2 phpUnit YAML syntax parsing error

I am trying to run unit test in a symfony2 project, but the tests fail due to a YAML parsing error:

The file "../services.yml" does not contain valid YAML in "../" 

Caused by:

 The reserved indicator "@" cannot start a plain scalar; you need to quote the scalar at line 6 (near "- [ setContainer, [ @service_container ] ]"). 

Of course, I have to use quotes, but it works on another PC, so what should I do to solve this error, but not using quotes?

+2
php yaml symfony phpunit
Dec 24 '15 at 15:22
source share

No one has answered this question yet.

See related questions:

2024
How do you parse and process HTML / XML in PHP?
1624
How do I get PHP errors?
1347
How to split a line into several lines?
1087
How do you block comments in YAML?
1065
Link. What does this error mean in PHP?
658
What is the difference between YAML and JSON?
515
How can I parse a yaml file in Python
four
Reserved indicator "@" cannot start a simple scalar
3
Golang - Unit test for parsing a yaml file and checking objects
one
symfony2 and phpunit not working on lamp (ubuntu 15.x)



All Articles