Skip to content

Commit

Permalink
Merge pull request #47 from okmiim/task/autoloader
Browse files Browse the repository at this point in the history
Remove autoloader
  • Loading branch information
lochmueller committed Nov 27, 2023
2 parents 75adf09 + 09457ca commit 96d7844
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 31 deletions.
12 changes: 0 additions & 12 deletions Classes/Register.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,6 @@
*/
class Register
{
/**
* Get the autoloader configuration.
*
* @return array
*/
public static function getAutoloaderConfiguration()
{
return [
'StaticTyposcript',
];
}

/**
* Get the configuration.
*
Expand Down
2 changes: 1 addition & 1 deletion Classes/Service/NewsOverwrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
9 changes: 9 additions & 0 deletions Configuration/TCA/Overrides/sys_template.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

defined('TYPO3') or exit();

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
'calendarize_news',
'Configuration/TypoScript',
'Calendarize News'
);
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"typo3/cms-core": "^10.4||^11.5",
"typo3/cms-extbase": "^10.4||^11.5",
"lochmueller/calendarize": "^10.0||^11.0||^12.0",
"lochmueller/autoloader": "^7.0",
"georgringer/news": "^8.5||^9.0||^10.0||^11.0"
},
"replace": {
Expand Down
1 change: 0 additions & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
'typo3' => '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',
],
],
Expand Down
16 changes: 6 additions & 10 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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;
7 changes: 1 addition & 6 deletions ext_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
File renamed without changes.

0 comments on commit 96d7844

Please sign in to comment.