Upgrading to TYPO3 4.3 causes typo3 to write every call to a deprecated method to a file called deprecation_XXXXXXXXXX.log in the typo3conf folder. This kind of sucks and the file gets quite long. I found that main cause for this annoying behaviour are two function calls from extensions: »makeInstanceClassName« and »GPvar«. Either you upgrade all your extensions hoping the upgrade fixes the Problem or just perform the following in your ext folder. Make sure you backup all your extensions before you just copy paste!
grep -rl makeInstanceClassName * | grep ‚\.php$‘ | grep -v ‚/\.svn/‘ | xargs sed -i -e „s/makeInstanceClassName/makeInstance/g“
grep -rl GPvar * | grep ‚\.php$‘ | grep -v ‚/\.svn/‘ | xargs sed -i -e „s/GPvar/_GP/g“
If you want to make sure not to break anything just dry run the following two lines and read the output before you perform the two lines mentioned above:
grep -r makeInstanceClassName * | grep ‚\.php$‘ | grep -v ‚/\.svn/‘
grep -r GPvar * | grep ‚\.php$‘ | grep -v ‚/\.svn/‘
Hi,
usually you’d like to keep compatibility with older TYPO3 versions – therefore replacing the makeInstanceClassName directly with makeInstance might not be the best choice.
I’d suggest to transform such blocks:
into something like this:
This way you make sure that the deprecation.log doesn’t fill up and you can still use this extension for older TYPO3 versions.
Cheers,
Tolleiv
In most cases the workaround of Tolleiv is not necessary t3 moves forward not backward and I experienced 99,9% failsafeness doing so. Mark my words Make a backup!. In case you face difficulties you should seriously consider to get rid of the extension you are using (to say it might have other lacks also including security).
use insted of
if (version_compare(TYPO3_version,’4.3′,’>‘)) {
better
if (version_compare(TYPO3_version,’4.3′,’>=‘)) {