Remove deprecation-related methods with trigger_error()
In PHP, there is trigger_error(), (see http://php.net/manual/en/function.trigger-error) which is intended to be used to trigger PHP errors / warnings etc. It can be called with the parameter E_USER_DEPRECATED (http://php.net/manual/en/errorfunc.constants.php) which is exactly there for deprecating user-generated framework code, like we do.
Hiding and showing the errors can be dealt with with our exception handlers, PHP’s system logs etc. and thus allows for methods to show deprecations even into Elastic Search by that (syslog).
I propose to replace our custom deprecation log logic completely with PHP’s internal method, and use that for 9.0.
- We deprecate our deprecation methods in GeneralUtility (deprecationLog, getDeprecationLogFileName, logDeprecatedViewHelperAttribute, logDeprecatedFunction)
- We remove the option $GLOBALS[‘TYPO3_CONF_VARS’][‘SYS’][‘enableDeprecationLog’]
- We change all places we have already deprecated for v9 and use trigger_error() instead
- We update our deprecation info in the contributors guide / coding guidelines
- We can use PHP’s native error logging functionality, which is faster and offers more flexibility.
- We don’t write log files into a public directory anymore by default
- We change rules that people understood and are comfortable with (using deprecation log)
Topic Initiator: Benni Mack
Topic Mentor: Susi Moog