[TASK] Deprecate FileCollection models 41/63641/6
authorGeorg Ringer <georg.ringer@gmail.com>
Mon, 9 Mar 2020 13:21:56 +0000 (14:21 +0100)
committerFrank Nägler <frank.naegler@typo3.org>
Fri, 13 Mar 2020 20:31:23 +0000 (21:31 +0100)
The classes have been marked as internal and never contained any logic.
Therefore and in order to streamline the codebase of Extbase,
the files will be removed with TYPO3 11.0.

Resolves: #90692
Releases: master
Change-Id: I12398224f729672d6503285ba7d7e9dd10de1d18
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63641
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Alexander Schnitzler <git@alexanderschnitzler.de>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Alexander Schnitzler <git@alexanderschnitzler.de>
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
typo3/sysext/core/Documentation/Changelog/master/Deprecation-90692-DeprecateFileCollectionModels.rst [new file with mode: 0644]
typo3/sysext/extbase/Classes/Domain/Model/AbstractFileCollection.php
typo3/sysext/extbase/Classes/Domain/Model/FolderBasedFileCollection.php
typo3/sysext/extbase/Classes/Domain/Model/StaticFileCollection.php
typo3/sysext/extbase/Classes/Property/TypeConverter/AbstractFileCollectionConverter.php
typo3/sysext/extbase/Classes/Property/TypeConverter/FolderBasedFileCollectionConverter.php
typo3/sysext/extbase/Classes/Property/TypeConverter/StaticFileCollectionConverter.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-90692-DeprecateFileCollectionModels.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-90692-DeprecateFileCollectionModels.rst
new file mode 100644 (file)
index 0000000..02dee67
--- /dev/null
@@ -0,0 +1,41 @@
+.. include:: ../../Includes.txt
+
+=====================================================
+Deprecation: #90692 - Deprecate FileCollection models
+=====================================================
+
+See :issue:`90692`
+
+Description
+===========
+
+The following classes have been marked as deprecated:
+
+- :php:`\TYPO3\CMS\Extbase\Domain\Model\StaticFileCollection`
+- :php:`\TYPO3\CMS\Extbase\Domain\Model\FolderBasedFileCollection`
+- :php:`\TYPO3\CMS\Extbase\Domain\Model\AbstractFileCollection`
+- :php:`\TYPO3\CMS\Extbase\Property\TypeConverter\StaticFileCollectionConverter`
+- :php:`\TYPO3\CMS\Extbase\Property\TypeConverter\FolderBasedFileCollectionConverter`
+- :php:`\TYPO3\CMS\Extbase\Property\TypeConverter\AbstractFileCollectionConverter`
+
+The classes have been marked as internal and never contained any logic. Therefore and in order to streamline the codebase of Extbase, the files will be removed with TYPO3 11.0.
+
+
+Impact
+======
+
+Using any of the mentioned classes will trigger a PHP deprecation warning.
+
+
+Affected Installations
+======================
+
+Any TYPO3 installation with a third-party extension using the classes.
+
+
+Migration
+=========
+
+Copy the classes to your own extension and adopt the usages.
+
+.. index:: PHP-API, FullyScanned, ext:extbase
index 49da2cb..1e62133 100644 (file)
@@ -18,9 +18,18 @@ namespace TYPO3\CMS\Extbase\Domain\Model;
  * A file object (File Abstraction Layer)
  *
  * @internal experimental! This class is experimental and subject to change!
