[英]Can or cannot Sonata News Bundle be used without FOS User Bundle?
我正在嘗試建立新的基於Sonata的環境,但是由於一些內部業務需求,我們無法使用FOS User Bundle和neather Sonata User Bundle。
但是我想使用Sonata News Bundle,但是在最初設置composer依賴項和appKenrnel依賴項之后,我注意到了一個內部bundle依賴項:
<services>
<service id="sonata.news.admin.post" class="%sonata.news.admin.post.class%">
<tag name="sonata.admin" manager_type="orm" group="sonata_blog" label="posts" label_catalogue="%sonata.news.admin.post.translation_domain%" label_translator_strategy="sonata.admin.label.strategy.underscore" />
<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>
[Symfony \\ Component \\ DependencyInjection \\ Exception \\ ServiceNotFoundException]服務“ sonata.news.admin.post”具有對不存在的服務“ fos_user.user_manager”的依賴。
有沒有人設法在沒有FOS用戶捆綁包的情況下使用新聞捆綁包?
是的,這是可能的:
SonataNewsBundle
指的是擴展FOS\\UserBundle\\Model\\UserManagerInterface
Sonata\\UserBundle\\Model\\UserManagerInterface
,但這只是Php文檔,因此它應該在沒有(或使用您可以編寫的虛擬文件)下工作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.