[TYPO3-core] RFC #10092: Feature: Add a logging API for deprecated functions

Martin Kutschker masi-no at spam-typo3.org
Sat Jan 24 14:23:53 CET 2009


Ingmar Schlecht schrieb:
> Hi,
> 
> Oliver Hader wrote:
>> Hi Masi,
>>
>> Martin Kutschker schrieb:
>>> Committed to trunk (4841) with one change. I made the trigger ready for
>>> PHP 5.3
>>>
>>> 	if (defined('E_USER_DEPRECATED')) {
>>> 		trigger_error($errorMsg, E_USER_DEPRECATED);
>>> 	} else {
>>> 		trigger_error($errorMsg, E_USER_NOTICE);
>>> 	}
>> Thanks for this feature. However, I'd like to see a possibility in
>> TYPO3_CONF_VARS to disable the triggering of errors. The deprecated
>> notices are fine in a log file but will confuse visitors or editors of a
>> website since they cannot handle the message and are not in charge of
>> fixing the deprecated calls in extensions.
>>
>> Imagine an application that delivers data via JSON and still uses
>> t3lib_div::array2json() - if the user does not have FireBug installed or
>> is not familar with searching for bugs - since it's just a just or
>> editor with no technical background, an extensions/application just
>> "seems not to be working"...
>>
>> What do you think?
> 
> Yep, we definitely need some way of disabling it - maybe we should even
> disable it by default.
> 
> I was just trying to use the extension manager after that fix had been
> committed, and I could hardly use it for all the notice messages in the
> way. So I think we should disable the notices by default but have the
> functionality there for the developers to enable it when hunting for
> deprecated function calls.

Hm, I think the more pressure we create the better. The admin doesn't
need to "fix" the problem. It's enough if he sends the extension author
an email to upgrade the extension. BTW, the patch uses notices. I guess
most folks don't log notices anyway.

Of course we could make a switch, but then you can remove it altogether
as we have the also the TYPO3 deprecation log.

What I had also in mind is to make a call to trigger_error() only is the
function is to be removed in the next version of TYPO3.

Masi


More information about the TYPO3-team-core mailing list