[TASK] Use @TYPO3\CMS\Extbase\Annotation\ORM\Lazy in core extensions 12/55312/4
authorAlexander Schnitzler <git@alexanderschnitzler.de>
Tue, 9 Jan 2018 19:46:33 +0000 (20:46 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 14 Jan 2018 12:08:21 +0000 (13:08 +0100)
Releases: master
Resolves: #83520
Change-Id: Idd10aa62692198f7aa20af1492fb9670149d5ac9
Reviewed-on: https://review.typo3.org/55312
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Build/Scripts/annotationChecker.php
typo3/sysext/beuser/Classes/Domain/Model/BackendUserGroup.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Classes/Domain/Model/Hotel.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Classes/Domain/Model/Offer.php
typo3/sysext/extbase/Classes/Domain/Model/Category.php
typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/Blog.php
typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/Post.php
typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/TtContent.php

index a653056..3e39690 100755 (executable)
@@ -61,7 +61,7 @@ class NodeVisitor extends NodeVisitorAbstract
                     // PHPCheckStyle
                     'SuppressWarnings', 'noinspection',
                     // Extbase related (deprecated)
-                    'inject', 'transient', 'lazy', 'validate', 'cascade', 'cli', 'flushesCaches',
+                    'inject', 'transient', 'validate', 'cascade', 'cli', 'flushesCaches',
                     // Extbase related
                     'Extbase\\\\Inject', 'Inject', 'Transient', 'Extbase\\\\ORM\\\\Lazy', 'Cascade', 'IgnoreValidation', 'Enum',
                     // Extension scanner
@@ -94,6 +94,8 @@ $finder = new Symfony\Component\Finder\Finder();
 $finder->files()
     ->in(__DIR__ . '/../../typo3/')
     ->name('/\.php$/')
+    // black list a unit test file that tests old deprecations
+    ->notName('DummyClassWithLazyProperty.php')
 ;
 
 $output = new ConsoleOutput();
index 78f77f2..41e9c58 100644 (file)
@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Beuser\Domain\Model;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Extbase\Annotation as Extbase;
+
 /**
  * Model for backend user group
  */
@@ -36,7 +38,7 @@ class BackendUserGroup extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
 
     /**
      * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Beuser\Domain\Model\BackendUserGroup>
-     * @lazy
+     * @Extbase\ORM\Lazy
      */
     protected $subGroups;
 
index e58227a..60cc7b1 100644 (file)
@@ -14,6 +14,8 @@ namespace OliverHader\IrreTutorial\Domain\Model;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Extbase\Annotation as Extbase;
+
 /**
  * Hotel
  */
@@ -25,7 +27,7 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
     protected $title = '';
 
     /**
-     * @lazy
+     * @Extbase\ORM\Lazy
      * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\OliverHader\IrreTutorial\Domain\Model\Offer>
      */
     protected $offers = null;
index 470d33e..7089f03 100644 (file)
@@ -14,6 +14,8 @@ namespace OliverHader\IrreTutorial\Domain\Model;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Extbase\Annotation as Extbase;
+
 /**
  * Offer
  */
@@ -25,7 +27,7 @@ class Offer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
     protected $title = '';
 
     /**
-     * @lazy
+     * @Extbase\ORM\Lazy
      * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\OliverHader\IrreTutorial\Domain\Model\Offer>
      */
     protected $prices = null;
index e4bd5bc..4f3f450 100644 (file)
@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Extbase\Domain\Model;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Extbase\Annotation as Extbase;
+
 /**
  * This model represents a category (for anything).
  *
@@ -34,7 +36,7 @@ class Category extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
 
     /**
      * @var \TYPO3\CMS\Extbase\Domain\Model\Category|null
-     * @lazy
+     * @Extbase\ORM\Lazy
      */
     protected $parent = null;
 
index 69c02e9..8c3f8c2 100644 (file)
@@ -14,6 +14,8 @@ namespace ExtbaseTeam\BlogExample\Domain\Model;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Extbase\Annotation as Extbase;
+
 /**
  * A blog
  */
@@ -53,7 +55,7 @@ class Blog extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
      * The posts of this blog
      *
      * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\ExtbaseTeam\BlogExample\Domain\Model\Post>
-     * @lazy
+     * @Extbase\ORM\Lazy
      * @cascade remove
      */
     protected $posts = null;
@@ -67,7 +69,7 @@ class Blog extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
      * The blog's administrator
      *
      * @var \ExtbaseTeam\BlogExample\Domain\Model\Administrator
-     * @lazy
+     * @Extbase\ORM\Lazy
      */
     protected $administrator = null;
 
index 1e4f8d4..17a90d6 100644 (file)
@@ -14,6 +14,8 @@ namespace ExtbaseTeam\BlogExample\Domain\Model;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Extbase\Annotation as Extbase;
+
 /**
  * A blog post
  */
@@ -63,14 +65,14 @@ class Post extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
 
     /**
      * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\ExtbaseTeam\BlogExample\Domain\Model\Comment>
-     * @lazy
+     * @Extbase\ORM\Lazy
      * @cascade remove
      */
     protected $comments = null;
 
     /**
      * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\ExtbaseTeam\BlogExample\Domain\Model\Post>
-     * @lazy
+     * @Extbase\ORM\Lazy
      */
     protected $relatedPosts = null;
 
index b8e14aa..655a884 100644 (file)
@@ -16,6 +16,8 @@ namespace ExtbaseTeam\BlogExample\Domain\Model;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Extbase\Annotation as Extbase;
+
 /**
  * A tt_content model
  */
@@ -44,7 +46,7 @@ class TtContent extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
      * Images
      *
      * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
-     * @lazy
+     * @Extbase\ORM\Lazy
      */
     protected $image;