TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ExtensionCompatibilityTester Class Reference
Inheritance diagram for ExtensionCompatibilityTester:
AbstractAjaxAction AbstractAction ActionInterface

Public Member Functions

 __construct ()
 
 logError ()
 
- Public Member Functions inherited from AbstractAjaxAction
 handle ()
 
- Public Member Functions inherited from AbstractAction
 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManager $objectManager)
 
 injectView (\TYPO3\CMS\Install\View\FailsafeView $view)
 
 handle ()
 
 setToken ($token)
 
 setController ($controller)
 
 setAction ($action)
 
 setPostValues (array $postValues)
 
 setLastError (array $lastError)
 
 setMessages (array $messages=array())
 

Protected Member Functions

 executeAction ()
 
 deleteProtocolFile ()
 
 getExtensionsToLoad ()
 
 getExtensionsToExclude ()
 
 tryToLoadExtLocalconfAndExtTablesOfExtensions (array $extensions)
 
 loadExtTablesForExtension ($extensionKey, array $extension)
 
 loadExtLocalconfForExtension ($extensionKey, array $extension)
 
 writeCurrentExtensionToFile ($extensionKey)
 
 removeCurrentExtensionFromFile ($extensionKey)
 

Protected Attributes

 $protocolFile = ''
 
 $errorProtocolFile = ''
 
 $logError = false
 

Detailed Description

Load Extensions

The idea is to load ext_localconf and ext_tables of extensions one-by-one until one of those files throws a fatal. The javascript will then recognise the fatal and initiates another run that will leave out the fataling extension to check the rest.

Definition at line 28 of file ExtensionCompatibilityTester.php.

Constructor & Destructor Documentation

__construct ( )

Construct this class set default protocol file location

Definition at line 55 of file ExtensionCompatibilityTester.php.

Member Function Documentation

deleteProtocolFile ( )
protected

Delete the protocol files if they exist

Returns
void

Definition at line 84 of file ExtensionCompatibilityTester.php.

Referenced by ExtensionCompatibilityTester\executeAction().

executeAction ( )
protected

Main entry point for checking extensions to load, setting up the checks (deleting protocol), and returning OK if process run through without errors

Returns
string "OK" if process ran through without errors

Definition at line 68 of file ExtensionCompatibilityTester.php.

References GeneralUtility\_GET(), ExtensionCompatibilityTester\deleteProtocolFile(), ExtensionCompatibilityTester\getExtensionsToLoad(), and ExtensionCompatibilityTester\tryToLoadExtLocalconfAndExtTablesOfExtensions().

getExtensionsToExclude ( )
protected

Gets extensions already known to be incompatible This class is recursively called, and this method is needed to not run into the same errors twice.

Returns
array

Definition at line 120 of file ExtensionCompatibilityTester.php.

References GeneralUtility\getUrl(), and GeneralUtility\trimExplode().

Referenced by ExtensionCompatibilityTester\getExtensionsToLoad().

getExtensionsToLoad ( )
protected

Get extensions that should be loaded. Fills the TYPO3_LOADED_EXT array. Only considers local extensions

Returns
array

Definition at line 101 of file ExtensionCompatibilityTester.php.

References $GLOBALS, and ExtensionCompatibilityTester\getExtensionsToExclude().

Referenced by ExtensionCompatibilityTester\executeAction().

loadExtLocalconfForExtension (   $extensionKey,
array  $extension 
)
protected

Loads ext_localconf.php for a single extension. Method is a modified copy of the original bootstrap method.

Parameters
string$extensionKey
\ArrayAccess$extension
Returns
void

Definition at line 184 of file ExtensionCompatibilityTester.php.

References $_EXTCONF, and $GLOBALS.

Referenced by ExtensionCompatibilityTester\tryToLoadExtLocalconfAndExtTablesOfExtensions().

loadExtTablesForExtension (   $extensionKey,
array  $extension 
)
protected

Loads ext_tables.php for a single extension. Method is a modified copy of the original bootstrap method.

Parameters
string$extensionKey
\ArrayAccess$extension
Returns
void

Definition at line 157 of file ExtensionCompatibilityTester.php.

References $_EXTCONF, $GLOBALS, and ExtensionManagementUtility\loadNewTcaColumnsConfigFiles().

Referenced by ExtensionCompatibilityTester\tryToLoadExtLocalconfAndExtTablesOfExtensions().

logError ( )
removeCurrentExtensionFromFile (   $extensionKey)
protected

Removes $extensionKey from protocol file.

Parameters
string$extensionKey
Returns
void

Definition at line 221 of file ExtensionCompatibilityTester.php.

References GeneralUtility\getUrl(), ExtensionCompatibilityTester\logError(), GeneralUtility\trimExplode(), and GeneralUtility\writeFile().

Referenced by ExtensionCompatibilityTester\tryToLoadExtLocalconfAndExtTablesOfExtensions().

tryToLoadExtLocalconfAndExtTablesOfExtensions ( array  $extensions)
protected

Tries to load the ext_localconf and ext_tables files of all non-core extensions Writes current extension name to file and deletes it again when inclusion was successful.

Parameters
array$extensions
Returns
void

Definition at line 134 of file ExtensionCompatibilityTester.php.

References ExtensionCompatibilityTester\loadExtLocalconfForExtension(), ExtensionCompatibilityTester\loadExtTablesForExtension(), ExtensionCompatibilityTester\removeCurrentExtensionFromFile(), and ExtensionCompatibilityTester\writeCurrentExtensionToFile().

Referenced by ExtensionCompatibilityTester\executeAction().

writeCurrentExtensionToFile (   $extensionKey)
protected

Writes $extensionKey to the protocol file by adding it comma separated at the end of the file.

Parameters
string$extensionKey
Returns
void

Definition at line 207 of file ExtensionCompatibilityTester.php.

References GeneralUtility\getUrl(), ExtensionCompatibilityTester\logError(), GeneralUtility\trimExplode(), and GeneralUtility\writeFile().

Referenced by ExtensionCompatibilityTester\tryToLoadExtLocalconfAndExtTablesOfExtensions().

Member Data Documentation

$errorProtocolFile = ''
protected

Definition at line 42 of file ExtensionCompatibilityTester.php.

$logError = false
protected

Definition at line 49 of file ExtensionCompatibilityTester.php.

$protocolFile = ''
protected

Definition at line 35 of file ExtensionCompatibilityTester.php.