[TYPO3-v4] Dropping the compat_version

Ernesto Baschny [cron IT] ernst at cron-it.de
Wed Oct 26 12:36:57 CEST 2011


Benjamin Mack schrieb am 25.10.2011 16:30:
> Hey all,
> 
> I think the most important thing is actually, to get rid of
> compat_version flags that consider something like compat_version(4.0) as
> we could remove everything below 4.4 (which is now deprecated anyway).
> This would also mean that we should remove all very old
> css_styled_content templates that are still floating around.
> 
> Basically I see it like this:
> 
> If I do a upgrade to an older version, I am upgrading all at once, and
> can keep an older version to see the changes in TypoScript, but as we
> now have nice upgrade wizards, i don't see such a big problem. That goes
> for the TypoScript stuff.
> 
> For all options in the code, I would recommend removing all options
> prior to 4.4.
> 
> Btw: The switch is VERY useful in cases where the TCA[types] stuff
> changes all the time, and extensions can stay compatible (See realurl),
> so I would love to keep this function.

The switch is something the *user* can set. Extensions should stay
compatible by queriying the current TYPO3 version and not the
compat_version. Or am I missing something?

> So: -1 for removing it, +1 for removing old legacy code and templates
> all around the core.

I say the calls in realurl ext_tables.php, but I guess they are just
wrong: what if I run 4.5 with "compat_version=4.2"? The TCA of 4.5 will
still "kick in" and so realurl will add the fields in incorrect positions.

It makes more sense to do this like this:

if (t3lib_div::int_from_ver(TYPO3_version) >= 4003000) {
   ...

Cheers,
Ernesto




More information about the TYPO3-project-v4 mailing list