[TYPO3-dev] Extensions need update for 4.3!

Ernesto Baschny [cron IT] ernst at cron-it.de
Thu Oct 9 18:31:24 CEST 2008


Dmitry Dulepov wrote: on 09.10.2008 16:03:

> Ernesto Baschny [cron IT] wrote:
>> The API (meaning the "code") always allowed "NULL" values to be passed
>> as parameters, that has not changed even with PHP5. There was no type
>> hinting before (4.2 works fine in PHP5, not extension broke). We gain
>> nothing in changing it now apart from the fact that some extensions will
>> stop working. I don't see a reason to do that. We could stop people
>> passing strings or integers, that is ok ("education"), my suggestion was
>> exactly that: allow only arrays AND the NULL value (nothing else). Won't
>> break any extension, we still have type hinting, everybody happy?
>>
>> We need to use some common sense here and there in those kind of stuff.
> 
> I do not think it is named common sense :( It is stimulating bad coding
> style.
> 
> I think we should use Steffens suggestion instead ("array $param =
> array()").
> 
> We never declared we allow NULL.

That is not the point. It was also never disallowed. The semantic of the
phpdoc comments was never really documented, strictly speaking.

I am against to just "change it because we can" (to use the expression
that has gained popularity these days...). The change that breaks
backwards compatibility has to make some sense in a productive way. This
is just a destructive way of dealing with "bad coding style". The
extensions that pass an uninitialized var are not "bad", maybe even one
or two of your extensions do it.

We are just making ourselves more useless work. If you want to "filter
out" old and unmaintained extensions, there are probably better ways of
doing that than punishing the people using extensions that are probably
unmaintained for years, but still do a good job. And which probably were
"good code" at the point in time where they where written, where
everybody made those calls, maybe even kickstarter generated it. ;)

There are some changes that are of course not backwards compatible,
which will break extensions and which we did in the past (upgrade to
PHP5, change of paths and symlinks), but in most case there was a good
reason to do so, breaking the one or other existing extensions. In my
eyes this is not a good reason.

Cheers,
Ernesto




More information about the TYPO3-dev mailing list