From 7effbff267ab866c31e0da4dcd279d88dac29ad0 Mon Sep 17 00:00:00 2001
From: Wouter Wolters <typo3@wouterwolters.nl>
Date: Sat, 7 May 2016 14:04:57 +0200
Subject: [PATCH] [TASK] Deprecate the $icon setter/getter in the Extbase
 Category model
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Resolves: #75904
Releases: master
Change-Id: Ifa27348ae8204af7cac777756282016a88b0be6b
Reviewed-on: https://review.typo3.org/48034
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Paul Ilea <paul@target-e.com>
Reviewed-by: Marcin Krzyżanowski <m.krzyzanowski@macopedia.pl>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
---
 ...ModelHasIconPropertyButNoDatabaseField.rst | 27 +++++++++++++++++++
 .../extbase/Classes/Domain/Model/Category.php |  6 +++--
 2 files changed, 31 insertions(+), 2 deletions(-)
 create mode 100644 typo3/sysext/core/Documentation/Changelog/master/Deprecation-75904-CategoryModelHasIconPropertyButNoDatabaseField.rst

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-75904-CategoryModelHasIconPropertyButNoDatabaseField.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-75904-CategoryModelHasIconPropertyButNoDatabaseField.rst
new file mode 100644
index 000000000000..9fde72a4a802
--- /dev/null
+++ b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-75904-CategoryModelHasIconPropertyButNoDatabaseField.rst
@@ -0,0 +1,27 @@
+============================================================================
+Deprecation: #75904 - Category Model has icon property but no database field
+============================================================================
+
+Description
+===========
+
+Methods :php:``\TYPO3\CMS\Extbase\Domain\Model\Category::getIcon`` and
+:php:``\TYPO3\CMS\Extbase\Domain\Model\Category::setIcon`` have been marked as deprecated.
+
+
+Impact
+======
+
+Using the methods will trigger a deprecation log entry.
+
+
+Affected Installations
+======================
+
+Instances with custom extensions that use these methods.
+
+
+Migration
+=========
+
+Implement the methods by yourself.
diff --git a/typo3/sysext/extbase/Classes/Domain/Model/Category.php b/typo3/sysext/extbase/Classes/Domain/Model/Category.php
index e1ff9f2b9bb9..0873e918da90 100644
--- a/typo3/sysext/extbase/Classes/Domain/Model/Category.php
+++ b/typo3/sysext/extbase/Classes/Domain/Model/Category.php
@@ -93,10 +93,11 @@ class Category extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
      * Returns the icon
      *
      * @return string $icon
-     * @api
+     * @deprecated since TYPO3 v8, will be removed in TYPO3 v9
      */
     public function getIcon()
     {
+        \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
         return $this->icon;
     }
 
@@ -105,10 +106,11 @@ class Category extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
      *
      * @param string $icon
      * @return void
-     * @api
+     * @deprecated since TYPO3 v8, will be removed in TYPO3 v9
      */
     public function setIcon($icon)
     {
+        \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
         $this->icon = $icon;
     }
 
-- 
GitLab