From 4485151ffb2c1adbf5c80a1b8d50228834dae9c0 Mon Sep 17 00:00:00 2001
From: Georg Ringer <georg.ringer@gmail.com>
Date: Mon, 30 Jan 2017 20:24:07 +0100
Subject: [PATCH] [TASK] Deprecate ClientUtility::getDeviceType

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>
---
 .../core/Classes/Utility/ClientUtility.php    |  2 ++
 ...60-DeprecateClientUtilitygetDeviceType.rst | 26 +++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 typo3/sysext/core/Documentation/Changelog/master/Deprecation-79560-DeprecateClientUtilitygetDeviceType.rst

diff --git a/typo3/sysext/core/Classes/Utility/ClientUtility.php b/typo3/sysext/core/Classes/Utility/ClientUtility.php
index a64ff2bb0129..ed3442693a2f 100644
--- a/typo3/sysext/core/Classes/Utility/ClientUtility.php
+++ b/typo3/sysext/core/Classes/Utility/ClientUtility.php
@@ -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
index 000000000000..b5bbc4094271
--- /dev/null
+++ b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-79560-DeprecateClientUtilitygetDeviceType.rst
@@ -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
-- 
GitLab