0

I have just installed new phpunit 5.4 from an older version and now when I launch a test I have:

PHP Fatal error:  Uncaught Symfony\Component\Yaml\Exception\ParseException: Found unknown escape character "\S" at line 14 (near ""Application\Sonata\UserBundle\Entity\User":"). in phar:///home/nextop/.phpbrew/bin/phpunit/symfony/yaml/Unescaper.php:117

Any idea?

1 Answer 1

2

Well PHPUnit 5.4 uses "symfony/yaml": "~2.1|~3.0" and since version 3.0 of symfony/yaml:

Yaml::parse() now throws an exception when a blackslash is not escaped in double-quoted strings

So I would search your codebase for string cases of "Application\Sonata\UserBundle\Entity\User" which seem to be causing the problem. I hope (for you) that it's just an unescaped backslash in one of your tests and not in the Sonata bundle itself..

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.