Extension do not work with EXT:autoloader

Issue #11 resolved
Alexander Grein created an issue

After the annotation Plugin Loader of the extension autoloader calling this method, the following exception is thrown:

$configuration = $annotationReader->getMethodAnnotation($method, Plugin::class);

(1/2) Doctrine\Common\Annotations\AnnotationException

[Creation Error] An error occurred while instantiating the annotation @Api\Access declared on method Mediagear\Jdcompetition\Controller\ItemsRestController::getCountriesAction(): "TYPO3\CMS\Core\Cache\CacheManager can not be injected/instantiated during ext_localconf.php loading. Use lazy loading instead.".

Comments (3)

  1. Alexander Grein reporter

    Found a solution:

    I moved the api code from Vendor/Ext/Controller/ItemsController.php to Vendor/Ext/Api/Items.php

    This way, EXT:autoloader do not scan it anymore, because it is only looking inside Controller Folder/NS

  2. David Bascom

    Thanks for reporting!
    Not sure how we can fix this inside of the nnrestapi-extension – but your workaround is very useful!

  3. Log in to comment