You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why do you return for TYPO3 >= 11 only the three static ApplicationContexts (Production, Development, Testing)?
You have changed it to:
if (version_compare(TYPO3_version, '11.0.0', '>=')) {
$applicationContext = Environment::getContext();
if ($applicationContext->isDevelopment()) {
return new OperationResult(true, 'Development');
}
if ($applicationContext->isTesting()) {
return new OperationResult(true, 'Testing');
}
if ($applicationContext->isProduction()) {
return new OperationResult(true, 'Production');
}
return new OperationResult(true, $applicationContext->__toString());
}
$applicationContext = GeneralUtility::getApplicationContext();
return new OperationResult(true, $applicationContext->__toString());
but wouldn't it be better to return custom ApplicationContexts too? Like e. g. :
if (version_compare(TYPO3_version, '11.0.0', '>=')) {
$applicationContext = Environment::getContext();
return new OperationResult(true, $applicationContext->__toString());
}
$applicationContext = GeneralUtility::getApplicationContext();
return new OperationResult(true, $applicationContext->__toString());
Why do you return for TYPO3 >= 11 only the three static ApplicationContexts (Production, Development, Testing)?
You have changed it to:
but wouldn't it be better to return custom ApplicationContexts too? Like e. g. :
And the class "Environment" exists since TYPO3 9.5 so it should be possible to write something like:
(https://api.typo3.org/9.5/class_t_y_p_o3_1_1_c_m_s_1_1_core_1_1_core_1_1_environment.html#a6a0c7770cada6b990d22855b04639698)
And constant "TYPO3_version" is depricated since TYPO3 10.3 so i think the code could look like this (yes?):
(https://docs.typo3.org/c/typo3/cms-core/10.4/en-us/Changelog/10.3/Deprecation-90007-GlobalConstantsTYPO3_versionAndTYPO3_branch.html)
Changed this allready at our fork: https://github.com/Teisi/zabbix_client/blob/master/Classes/Operation/GetApplicationContext.php
The text was updated successfully, but these errors were encountered: