-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathext_localconf.php
31 lines (28 loc) · 1.2 KB
/
ext_localconf.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
use Kanti\ServerTiming\Middleware\AdminpanelSqlLoggingMiddleware;
use Kanti\ServerTiming\Utility\GuzzleUtility;
use Kanti\ServerTiming\XClass\ExtbaseDispatcherLegacy;
use Kanti\ServerTiming\XClass\CoreRequestFactory;
use Kanti\ServerTiming\XClass\ExtbaseDispatcherV11;
use TYPO3\CMS\Adminpanel\Middleware\SqlLogging;
use TYPO3\CMS\Core\Http\RequestFactory;
use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Extbase\Mvc\Dispatcher;
if (version_compare((new Typo3Version())->getBranch(), '11.0', '>=')) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][Dispatcher::class] = [
'className' => ExtbaseDispatcherV11::class,
];
} else {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][Dispatcher::class] = [
'className' => ExtbaseDispatcherLegacy::class,
];
}
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][SqlLogging::class] = [
'className' => AdminpanelSqlLoggingMiddleware::class,
];
if (version_compare((new Typo3Version())->getBranch(), '10.0', '<')) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][RequestFactory::class] = [
'className' => CoreRequestFactory::class,
];
}
$GLOBALS['TYPO3_CONF_VARS']['HTTP']['handler']['server_timing'] = GuzzleUtility::getHandler();