【发布时间】:2018-11-15 17:05:02
【问题描述】:
我从 github 下载了一个扩展到我的本地主机,并在项目中编辑了命名空间/模块。一切似乎都很好,但是当我运行命令 php -dmemory_limit=5G bin/magento setup:di:compile 时出现错误
[运行时异常] “Namespace\Module\Model\LogRepository”生成的源类“\Namespace\Module\Model\LogInterface”不存在。
寻找其他解决方案,我在我的 etc/di.xml 中添加了这个,但它不起作用
<type name="Magento\Framework\Model\Entity\RepositoryFactory">
<arguments>
<argument name="entities" xsi:type="array">
<item name="Namespace\Module\Api\Data\LogInterface" xsi:type="string">Namespace\Module\Api\LogRepositoryInterface</item>
</argument>
</arguments>
</type>
我还能如何解决这个问题?
PS:我删除了生成文件夹并运行命令php bin/magento setup:static-content:deploy,然后运行php -dmemory_limit=5G bin/magento setup:di:compile,但得到同样的错误
【问题讨论】:
标签: magento2 magento2.1