使扩展兼容 TYPO3 v8 [英] Make extension compatible for TYPO3 v8

查看:40
本文介绍了使扩展兼容 TYPO3 v8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用自己的扩展的 TYPO3 v8.5.0 dev 中遇到问题.创建适当的 composer.json 后,我的类没有找到.安装是通过像往常一样复制到typo3conf/ext 文件夹并在扩展管理器中激活来完成的.不幸的是 ext 不在 TER 中,所以这是唯一的方法.激活后,我遇到了错误:

I have a problem in TYPO3 v8.5.0 dev with own extensions. After creating a proper composer.json my classes are not found. Installation was done by copy into the typo3conf/ext folder as usual and activating in extension manager. Unfortunally the ext is not in TER, so this is the only way. After activating, i'm stuck with error:

糟糕,出现错误!

找不到XXX\ExtKey..."类

Class 'XXX\ExtKey...' not found

我错过了什么,所以我的课程又被找到了?

What do I miss so my classes are found again?

推荐答案

如果您的扩展没有随 composer 一起安装,您必须将自动加载设置添加到项目的 composer.json 中.

If your extension is not installed with composer you have to add the autoload settings into the composer.json of the project.

"autoload": {
    "psr-4": {
      "Test\\Yourext\\": "web/typo3conf/ext/yourext/Classes"
    }
  }

然后您必须进行作曲家更新作曲家转储自动加载

这篇关于使扩展兼容 TYPO3 v8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