// Log a deprecated function in your code GeneralUtility::logDeprecatedFunction('my_deprecated_function', 'This function is deprecated and will be removed in future updates');
// Check if a function is deprecated before executing it if (GeneralUtility::deprecationLogInstance()->isFunctionDeprecated('my_deprecated_function')) { // Log the deprecated function GeneralUtility::logDeprecatedFunction('my_deprecated_function', 'This function is deprecated and will be removed in future updates'); // Execute the new function instead my_new_function(); } else { // Execute the original function my_deprecated_function(); }In both examples, we use the GeneralUtility logDeprecatedFunction function to log a deprecated function in our code. In the first example, we simply log the deprecated function. In the second example, we check if the function is deprecated before executing it, and if it is, we log the function and execute a new function instead. Overall, the GeneralUtility logDeprecatedFunction function is a useful tool for ensuring that your code is up-to-date with the latest version of TYPO3. By logging deprecated functions, you can identify areas of your code that need to be updated and ensure that your code runs smoothly with future updates of TYPO3.