[TASK] Deprecate ClientUtility::getDeviceType 76/51476/3
authorGeorg Ringer <georg.ringer@gmail.com>
Mon, 30 Jan 2017 19:24:07 +0000 (20:24 +0100)
committerSusanne Moog <susanne.moog@typo3.org>
Thu, 2 Feb 2017 14:19:17 +0000 (15:19 +0100)
The method ClientUtility::getDeviceType is not used
and completely outdated.

Resolves: #79560
Releases: master
Change-Id: Ib1b54a3a20aa70724e1995eb5d123ba4e0c218c1
Reviewed-on: https://review.typo3.org/51476
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/core/Classes/Utility/ClientUtility.php
typo3/sysext/core/Documentation/Changelog/master/Deprecation-79560-DeprecateClientUtilitygetDeviceType.rst [new file with mode: 0644]

index a64ff2b..ed34426 100644 (file)
@@ -185,9 +185,11 @@ class ClientUtility
      *
      * @param string $userAgent The useragent string, \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_USER_AGENT')
      * @return string Code for the specific device type
+     * @deprecated since TYPO3 v8, will be removed in TYPO3 v9
      */
     public static function getDeviceType($userAgent)
     {
+        GeneralUtility::logDeprecatedFunction();
         // Hook: $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/div/class.t3lib_utility_client.php']['getDeviceType']:
         $getDeviceTypeHooks = &$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/div/class.t3lib_utility_client.php']['getDeviceType'];
         if (is_array($getDeviceTypeHooks)) {
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-79560-DeprecateClientUtilitygetDeviceType.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-79560-DeprecateClientUtilitygetDeviceType.rst
new file mode 100644 (file)
index 0000000..b5bbc40
--- /dev/null
@@ -0,0 +1,26 @@
+.. include:: ../../Includes.txt
+
+============================================================
+Deprecation: #79560 - Deprecate ClientUtility::getDeviceType
+============================================================
+
+See :issue:`79560`
+
+Description
+===========
+
+The method :php:`\TYPO3\CMS\Core\Utility\ClientUtility::getDeviceType` is not used and completely outdated and has been marked as deprecated.
+
+
+Impact
+======
+
+Calling :php:`\TYPO3\CMS\Core\Utility\ClientUtility::getDeviceType` method will trigger a deprecation log entry. Code using this method will work until it is removed in TYPO3 v9.
+
+
+Affected Installations
+======================
+
+Any installation using the mentioned method :php:`\TYPO3\CMS\Core\Utility\ClientUtility::getDeviceType`.
+
+.. index:: PHP-API
\ No newline at end of file