[TYPO3-dev] Extensions need update for 4.3!

Dmitry Dulepov dmitry at typo3.org
Thu Oct 9 18:36:03 CEST 2008


Hi!

Ernesto Baschny [cron IT] wrote:
> That is not the point. It was also never disallowed. The semantic of the
> phpdoc comments was never really documented, strictly speaking.

What exactly was not disallowed? Do you mean you can pass whatever you want if argument description says "array"? Sorry, you can't. null is not different from false or empty string. If array is expected, it must be array, not null.

> 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.

Some extension that I inherited did it but I fixed those.

We do not do it because we can, we do it because of the quality. We are for improving quality, not for letting any junk code to pass whatever it wants.

> 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.

Broken extension can be easily fixed by changing null to a proper argument. Why are you resisting it? Why does it look good to you to pass wrong arguments to functions?

-- 
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/post-details/duplicate_content_with_realurl/




More information about the TYPO3-dev mailing list