symfony - xml to yaml: You cannot define a sequence item when in a mapping in -


can tell me what's problem in converting xml yaml?(i've tried error says "you cannot define sequence item when in mapping in ")

<service id="sonata.news.admin.post" class="%sonata.news.admin.post.class%">     <tag name="sonata.admin" manager_type="orm" group="sonata_blog" label="post"/>     <argument />     <argument>%sonata.news.admin.post.entity%</argument>     <argument>%sonata.news.admin.post.controller%</argument>      <call method="setusermanager">         <argument type="service" id="fos_user.user_manager" />     </call>  </service> 

and converted yaml file:

sonata.news.admin.post:     class: "%sonata.news.admin.post.class%"     arguments: [%sonata.news.admin.post.entity%]     arguments: [%sonata.news.admin.post.controller%]     tags:         - { name: sonata.admin, manager_type: orm, group: sonata_blog, label: post}     call:         - {method: setusermanager}         service:             fos_user.user_manager 

you have wrong syntax ... please read documentation i.e. how use setter injection yaml.

arguments: [%sonata.news.admin.post.entity%] arguments: [%sonata.news.admin.post.controller%] 

should be

arguments: [%sonata.news.admin.post.entity%, %sonata.news.admin.post.controller%] 

... further

call:     - {method: setusermanager}     service:         fos_user.user_manager 

... should

 calls:       - [setusermanager, ["@fos_user.user_manager"]] 

Comments