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

Ingmar Schlecht ingmar at typo3.org
Wed Nov 23 12:33:08 CET 2011


Hi Francois,

I agree the situation is quite suboptimal.

Especially due to things like that, I think the depreation log should be 
turned off by default.

What would be even greater though would be to have a live and a dev 
context for TYPO3, where in the dev context you would have such settings:

extCache = false
ext_autoload caching = false
deprecation_log = true
...

and in live context you'd have just the opposite of those settings:
extCache = true
ext_autoload caching = true
deprecation_log = false
...

That way I would be happy with the situation as it is and it would even 
make life easier for developers to just set a single setting to turn off 
all the settings that usually make life harder when developing 
(extCache, ext_autoload cache, etc.).

cheers
Ingmar



Am 23.11.11 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