[TYPO3-core] Proper usage of @deprecated

François Suter fsu-lists at cobweb.ch
Tue Jul 9 20:49:25 CEST 2013


Hi all,

I recently stumbled over 2 wrong usages of @deprecated in the Core (one 
I can't remember, the other is 
\TYPO3\CMS\Extbase\Object\ObjectManager::create()). In these 2 cases, 
the method is marked as deprecated but the message does not indicate by 
what other method it is replaced. This is extremely frustrating when one 
does not know the context and thus has little chance of guessing the 
replacement.

It must be said - however - that the coding guidelines are not explicit 
in this regard, and even outright wrong in the example usage of 
\TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction(). [1]

If I can spare a minute I'll patch the CGL. If anyone feels like doing 
before me, don't hesitate ;-)

In the meantime, please make sure to always include the replacement 
method when deprecating a function. This will definitely improve the 
smoothness of the transition to 6.2.

Cheers

-- 

Francois Suter

Work: Cobweb Development Sarl - http://www.cobweb.ch

TYPO3: Help the project! - http://typo3.org/contribute/

Appreciate my work? Support me -
http://www.monpetitcoin.com/en/francois/support-me/

[1] 
http://docs.typo3.org/typo3cms/CodingGuidelinesReference/CodingBestPractices/HandlingDeprecation/Index.html


More information about the TYPO3-team-core mailing list