[!!!][TASK] Drop evaluation of @lazy annotations 83/58883/7
authorAlexander Schnitzler <git@alexanderschnitzler.de>
Sat, 10 Nov 2018 15:00:58 +0000 (16:00 +0100)
committerBenni Mack <benni@typo3.org>
Thu, 20 Dec 2018 16:29:18 +0000 (17:29 +0100)
Using the @lazy annotation will no longer trigger the lazy loading
of domain model properties.

Releases: master
Resolves: #86900
Change-Id: I630f702713f1e0a654ff61b9c3bc5792ba101e4e
Reviewed-on: https://review.typo3.org/58883
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst
typo3/sysext/extbase/Classes/Reflection/ClassSchema.php
typo3/sysext/extbase/Tests/UnitDeprecated/Reflection/ClassSchemaTest.php
typo3/sysext/extbase/Tests/UnitDeprecated/Reflection/Fixture/DummyClassWithLazyProperty.php [deleted file]
typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyAnnotationMatcher.php

index 3eda3a5..42ebb1a 100644 (file)
@@ -245,18 +245,6 @@ class ClassSchema
                 $this->properties[$propertyName]['annotations']['lazy'] = true;
             }
 
-            if ($docCommentParser->isTaggedWith('lazy')) {
-                $this->properties[$propertyName]['annotations']['lazy'] = true;
-                trigger_error(
-                    sprintf(
-                        'Property %s::%s is tagged with @lazy which is deprecated and will be removed in TYPO3 v10.0.',
-                        $reflectionClass->getName(),
-                        $reflectionProperty->getName()
-                    ),
-                    E_USER_DEPRECATED
-                );
-            }
-
             if ($annotationReader->getPropertyAnnotation($reflectionProperty, Transient::class) instanceof Transient) {
                 $this->properties[$propertyName]['annotations']['transient'] = true;
             }
index 71eaca7..09bdb7c 100644 (file)
@@ -31,12 +31,6 @@ class ClassSchemaTest extends UnitTestCase
      */
     protected $resetSingletonInstances = true;
 
-    public function testClassSchemaDetectsLazyProperties()
-    {
-        $classSchema = new ClassSchema(Fixture\DummyClassWithLazyProperty::class);
-        static::assertTrue($classSchema->getProperty('propertyWithLazyAnnotation')['annotations']['lazy']);
-    }
-
     /**
      * @test
      */
diff --git a/typo3/sysext/extbase/Tests/UnitDeprecated/Reflection/Fixture/DummyClassWithLazyProperty.php b/typo3/sysext/extbase/Tests/UnitDeprecated/Reflection/Fixture/DummyClassWithLazyProperty.php
deleted file mode 100644 (file)
index f7a52d8..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-declare(strict_types = 1);
-
-namespace TYPO3\CMS\Extbase\Tests\UnitDeprecated\Reflection\Fixture;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Dummy class with @lazy annotation
- */
-class DummyClassWithLazyProperty
-{
-    /**
-     * @lazy
-     */
-    public $propertyWithLazyAnnotation;
-}
index 50c9d02..e79851c 100644 (file)
@@ -12,6 +12,7 @@ return [
         'restFiles' => [
             'Feature-83078-ReplaceLazyWithTYPO3CMSExtbaseAnnotationORMLazy.rst',
             'Deprecation-83078-ReplaceLazyWithTYPO3CMSExtbaseAnnotationORMLazy.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     '@transient' => [