[!!!][TASK] Drop evaluation of @transient annotations 84/58884/9
authorAlexander Schnitzler <git@alexanderschnitzler.de>
Sat, 10 Nov 2018 15:05:49 +0000 (16:05 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Thu, 20 Dec 2018 18:42:15 +0000 (19:42 +0100)
@transient will no longer exclude domain model properties from
the processing of the persistence layer

Releases: master
Resolves: #86905
Change-Id: I45684e335089f6706c12669ccf49669c1b9d3297
Reviewed-on: https://review.typo3.org/58884
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst
typo3/sysext/extbase/Classes/Reflection/ClassSchema.php
typo3/sysext/extbase/Tests/UnitDeprecated/Reflection/Fixture/DummyClassWithAllTypesOfProperties.php
typo3/sysext/extbase/Tests/UnitDeprecated/Reflection/ReflectionServiceTest.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyAnnotationMatcher.php

index 169d80a..049a590 100644 (file)
@@ -249,18 +249,6 @@ class ClassSchema
                 $this->properties[$propertyName]['annotations']['transient'] = true;
             }
 
-            if ($docCommentParser->isTaggedWith('transient')) {
-                $this->properties[$propertyName]['annotations']['transient'] = true;
-                trigger_error(
-                    sprintf(
-                        'Property %s::%s is tagged with @transient which is deprecated and will be removed in TYPO3 v10.0.',
-                        $reflectionClass->getName(),
-                        $reflectionProperty->getName()
-                    ),
-                    E_USER_DEPRECATED
-                );
-            }
-
             if ($propertyName !== 'settings'
                 && ($annotationReader->getPropertyAnnotation($reflectionProperty, Inject::class) instanceof Inject)
             ) {
@@ -275,7 +263,7 @@ class ClassSchema
                 }
             }
 
-            if ($docCommentParser->isTaggedWith('var') && !$docCommentParser->isTaggedWith('transient')) {
+            if ($docCommentParser->isTaggedWith('var') && $this->properties[$propertyName]['annotations']['transient'] === false) {
                 if (($annotation = $annotationReader->getPropertyAnnotation($reflectionProperty, Cascade::class)) instanceof Cascade) {
                     /** @var Cascade $annotation */
                     $this->properties[$propertyName]['annotations']['cascade'] = $annotation->value;
index a6729b5..31b26b6 100644 (file)
@@ -48,11 +48,6 @@ class DummyClassWithAllTypesOfProperties
     public $propertyWithInjectAnnotation;
 
     /**
-     * @transient
-     */
-    public $propertyWithTransientAnnotation;
-
-    /**
      * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithAllTypesOfProperties>
      */
     public $propertyWithObjectStorageAnnotation;
index 8494e3c..325d2d7 100644 (file)
@@ -310,7 +310,6 @@ class ReflectionServiceTest extends UnitTestCase
                 'privateStaticProperty',
                 'propertyWithIgnoredTags',
                 'propertyWithInjectAnnotation',
-                'propertyWithTransientAnnotation',
                 'propertyWithObjectStorageAnnotation'
             ],
             $service->getClassPropertyNames(Fixture\DummyClassWithAllTypesOfProperties::class)
index e79851c..91b4562 100644 (file)
@@ -19,6 +19,7 @@ return [
         'restFiles' => [
             'Feature-83092-ReplaceTransientWithTYPO3CMSExtbaseAnnotationORMTransient.rst',
             'Deprecation-83092-ReplaceTransientWithTYPO3CMSExtbaseAnnotationORMTransient.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     '@cascade' => [