Breaking: #101305 - Introduce type declarations for some methods in GeneralUtility

See forge#101305, forge#101453

Description

Native return and param type declarations have been introduced for the following methods of \TYPO3\CMS\Core\Utility\GeneralUtility:

  • addInstance()

  • array2xml()

  • callUserFunction()

  • cmpFQDN()

  • cmpIP()

  • cmpIPv4()

  • cmpIPv6()

  • copyDirectory()

  • createDirectoryPath()

  • createVersionNumberedFilename()

  • explodeUrl2Array()

  • fixPermissions()

  • flushInternalRuntimeCaches()

  • getAllFilesAndFoldersInPath()

  • getBytesFromSizeMeasurement()

  • getClassName()

  • getFileAbsFileName()

  • getFilesInDir()

  • getIndpEnv()

  • getInstances()

  • getLogger()

  • getSingletonInstances()

  • getUrl()

  • get_dirs()

  • get_tag_attributes()

  • implodeArrayForUrl()

  • implodeAttributes()

  • intExplode()

  • isAllowedAbsPath()

  • isOnCurrentHost()

  • isValidUrl()

  • jsonEncodeForHtmlAttribute()

  • jsonEncodeForJavaScript()

  • locationHeaderUrl()

  • makeInstanceForDi()

  • mkdir_deep()

  • mkdir()

  • normalizeIPv6()

  • purgeInstances()

  • quoteJSvalue()

  • removePrefixPathFromList()

  • removeSingletonInstance()

  • resetSingletonInstances()

  • resolveBackPath()

  • revExplode()

  • rmdir()

  • sanitizeLocalUrl()

  • setIndpEnv()

  • setSingletonInstance()

  • split_tag_attributes()

  • tempnam()

  • trimExplode()

  • unlink_tempfile()

  • upload_copy_move()

  • upload_to_tempfile()

  • validEmail()

  • validIP()

  • validIPv4()

  • validIPv6()

  • validPathStr()

  • webserverUsesHttps()

  • wrapJS()

  • writeFileToTypo3tempDir()

  • writeFile()

  • writeJavaScriptContentToTemporaryFile()

  • writeStyleSheetContentToTemporaryFile()

  • xml2arrayProcess()

  • xml2array()

  • xml2tree()

  • xmlRecompileFromStructValArray()

Impact

Calling any of the mentioned methods with invalid types will result in a PHP error.

Affected installations

Only those installations that use the mentioned methods with invalid types.

Migration

Make sure to pass parameters of the required types to the mentioned methods.