symfony - Symfony2, missing controller's first letter from a config routes -


After command 'root: debug' I get a strange error in the console.

  

`[Symfony \ Component \ Config \ exception \ FileLoaderLoadException]" ...... / app / "Source from" ...... / src / Acme / MyBundle / resource / config / routes.yml can not import / config / routing.yml ". Class can not be determined for the controller identified by "(Acme \ MyBundle \ Controller \ ageController" `

, where I / I / Mybandle / Config / Routes I

  Resources: "Acme \ MyBundle \ Controller \ Page Controller"  

App / Config / routing.iml

  connected to the resource It has happened: "It looks like  Yaml :: parse ($ path)  returns  in    for some reason by checking the @UmeMundle code. 

... is going wrong without any kind?

Many thanks

-------- Edit ------ Thanks for a useful response from @Piotrekkr.

"Escape from P" to four, it works. "Thanks Piotaker

So it became :

Unity \ MyBundle \ Controller \ PageController

I think the reason is that \ P is a special character in YAML.

5.7 letter escaped

all non-printing Protecting eligible characters Will happen. YAML Escape sequences use "\" notation for most modern computer languages. Each escape sequence must be parsed in the appropriate Unicode character. The original escape sequence is a description of a presentation and should not be used to provide content information.

Note that escape sequences are only interpreted in double-quoted scalers. In all other scalar styles, "\" character has no special meaning and non-printable characters are not available.

and character

[58] Ns-esc-paragraph-separator :: = "P" - saved Unicode paragraph separator (# x2029) character .

Try using \\ P in your code YAMML


Comments