+ * @deprecated since TYPO3 10.4, will be removed in version 11.0
  */
 abstract class AbstractFileCollection extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
 {
+    public function __construct()
+    {
+        trigger_error(
+            __CLASS__ . ' is deprecated since TYPO3 10.4 and will be removed in version 11.0',
+            E_USER_DEPRECATED
+        );
+    }
+
     /**
      * @var \TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection
      */
index d1ce92e..a56c502 100644 (file)
@@ -18,6 +18,7 @@ namespace TYPO3\CMS\Extbase\Domain\Model;
  * A file collection object (File Abstraction Layer)
  *
  * @internal experimental! This class is experimental and subject to change!
+ * @deprecated since TYPO3 10.4, will be removed in version 11.0
  */
 class FolderBasedFileCollection extends \TYPO3\CMS\Extbase\Domain\Model\AbstractFileCollection
 {
index 3528b9e..fff8162 100644 (file)
@@ -18,6 +18,7 @@ namespace TYPO3\CMS\Extbase\Domain\Model;
  * A file collection object (File Abstraction Layer)
  *
  * @internal experimental! This class is experimental and subject to change!
+ * @deprecated since TYPO3 10.4, will be removed in version 11.0
  */
 class StaticFileCollection extends \TYPO3\CMS\Extbase\Domain\Model\AbstractFileCollection
 {
index 3bd7bc6..e4541c8 100644 (file)
@@ -20,6 +20,7 @@ namespace TYPO3\CMS\Extbase\Property\TypeConverter;
  * Converter which transforms simple types to \TYPO3\CMS\Extbase\Domain\Model\File.
  *
  * @internal experimental! This class is experimental and subject to change!
+ * @deprecated since TYPO3 10.4, will be removed in version 11.0
  */
 abstract class AbstractFileCollectionConverter extends \TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter
 {
index c552e21..0309d69 100644 (file)
@@ -20,6 +20,7 @@ namespace TYPO3\CMS\Extbase\Property\TypeConverter;
  * Converter which transforms simple types to \TYPO3\CMS\Extbase\Domain\Model\FileCollection.
  *
  * @internal experimental! This class is experimental and subject to change!
+ * @deprecated since TYPO3 10.4, will be removed in version 11.0
  */
 class FolderBasedFileCollectionConverter extends \TYPO3\CMS\Extbase\Property\TypeConverter\AbstractFileCollectionConverter
 {
index a45eaef..f9b3e00 100644 (file)
@@ -20,6 +20,7 @@ namespace TYPO3\CMS\Extbase\Property\TypeConverter;
  * Converter which transforms simple types to \TYPO3\CMS\Extbase\Domain\Model\FileCollection.
  *
  * @internal experimental! This class is experimental and subject to change!
+ * @deprecated since TYPO3 10.4, will be removed in version 11.0
  */
 class StaticFileCollectionConverter extends \TYPO3\CMS\Extbase\Property\TypeConverter\AbstractFileCollectionConverter
 {
index 3ad1a36..eabc22a 100644 (file)
@@ -1377,4 +1377,34 @@ return [
             'Deprecation-90686-DeprecateModelFileMount.rst',
         ],
     ],
+    'TYPO3\CMS\Extbase\Domain\Model\StaticFileCollection' => [
+        'restFiles' => [
+            'Deprecation-90692-DeprecateFileCollectionModels.rst',
+        ],
+    ],
+    'TYPO3\CMS\Extbase\Domain\Model\FolderBasedFileCollection' => [
+        'restFiles' => [
+            'Deprecation-90692-DeprecateFileCollectionModels.rst',
+        ],
+    ],
+    'TYPO3\CMS\Extbase\Domain\Model\AbstractFileCollection' => [
+        'restFiles' => [
+            'Deprecation-90692-DeprecateFileCollectionModels.rst',
+        ],
+    ],
+    'TYPO3\CMS\Extbase\Property\TypeConverter\StaticFileCollectionConverter' => [
+        'restFiles' => [
+            'Deprecation-90692-DeprecateFileCollectionModels.rst',
+        ],
+    ],
+    'TYPO3\CMS\Extbase\Property\TypeConverter\FolderBasedFileCollectionConverter' => [
+        'restFiles' => [
+            'Deprecation-90692-DeprecateFileCollectionModels.rst',
+        ],
+    ],
+    'TYPO3\CMS\Extbase\Property\TypeConverter\AbstractFileCollectionConverter' => [
+        'restFiles' => [
+            'Deprecation-90692-DeprecateFileCollectionModels.rst',
+        ],
+    ],
 ];