TYPO3-Documentation/TYPO3CMS-Book-ExtbaseFluid

Mention requirement to put the autoload config into the central composer.json for new extensions

hmb opened this issue · 2 comments

hmb commented

After working through the example Creating a first extension with a composer installed TYPO3 V9.4 I get an error:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1278450972:
  Class MyVendor\StoreInventory\Controller\StoreInventoryController does not exist.
  Reflection failed.

The reason seems to be that the autoload configuration has to be put into the root composer.json. I posted the details in an answer to a similar question on SO. Maybe this can be put into the appropriate place into the documentation.

The question is how people develop new extensions. There is a way to do this with composer from the beginning on. In that case, the autoload section of the extenision's composer.json is used. I don't know if the Extbase book needs to explain such things since this is true for every extension, even those that don't use Extbase.

In my opinion there should be a documentation about creating extensions and it's very basics. The info about ext_emconf.php and such. But it should be outside this book and we should be able to reference it.

This is a general topic of Extension development and handled in TYPO3 Explained