[TYPO3-core] phpversion() vs PHP_VERSION

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Sun Jun 4 18:28:15 CEST 2006


Michael Stucki schrieb:
> Hi Martin,
> 
>> Which one to use? We use both methods in the Core. Is one of them preferred
>> or has a (dis)advantage over the other?
> 
> You probably mean $TYPO_version against TYPO3_version, right?
> 
> I recommend to use the constant because a) it can't be changed, and b) because 
> the name of the variable is wrong.
> 
> Probably you should mark the old variable as deprecated.

Done.

I've also unified the two checks for PHP5: the one for iconv and the 
other for the compatibility file.

Attached is the diff of the change.

And here I am again with my ideas for version numbers of TYPO3 in the CVS:

Branch TYPO3_4-0:

define('TYPO3_version', '4.0.1-CVS'); // now!!!
	// after 4.0.1 is out this will be 4.0.2-CVS
define('TYPO3_branch', '4.0-CVS');

Branch HEAD:

define('TYPO3_version', '4.1.0-CVS');
define('TYPO3_branch', '4.1-CVS');

Instead of "CVS" we could use "dev" to be a bit more compatible to 
version_compare(). Any version with "dev" will be considered smaller 
than the version without  (eg 4.1.0-dev < 4.1.0-alpha < < 4.1.0-beta < 
4.1.0-RC < < 4.1.0)

Without this change the version number will lack behind, instead of advance.

At least the version number in CVS should be different for both branches!

Masi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config_default.diff
Type: text/x-diff
Size: 1433 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060604/b260d7f4/attachment.bin 


More information about the TYPO3-team-core mailing list