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

Lorenz Ulrich lorenz-typo3 at visol.ch
Wed Nov 23 16:23:18 CET 2011


Hi François

In DAM (at least in the upcoming release) we just use a wrapper function 
to tacke this problem.

https://review.typo3.org/#change,5483

This is no big deal. I don't want to judge whether the decision to 
deprecate it was ok or not... seems you already got enough feedback :-).

Best regards,

Lorenz

Am 23.11.2011 09:29, schrieb François Suter:
> 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
>



More information about the TYPO3-project-v4 mailing list