From 09457ca53ac3e7e446d65de9f6b3c867a02a1bd3 Mon Sep 17 00:00:00 2001 From: Imko Schumacher Date: Thu, 23 Nov 2023 18:29:53 +0100 Subject: [PATCH] Remove autoloader --- Classes/Register.php | 12 ------------ Classes/Service/NewsOverwrite.php | 2 +- Configuration/TCA/Overrides/sys_template.php | 9 +++++++++ .../{constants.txt => constants.typoscript} | 0 .../TypoScript/{setup.txt => setup.typoscript} | 0 composer.json | 1 - ext_emconf.php | 1 - ext_localconf.php | 16 ++++++---------- ext_tables.php | 7 +------ ..._setup.txt => ext_typoscript_setup.typoscript | 0 10 files changed, 17 insertions(+), 31 deletions(-) create mode 100644 Configuration/TCA/Overrides/sys_template.php rename Configuration/TypoScript/{constants.txt => constants.typoscript} (100%) rename Configuration/TypoScript/{setup.txt => setup.typoscript} (100%) rename ext_typoscript_setup.txt => ext_typoscript_setup.typoscript (100%) diff --git a/Classes/Register.php b/Classes/Register.php index 29d78d9..bb9eff5 100644 --- a/Classes/Register.php +++ b/Classes/Register.php @@ -14,18 +14,6 @@ */ class Register { - /** - * Get the autoloader configuration. - * - * @return array - */ - public static function getAutoloaderConfiguration() - { - return [ - 'StaticTyposcript', - ]; - } - /** * Get the configuration. * diff --git a/Classes/Service/NewsOverwrite.php b/Classes/Service/NewsOverwrite.php index adcd573..e77760e 100644 --- a/Classes/Service/NewsOverwrite.php +++ b/Classes/Service/NewsOverwrite.php @@ -8,8 +8,8 @@ namespace HDNET\CalendarizeNews\Service; use GeorgRinger\News\Domain\Model\News; -use HDNET\Autoloader\SingletonInterface; use HDNET\Calendarize\Domain\Model\Index; +use TYPO3\CMS\Core\SingletonInterface; use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; use TYPO3\CMS\Extbase\Reflection\ObjectAccess; diff --git a/Configuration/TCA/Overrides/sys_template.php b/Configuration/TCA/Overrides/sys_template.php new file mode 100644 index 0000000..99976c9 --- /dev/null +++ b/Configuration/TCA/Overrides/sys_template.php @@ -0,0 +1,9 @@ + '10.4.6-11.5.99', 'php' => '7.4.0-8.2.99', 'calendarize' => '10.0.0-12.99.99', - 'autoloader' => '7.0.0-7.99.99', 'news' => '8.5.0-11.99.99', ], ], diff --git a/ext_localconf.php b/ext_localconf.php index 5f7efb4..ef7d540 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -7,16 +7,10 @@ * @author Tim Lochmüller */ +declare(strict_types=1); -if (!defined('TYPO3_MODE')) { - die('Access denied.'); -} +defined('TYPO3') or exit(); -\HDNET\Autoloader\Loader::extLocalconf( - 'HDNET', - 'calendarize_news', - \HDNET\CalendarizeNews\Register::getAutoloaderConfiguration() -); \HDNET\Calendarize\Register::extLocalconf(\HDNET\CalendarizeNews\Register::getConfiguration()); $extensionConfiguration = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( @@ -30,8 +24,10 @@ $xclasses[\HDNET\CalendarizeNews\Xclass\NewsController::class] = \GeorgRinger\News\Controller\NewsController::class; $xclasses[\HDNET\CalendarizeNews\Xclass\NewsRepository::class] = \GeorgRinger\News\Domain\Repository\NewsRepository::class; } -foreach ($xclasses as $key => $value) { - \HDNET\Autoloader\Utility\ExtendedUtility::addXclass($value, $key); +foreach ($xclasses as $target => $source) { + $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][$source] = [ + 'className' => $target, + ]; } $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools::class]['flexParsing'][\HDNET\CalendarizeNews\Hooks\FlexFormHook::class] = \HDNET\CalendarizeNews\Hooks\FlexFormHook::class; diff --git a/ext_tables.php b/ext_tables.php index 9c95c73..d67854f 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -6,12 +6,7 @@ * @package Calendarize * @author Tim Lochmüller */ - -if (!defined('TYPO3_MODE')) { - die('Access denied.'); -} - -\HDNET\Autoloader\Loader::extTables('HDNET', 'calendarize_news', \HDNET\CalendarizeNews\Register::getAutoloaderConfiguration()); +defined('TYPO3') or exit(); \HDNET\Calendarize\Register::extTables(\HDNET\CalendarizeNews\Register::getConfiguration()); $GLOBALS['TYPO3_CONF_VARS']['EXT']['news']['orderByNews'] .= ',calendarize'; diff --git a/ext_typoscript_setup.txt b/ext_typoscript_setup.typoscript similarity index 100% rename from ext_typoscript_setup.txt rename to ext_typoscript_setup.typoscript