I have updated Typo3 v6.2.15 to 7.6.15 and tried to add namespaces to a custom Extension. Now im getting an error on the LoginController class:
Could not analyse class: "Tx_Verwaltung_Controller_LoginController" maybe not loaded or no autoloader? Class Tx_Verwaltung_Controller_LoginController does not exist
What i have done:
Replaced
$_EXTKEY
with'DHW.' . $_EXTKEY
in these files: ext_localconf.php, ext_tables.php Example:\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( 'DHW.' . $_EXTKEY, 'login', array( 'Login' => 'loginbox,logoutbox' ), array( 'Login' => 'loginbox,logoutbox' ) );
added this in ext_emconfig.php:
array( 'classmap' => array('Classes'), 'psr-4' => array('DHW\\Verwaltung\\' => 'Classes') ),
added this in composer.json:
"autoload": { "psr-4": { "DHW\\Verwaltung\\": "Classes" } }
added namespace in typo3conf/ext/verwaltung/Classes/LoginController.php
namespace DHW\Verwaltung\Controller; class Tx_Verwaltung_Controller_LoginController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController { ... }
Disabled and Enabled the Extension in Backend.
- Cleared caches in Backend.
- Deleted typo3temp folder
- Cleared caches with install tool.