[TYPO3-dev] Extensions need update for 4.3!
Steffen Kamper
info at sk-typo3.de
Fri Oct 10 10:10:44 CEST 2008
Hi,
Dmitry Dulepov schrieb:
> Hi!
>
> Steffen Kamper wrote:
>> i didn't expected such "philosophical" discussion in this thread, my
>> original intesion was to inform that devs are update their extension
>> to work proper.
>>
>> Now we are at a point where decision may be difficult, and i want to
>> make a new suggestion.
>>
>> The way of the function isn't consequent too:
>> * there is type hinting with array but in the function there is a
>> check for !array
>> * 2 parameters use type hinting, one not
>> * the function also causes problems, Dmitry wrote about in his blog,
>> cache tables are filled with results of this function.
>>
>> So here is my suggestion:
>> * remove type hinting so function will not stop work
>> * mark function as deprecated so it will be removed in 4.5
>> * write a new function that makes it proper, cleaner code and better
>> cache handling, now having a better cache mechanism we should use it
>
> This is too extreme. We do not remove functions like that.
>
> I thought over night and I think I am ready to accept Ernesto's
> suggestions. It sounds like a good solution for all cases:
>
> function foo(array $bar = null)) {
> if (!is_array($bar)) {
> $bar = array();
> }
> }
>
fine :-) that will put oil on troubled waters!
> Second thing is to rewrite the function. I would add another flag, which
> is named $noCache and by default set to true. This looks strange for a
> function named "...Cached" but it preserves compatibility and solves
> caching problem.
>
First i thought - we don't need that as there is a function
substituteMarkerArray.
But this is not the same as it only use markerContentArray.
As we can't change that one because compatibility i would make a new
function that does the same but without cache.
(Which brings me back to the idea we discussed a while ago to use a
template engine like smarty).
General rewrite of the function substituteMarkerArrayCached is required
anyway!
vg Steffen
More information about the TYPO3-dev
mailing list