0
votes

I would like to override a method of TYPO3 system extension "instal" -> Class TYPO3\CMS\Install\SystemEnvironment\Check with my own class VENDOR\Examples\Xclass\Backend\Check but it's not working.

Other classes in the system extesion for example as TYPO3\CMS\Backend\Controller\LoginController or TYPO3\CMS\Backend\Template\DocumentTemplate can I without problems with the help of XLASS overwrite.

It is generally possible to overwrite the install tools classes from own extension?

<?php

defined('TYPO3_MODE') || die('Access denied.');

if (TYPO3_MODE === 'BE') {

    $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['TYPO3\\CMS\\Install\\SystemEnvironment\\Check'] = array(
        'className' => 'ALEX\\Examples\\Xclass\\Backend\\Check'
    );

    $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['TYPO3\\CMS\\Backend\\Controller\\LoginController'] = array(
        'className' => 'ALEX\\Examples\\Xclass\\Backend\\LoginController'
    );

    $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['TYPO3\\CMS\\Backend\\Template\\DocumentTemplate'] = array(
        'className' => 'ALEX\\Examples\\Xclass\\Backend\\DocumentTemplate'
    );
}
1
Not 100% sure if it works out but you can copy the install extension, change the composer package name in your clone, and add an replace key. ``` "replace": { "typo3/cms-install":"self.version" } ``` This way you can at least customize the extension as you desire.Spears
I tried but it's not working :(fuchsa

1 Answers

0
votes

This is not possible as the class is not called via GeneralUtility::makeInstance. Furthermore it is also stated in the class:

@internal This class is only meant to be used within EXT:install and is not part of the TYPO3 Core API.

If you are missing a feature or think you got a bug you should open an issue at https://forge.typo3.org/projects/typo3cms-core/issues