Commit 091543cd authored by Alexander Schnitzler's avatar Alexander Schnitzler Committed by Wouter Wolters
Browse files

[CLEANUP] Remove/Replace non-standard phpdoc annotations

Over the years many different non-standard phpdoc anotations
made it into that core which will now break the AnnotationReader
of doctrine. Therefore either all these annotations need to be
ignored or removed/replaced.

As it is easier to actually solve the issues instead of hiding them
this patch removes or replaces most non-standard annotations and
configures to ignore some of them like @extensionScannerIgnoreFile
and @extensionScannerIgnoreLine which are introduced by TYPO3 but
cannot be replaced as they provide a decent functionality

Releases: master
Resolves: #83103
Change-Id: Iba8f39600fe7273dd560592cef40ad56f83a5e73
Reviewed-on: https://review.typo3.org/54768


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: Oliver Klee's avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
parent 442211f0
......@@ -18,8 +18,6 @@ use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
/**
* An extension helper model to be used in ext:about context
*
* @entity
*/
class Extension extends AbstractEntity
{
......
......@@ -37,7 +37,7 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
class ShortcutToolbarItem implements ToolbarItemInterface
{
/**
* @const integer Number of super global group
* @var int Number of super global group
*/
const SUPERGLOBAL_GROUP = -100;
......
......@@ -29,12 +29,12 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
class LocalizationController
{
/**
* @const string
* @var string
*/
const ACTION_COPY = 'copyFromLanguage';
/**
* @const string
* @var string
*/
const ACTION_LOCALIZE = 'localize';
......
......@@ -47,7 +47,7 @@ class TreeNodeCollection extends \ArrayObject
* Compares a node with another one
*
* @see \TYPO3\CMS\Backend\Tree\TreeNode::compareTo
* @noapi
* @internal
*/
public function nodeCompare(\TYPO3\CMS\Backend\Tree\TreeNode $node, \TYPO3\CMS\Backend\Tree\TreeNode $otherNode)
{
......
......@@ -3311,7 +3311,7 @@ class PageLayoutView implements LoggerAwareInterface
* @param string[] $fieldList List of fields to select from the table
* @param string[] $additionalConstraints Additional part for where clause
* @param QueryBuilder $queryBuilder
* @paran bool $addSorting
* @param bool $addSorting
* @return QueryBuilder
*/
protected function prepareQueryBuilder(
......
......@@ -218,7 +218,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni
/**
* Fallback for IRRE items without inline view attribute
* @issue https://forge.typo3.org/issues/76561
* @see https://forge.typo3.org/issues/76561
*
* @test
*/
......@@ -243,7 +243,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni
/**
* Unserialize uc inline view string for IRRE item
* @issue https://forge.typo3.org/issues/76561
* @see https://forge.typo3.org/issues/76561
*
* @test
*/
......
......@@ -29,7 +29,6 @@ use TYPO3\CMS\Core\SingletonInterface;
* The Cache Manager
*
* This file is a backport from FLOW3
* @scope singleton
* @api
*/
class CacheManager implements SingletonInterface
......
......@@ -227,7 +227,7 @@ class Bootstrap
/*
* All annotations defined by and for Extbase need to be
* ignored during their deprecation. Later their usage may and
* ignored during their deprecation. Later, their usage may and
* should throw an Exception
*/
AnnotationReader::addGlobalIgnoredName('inject');
......@@ -236,11 +236,14 @@ class Bootstrap
AnnotationReader::addGlobalIgnoredName('validate');
AnnotationReader::addGlobalIgnoredName('cascade');
AnnotationReader::addGlobalIgnoredName('ignorevalidation');
AnnotationReader::addGlobalIgnoredName('firsttest');
AnnotationReader::addGlobalIgnoredName('anothertest');
AnnotationReader::addGlobalIgnoredName('test');
AnnotationReader::addGlobalIgnoredName('const');
// ...
AnnotationReader::addGlobalIgnoredName('cli');
AnnotationReader::addGlobalIgnoredName('flushesCashes');
AnnotationReader::addGlobalIgnoredName('uuid');
AnnotationReader::addGlobalIgnoredName('identity');
// Annotations that control the extension scanner
AnnotationReader::addGlobalIgnoredName('extensionScannerIgnoreFile');
AnnotationReader::addGlobalIgnoredName('extensionScannerIgnoreLine');
return $this;
}
......
......@@ -452,10 +452,10 @@ class FrontendEditingController
/**
* Saves a record based on its data array and closes it.
* Note: This method is only a wrapper for doSave() but is needed so
*
* @param string $table The table name for the record to save.
* @param int $uid The UID for the record to save.
* @note This method is only a wrapper for doSave() but is needed so
*/
public function doSaveAndClose($table, $uid)
{
......
......@@ -30,7 +30,7 @@ class JsonResponse extends Response
* JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_UNESCAPED_SLASHES
* </code>
*
* @const int
* @var int
*/
const DEFAULT_JSON_FLAGS = JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_UNESCAPED_SLASHES;
......
......@@ -28,14 +28,14 @@ class Uri implements UriInterface
/**
* Sub-delimiters used in query strings and fragments.
*
* @const string
* @var string
*/
const SUBDELIMITER_CHARLIST = '!\$&\'\(\)\*\+,;=';
/**
* Unreserved characters used in paths, query strings, and fragments.
*
* @const string
* @var string
*/
const UNRESERVED_CHARLIST = 'a-zA-Z0-9_\-\.~';
......
......@@ -581,7 +581,6 @@ class FileIndexRepository implements SingletonInterface
* Signal that is called after an IndexRecord is updated
*
* @param array $data
* @signal
*/
protected function emitRecordUpdatedSignal(array $data)
{
......@@ -592,7 +591,6 @@ class FileIndexRepository implements SingletonInterface
* Signal that is called after an IndexRecord is created
*
* @param array $data
* @signal
*/
protected function emitRecordCreatedSignal(array $data)
{
......@@ -603,7 +601,6 @@ class FileIndexRepository implements SingletonInterface
* Signal that is called after an IndexRecord is deleted
*
* @param int $fileUid
* @signal
*/
protected function emitRecordDeletedSignal($fileUid)
{
......@@ -614,7 +611,6 @@ class FileIndexRepository implements SingletonInterface
* Signal that is called after an IndexRecord is marked as missing
*
* @param int $fileUid
* @signal
*/
protected function emitRecordMarkedAsMissingSignal($fileUid)
{
......
......@@ -241,7 +241,6 @@ class MetaDataRepository implements SingletonInterface
* for example translation and workspace overlay
*
* @param \ArrayObject $data
* @signal
*/
protected function emitRecordPostRetrievalSignal(\ArrayObject $data)
{
......@@ -252,7 +251,6 @@ class MetaDataRepository implements SingletonInterface
* Signal that is called after an IndexRecord is updated
*
* @param array $data
* @signal
*/
protected function emitRecordUpdatedSignal(array $data)
{
......@@ -263,7 +261,6 @@ class MetaDataRepository implements SingletonInterface
* Signal that is called after an IndexRecord is created
*
* @param array $data
* @signal
*/
protected function emitRecordCreatedSignal(array $data)
{
......@@ -274,7 +271,6 @@ class MetaDataRepository implements SingletonInterface
* Signal that is called after an IndexRecord is deleted
*
* @param int $fileUid
* @signal
*/
protected function emitRecordDeletedSignal($fileUid)
{
......
......@@ -16,8 +16,6 @@ namespace TYPO3\CMS\Documentation\Domain\Model;
/**
* An extension helper model to be used in ext:documentation context
*
* @entity
*/
class Document extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
......
......@@ -16,8 +16,6 @@ namespace TYPO3\CMS\Documentation\Domain\Model;
/**
* An extension helper model to be used in ext:documentation context
*
* @entity
*/
class DocumentFormat extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
......
......@@ -16,8 +16,6 @@ namespace TYPO3\CMS\Documentation\Domain\Model;
/**
* An extension helper model to be used in ext:documentation context
*
* @entity
*/
class DocumentTranslation extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
......
......@@ -322,7 +322,7 @@ class ClassSchemaTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
public function testClassSchemaGetTags()
{
$tags = (new ClassSchema(Fixture\DummyClassWithTags::class))->getTags();
static::assertArrayHasKey('foo', $tags);
static::assertArrayHasKey('see', $tags);
// test ignored tags
static::assertArrayNotHasKey('package', $tags);
......@@ -331,6 +331,5 @@ class ClassSchemaTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
static::assertArrayNotHasKey('copyright', $tags);
static::assertArrayNotHasKey('author', $tags);
static::assertArrayNotHasKey('version', $tags);
static::assertArrayNotHasKey('const', $tags);
}
}
......@@ -38,7 +38,6 @@ class DummyClassWithAllTypesOfMethods
* @copyright
* @author
* @version
* @const
*/
public function methodWithIgnoredTags()
{
......
......@@ -40,7 +40,6 @@ class DummyClassWithAllTypesOfProperties
* @copyright
* @author
* @version
* @const
*/
public $propertyWithIgnoredTags;
......
......@@ -21,9 +21,8 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture;
* @copyright
* @author
* @version
* @const
*
* @foo
* @see
*/
class DummyClassWithTags
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment