谁能告诉我将 xml 转换为 yaml 的问题是什么?(我试过这样做,但我收到一个错误,上面写着“你不能在映射中定义序列项”)
<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>
并转换为 yaml 文件:
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