类型“'text'”不存在? - 打字错误3

A type "'text'" does not exist? - TYPO3

我在 TYPO3 7.4 中收到一条错误消息。

'Found an invalid element type declaration in %s. A type \"'text'\" does not exist.'

看起来 text 处的引号不知何故加倍了,但我不知道这可能在哪里 and/or 如何解决这个问题。
如果需要,我可以 post 更多错误消息,只是认为这部分是最重要的部分。

这意味着在您的 ControllerModelRepository 某处,PHPDoc 的类型声明有误,例如:

class Example {

    /**
     * @var text
     */
    protected $someProperty = '';

    /**
     * Foo
     *
     * @param text $bar
     * @return text
     */
    protected function foo($bar) {
        return '';
    }

}

请将"text"改为"string",清除所有缓存后重试!