Project

General

Profile

Actions

Feature #15778

closed

Proposal for constant "TYPO3_compat_version"

Added by Christian Trabold over 18 years ago. Updated over 17 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2006-03-08
Due date:
% Done:

0%

Estimated time:
PHP Version:
4
Tags:
Complexity:
Sprint Focus:

Description

Hello!

What do you think about a constant like for example "TYPO3_version_compat" or "TYPO3_compat_version" - or even "compatVersion" if you want to get it in sync with the TypoScript-Condition - that developers could build on in own Extensions.

IMHO there is just "TYPO3_version" for the "real" TYPO3-Version-Number and the "TYPO3_branch", but no no direct way to access the current compat version via a constant.

[OK "$TYPO3_CONF_VARS['SYS']['compat_version']" if you like playing with long var names ;)]

Does it make sense to you to introduce such a new constant?

/*
A quick hack to demonstrate this. Add to config_default.php:
*/

require(PATH_typo3conf.'localconf.php');

$cVersion = t3lib_div::int_from_ver($TYPO3_CONF_VARS['SYS']['compat_version']);
$rVersion = t3lib_div::int_from_ver(TYPO3_version);

if (!empty($cVersion) && ($cVersion != $rVersion)) {
// if compat version is set take that
$compatVersion = $TYPO3_CONF_VARS['SYS']['compat_version'];
} else {
// take regular version as compat version - for the developer everything stays as it is
$compatVersion = TYPO3_version;
}

define('TYPO3_compat_version', $compatVersion);

(issue imported from #M2789)

Actions #1

Updated by Michael Stucki over 18 years ago

Sebastian, could you please have a look at this?

Actions #2

Updated by Sebastian Kurfuerst over 18 years ago

keyword:t3dd06

Actions #3

Updated by Ernesto Baschny over 18 years ago

I don't think we need a constant for that. There is t3lib_div::compat_version method that can be used to do such kind of "condition checks" in your extensions.

Actions #4

Updated by Michael Stucki over 18 years ago

Finally I agree, so let's close this bug until other arguments pop in...

Actions

Also available in: Atom PDF