[TYPO3-v4] Deprecation of t3lib_div::testInt() in TYPO3 4.6

François Suter fsu-lists at cobweb.ch
Wed Nov 23 09:29:36 CET 2011


Hi all,

As you are probably aware of several "mathematical" method were moved to 
a separate class from t3lib_div and methods such as t3lib_div::testInt() 
were marked as deprecated. As this is very commonly used in extensions, 
it absolutely floods the deprecation log to the point where it becomes 
nearly useless.

The problem I see is that in order to be compatible, extensions would 
have to call - for example - 
t3lib_utility_Math::canBeInterpretedAsInteger() instead of 
t3lib_div::testInt(). But this will obviously break compatibility with 
older version of TYPO3, in particular 4.5, with which many extensions 
certainly want to stay compatible with for a long time (given the Long 
Term Support of this version). Although this deprecation move does not 
seem very wise, we can't really turn back, but I was wondering which 
advice we should give to developer.

In effect the situation would mean that - for each testInt() call - we 
have to check whether class t3lib_utility_Math exists or not and call it 
instead of t3lib_div if it does. Probably this would better be wrapped 
inside one's own utility method.

Opinions?

Cheers

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch


More information about the TYPO3-project-v4 mailing list