TYPO3通过清除缓存在非固定的非对象上调用成员函数

时间:2015-11-11 15:20:31

标签: dependency-injection typo3 extbase

即时通讯试图将存储库注入我的一个控制器中,我收到此错误:

在非对象

上调用成员函数findByChar()

我上网了,但我能找到的只是"删除缓存"

我做了一百次alredy,但我无法让它工作。 有没有其他方法我找不到?

(错字v 6.2.6)注射:

    /**
     * streetRepository
     *
     * @var \Omg\CollectionPlan\Domain\Repository\StreetRepository
     * @inject
     */
     protected $streetRepository;

2 个答案:

答案 0 :(得分:0)

Maybe you didn't clear the right cache.

In Development context, you have the button "Flush system caches" in the clear cache menu.

If you are not in Development context, you can do the same in the install tool ("Important actions" --> "Clear all cache").

If you cannot switch to Development context and nevertheless want to activate the "Flush system caches" button, add this to the User TSconfig:

options.clearCache.system = 1

答案 1 :(得分:0)

您还可以使用XDebug调试ClassLoader,并查看ClassLoader是否正在加载存储库类源文件。