简体   繁体   English

使扩展兼容TYPO3 v8

[英]Make extension compatible for TYPO3 v8

I have a problem in TYPO3 v8.5.0 dev with own extensions. 我在TYPO3 v8.5.0 dev中有一个问题,有自己的扩展。 After creating a proper composer.json my classes are not found. 在创建了一个合适的composer.json之后,找不到我的类。 Installation was done by copy into the typo3conf/ext folder as usual and activating in extension manager. 通过像往常一样复制到typo3conf / ext文件夹并在扩展管理器中激活完成安装。 Unfortunally the ext is not in TER, so this is the only way. 不幸的是,分机不在TER中,所以这是唯一的方法。 After activating, i'm stuck with error: 激活后,我遇到了错误:

Oops, an error occurred! 糟糕,发生错误!

Class 'XXX\\ExtKey...' not found 找不到“XXX \\ ExtKey ...”类

What do I miss so my classes are found again? 我错过了什么,所以我的课程再次被发现?

If your extension is not installed with composer you have to add the autoload settings into the composer.json of the project. 如果未使用composer安装扩展,则必须将自动加载设置添加到项目的composer.json中。

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

Then you have to do a composer update or composer dump-autoload 然后你必须做一个作曲家更新作曲家转储自动加载

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM