[TYPO3-english] Upgrade vs. migration from 3.8.0

Xavier Perseguers xavier.perseguers at typo3.org
Tue Nov 10 08:39:04 CET 2015


Hi Fabian,

> course do not work anymore. I was wondering if there is any way to
> update the extensions or do I have to create new custom ones using the
> extension builder? If that is the case how would I go about migrating
> the data from the old extensions to the new ones?

Of course you can upgrade your extensions. Since you are upgrading from
3.8, there will be a bit of work but nothing infeasible.

One of the big changes from 4.x to 6.x was the use of namespace for the
Core. So every call to e.g., t3lib_div::whatever is now
\TYPO3\CMS\Core\Utility\GeneralUtility::whatever.

You find the mapping in
https://typo3.org/extensions/repository/view/compatibility6 (extension
you may certainly want to install to help you a bit during the
migration). The list is here:
https://github.com/FriendsOfTYPO3/compatibility6/blob/master/Migrations/Code/ClassAliasMap.php

Then you may find that some method were moved out of (again) e.g.,
GeneralUtility. One easy way I'd suggest would be to look for the
corresponding name in Core 4.5, possibly 4.7 and 6.0/6.2 to read how it
was depreciated and how you can change your code for the new way (it's
really just a comment, no need to "run" the corresponding version of
TYPO3). E.g.,

https://git.typo3.org/Packages/TYPO3.CMS.git/blob/refs/heads/TYPO3_6-2:/typo3/sysext/core/Classes/Utility/GeneralUtility.php#l771

You read:

	/**
	 * Returns an integer from a three part version number, eg '4.12.3' ->
4012003
	 *
	 * @param string $verNumberStr Version number on format x.x.x
	 * @return integer Integer version of version number (where each part
can count to 999)
	 * @deprecated Use VersionNumberUtility::convertVersionNumberToInteger
instead, will be removed after 6.2
	 */
	static public function int_from_ver($verNumberStr) {
		self::logDeprecatedFunction();
		return VersionNumberUtility::convertVersionNumberToInteger($verNumberStr);
	}

So from now on it's not GeneralUtility::int_from_ver() anymore but
VersionNumberUtility::convertVersionNumberToInteger(); meaning any call
you had to

t3lib_div::int_from_ver()

is now

\TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger().

I guess you got it :)

Have fun!

-- 
Xavier Perseguers
TYPO3 CMS Team

TYPO3 .... inspiring people to share!
Get involved: http://typo3.org


More information about the TYPO3-english mailing list