Skip to content

Commit

Permalink
[TASK] Remove registered legacy extbase annoations
Browse files Browse the repository at this point in the history
The following registered annotations are no longer supported.
Therefore they should no longer be registered.

* inject
* transient
* lazy
* validate
* cascade
* cli
* flushesCaches
* uuid
* identity

Releases: master
Resolves: #87272
Change-Id: I3d018ce39cc33e4ab55f966083ef2d6112570ebc
Reviewed-on: https://review.typo3.org/59247
Tested-by: TYPO3com <no-reply@typo3.com>
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>
  • Loading branch information
alexanderschnitzler authored and maddy2101 committed Dec 22, 2018
1 parent e16883c commit 6d5e288
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
11 changes: 4 additions & 7 deletions Build/Scripts/annotationChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,15 @@ public function enterNode(Node $node)
'env',
// PHPCheckStyle
'SuppressWarnings', 'noinspection',
// Extbase related (deprecated), will be removed in TYPO3 v10.0
'transient',
'cli', // this is still used in Extbase\Tests\UnitDeprecated
'flushesCaches', // still used in MockCCommandController test fixture, will be removed in TYPO3 v10.0
// Extbase related
'TYPO3\\\\CMS\\\\Extbase\\\\Annotation\\\\IgnoreValidation', 'Extbase\\\\IgnoreValidation', 'IgnoreValidation',
'TYPO3\\\\CMS\\\\Extbase\\\\Annotation\\\\Inject', 'Extbase\\\\Inject', 'Inject',
'TYPO3\\\\CMS\\\\Extbase\\\\Annotation\\\\Validate', 'Extbase\\\\Validate', 'Validate',
'Transient', 'Extbase\\\\ORM\\\\Lazy', 'Enum',
'TYPO3\\\\CMS\\\\Extbase\\\\Annotation\\\\ORM\\\\Cascade', 'Extbase\\\\ORM\\\\Cascade', 'Cascade',
'TYPO3\\\\CMS\\\\Extbase\\\\Annotation\\\\ORM\\\\Lazy', 'Extbase\\\\ORM\\\\Lazy', 'Lazy',
'TYPO3\\\\CMS\\\\Extbase\\\\Annotation\\\\ORM\\\\Transient', 'Extbase\\\\ORM\\\\Transient', 'Transient',
// annotations shipped with doctrine/annotations
'Doctrine\\\\Common\\\\Annotations\\\\Annotation\\\\Enum', 'Enum',
// Extension scanner
'extensionScannerIgnoreFile', 'extensionScannerIgnoreLine'
];
Expand Down Expand Up @@ -102,8 +101,6 @@ public function enterNode(Node $node)
$finder->files()
->in(__DIR__ . '/../../typo3/')
->name('/\.php$/')
// black list some deprecated unit test fixture files that test old deprecations
->notPath('/.*sysext\/extbase\/Tests\/UnitDeprecated\/Reflection\/Fixture/')
// black list some unit test fixture files from extension scanner that test matchers of old annotations
->notName('MethodAnnotationMatcherFixture.php')
->notName('PropertyAnnotationMatcherFixture.php')
Expand Down
15 changes: 0 additions & 15 deletions typo3/sysext/core/Classes/Core/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,21 +242,6 @@ public static function initializeClassLoader(ClassLoader $classLoader)
/** @see initializeAnnotationRegistry */
AnnotationRegistry::registerLoader([$classLoader, 'loadClass']);

/*
* All annotations defined by and for Extbase need to be
* ignored during their deprecation. Later, their usage may and
* should throw an Exception
*/
AnnotationReader::addGlobalIgnoredName('inject');
AnnotationReader::addGlobalIgnoredName('transient');
AnnotationReader::addGlobalIgnoredName('lazy');
AnnotationReader::addGlobalIgnoredName('validate');
AnnotationReader::addGlobalIgnoredName('cascade');
AnnotationReader::addGlobalIgnoredName('cli');
AnnotationReader::addGlobalIgnoredName('flushesCaches');
AnnotationReader::addGlobalIgnoredName('uuid');
AnnotationReader::addGlobalIgnoredName('identity');

// Annotations used in unit tests
AnnotationReader::addGlobalIgnoredName('test');

Expand Down

0 comments on commit 6d5e288

Please sign in to comment.