[TASK] Make RteHtmlParser entrypoint API cleaner 70/63070/4
authorBenni Mack <benni@typo3.org>
Wed, 29 Jan 2020 16:06:02 +0000 (17:06 +0100)
committerBenni Mack <benni@typo3.org>
Fri, 31 Jan 2020 17:01:02 +0000 (18:01 +0100)
The RteHtmlParser has two public methods:
->init()
->RTE_transform()

init() was introduced in early PHP4 times when there was no constructor in PHP.
RTE_transform() contained a lot of parsing of properties, which is not needed
anymore since TYPO3 v8. init() itself is not needed anymore.

Since TYPO3 v8, RteHtmlParser is much cleaner towards the developer,
and the last step for this PHP class is to clearly separate the logic for the transformations in each direction, making two new entrypoints:
->transformTextForRichTextEditor($content, $configuration)
->transformTextForPersistence($content, $configuration)

This way, all logic is separated in these two methods, and the existing
RTE_transform() method is just a shell, which is not needed anymore.

Resolves: #90258
Releases: master
Change-Id: Iba140d71c5cd954dab4cf1fe4bfaca2233527e50
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63070
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Susanne Moog <look@susi.dev>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Susanne Moog <look@susi.dev>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaText.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaTextTest.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/Html/RteHtmlParser.php
typo3/sysext/core/Documentation/Changelog/master/Deprecation-90258-SimplifiedRTEParserAPI.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Html/RteHtmlParserTest.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php

index 49a45e1..6e0b6f7 100644 (file)
@@ -56,14 +56,8 @@ class TcaText implements FormDataProviderInterface
                 // If eval=null is set for field, value might be null ... don't transform anything in this case.
                 if ($result['databaseRow'][$fieldName] !== null) {
                     // Process "from-db-to-rte" on current value
-                    $parseHTML = GeneralUtility::makeInstance(RteHtmlParser::class);
-                    $parseHTML->init($result['tableName'] . ':' . $fieldName, $result['effectivePid']);
-                    $result['databaseRow'][$fieldName] = $parseHTML->RTE_transform(
-                        $result['databaseRow'][$fieldName],
-                        [],
-                        'rte',
-                        $richtextConfiguration
-                    );
+                    $richTextParser = GeneralUtility::makeInstance(RteHtmlParser::class);
+                    $result['databaseRow'][$fieldName] = $richTextParser->transformTextForRichTextEditor($result['databaseRow'][$fieldName], $richtextConfiguration['proc.'] ?? []);
                 }
             }
         }
index 317f6fe..31e1837 100644 (file)
@@ -88,14 +88,11 @@ class TcaTextTest extends UnitTestCase
                     'enableRichtext' => true,
                 ]
             )
-            ->willReturn([ 'aConfig' => 'option' ]);
-        $rteHtmlParserPropehy->init('aTable:aField', 42)->shouldBeCalled();
+            ->willReturn([ 'aConfig' => 'option']);
         $rteHtmlParserPropehy
-            ->RTE_transform(
+            ->transformTextForRichTextEditor(
                 'notProcessedContent',
-                [],
-                'rte',
-                [ 'aConfig' => 'option']
+                []
             )
             ->willReturn('processedContent');
 
index f6c7178..2e0145a 100644 (file)
@@ -1740,9 +1740,8 @@ class DataHandler implements LoggerAwareInterface
         if (isset($tcaFieldConf['enableRichtext']) && (bool)$tcaFieldConf['enableRichtext'] === true) {
             $richtextConfigurationProvider = GeneralUtility::makeInstance(Richtext::class);
             $richtextConfiguration = $richtextConfigurationProvider->getConfiguration($table, $field, $realPid, $recordType, $tcaFieldConf);
-            $parseHTML = GeneralUtility::makeInstance(RteHtmlParser::class);
-            $parseHTML->init($table . ':' . $field, $realPid);
-            $valueArray['value'] = $parseHTML->RTE_transform($value, [], 'db', $richtextConfiguration);
+            $rteParser = GeneralUtility::makeInstance(RteHtmlParser::class);
+            $valueArray['value'] = $rteParser->transformTextForPersistence($value, $richtextConfiguration['proc.'] ?? []);
         }
 
         return $valueArray;
index 508e54e..52a107e 100644 (file)
@@ -47,27 +47,6 @@ class RteHtmlParser extends HtmlParser implements LoggerAwareInterface
     protected $defaultAllowedTagsList = 'b,i,u,a,img,br,div,center,pre,font,hr,sub,sup,p,strong,em,li,ul,ol,blockquote,strike,span,abbr,acronym,dfn';
 
     /**
-     * Set this to the pid of the record manipulated by the class.
-     *
-     * @var int
-     */
-    protected $recPid = 0;
-
-    /**
-     * Element reference [table]:[field], eg. "tt_content:bodytext"
-     *
-     * @var string
-     */
-    protected $elRef = '';
-
-    /**
-     * Current Page TSconfig
-     *
-     * @var array
-     */
-    protected $tsConfig = [];
-
-    /**
      * Set to the TSconfig options coming from Page TSconfig
      *
      * @var array
@@ -149,32 +128,22 @@ class RteHtmlParser extends HtmlParser implements LoggerAwareInterface
      *
      * @param string $elRef Element reference, eg "tt_content:bodytext
      * @param int $recPid PID of the record (page id)
+     * @deprecated will be removed in TYPO3 v11.0, as it serves no purpose anymore
      */
     public function init($elRef = '', $recPid = 0)
     {
-        $this->recPid = $recPid;
-        $this->elRef = $elRef;
+        trigger_error('RteHtmlParser->init() is not needed anymore for RTE transformation, and will be removed in TYPO3 v11.0.', E_USER_DEPRECATED);
     }
 
-    /**********************************************
-     *
-     * Main function
-     *
-     **********************************************/
     /**
-     * Transform value for RTE based on specConf in the direction specified by $direction (rte/db)
-     * This is the main function called from DataHandler and transfer data classes
+     * Sanitize and streamline given options (usually from RichTextConfiguration results "proc."
+     * and set them to the respective properties.
      *
-     * @param string $value Input value
-     * @param null $_ unused
-     * @param string $direction Direction of the transformation. Two keywords are allowed; "db" or "rte". If "db" it means the transformation will clean up content coming from the Rich Text Editor and goes into the database. The other direction, "rte", is of course when content is coming from database and must be transformed to fit the RTE.
-     * @param array $thisConfig Parsed TypoScript content configuring the RTE, probably coming from Page TSconfig.
-     * @return string Output value
+     * @param array $processingConfiguration
      */
-    public function RTE_transform($value, $_ = null, $direction = 'rte', $thisConfig = [])
+    protected function setProcessingConfiguration(array $processingConfiguration): void
     {
-        $this->tsConfig = $thisConfig;
-        $this->procOptions = (array)$thisConfig['proc.'];
+        $this->procOptions = $processingConfiguration;
         if (isset($this->procOptions['allowedClasses.'])) {
             $this->allowedClasses = (array)$this->procOptions['allowedClasses.'];
         } else {
@@ -198,77 +167,131 @@ class RteHtmlParser extends HtmlParser implements LoggerAwareInterface
                 $this->allowedTagsOutsideOfParagraphs = (array)$this->procOptions['allowTagsOutside.'];
             }
         }
+    }
 
-        // Setting modes / transformations to be called
-        if ((string)$this->procOptions['overruleMode'] !== '') {
-            $modes = GeneralUtility::trimExplode(',', $this->procOptions['overruleMode']);
-        } else {
-            $modes = [$this->procOptions['mode']];
+    /**
+     * Main entry point for transforming RTE content in the database so the Rich Text Editor can deal with
+     * e.g. links.
+     *
+     * @param string $value
+     * @param array $processingConfiguration
+     * @return string
+     */
+    public function transformTextForRichTextEditor(string $value, array $processingConfiguration): string
+    {
+        $this->setProcessingConfiguration($processingConfiguration);
+        $modes = $this->resolveAppliedTransformationModes('rte');
+        $value = $this->streamlineLineBreaksForProcessing($value);
+        // If an entry HTML cleaner was configured, pass the content through the HTMLcleaner
+        $value = $this->runHtmlParserIfConfigured($value, 'entryHTMLparser_rte');
+        // Traverse modes
+        foreach ($modes as $cmd) {
+            // Checking for user defined transformation:
+            if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['transformation'][$cmd])) {
+                $_procObj = GeneralUtility::makeInstance($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['transformation'][$cmd]);
+                $_procObj->pObj = $this;
+                $value = $_procObj->transform_rte($value, $this);
+            } else {
+                // ... else use defaults:
+                switch ($cmd) {
+                    case 'detectbrokenlinks':
+                        $value = $this->markBrokenLinks($value);
+                        break;
+                    case 'css_transform':
+                        $value = $this->TS_transform_rte($value);
+                        break;
+                    default:
+                        // Do nothing
+                }
+            }
         }
-        $modes = $this->resolveAppliedTransformationModes($direction, $modes);
+        // If an exit HTML cleaner was configured, pass the content through the HTMLcleaner
+        $value = $this->runHtmlParserIfConfigured($value, 'exitHTMLparser_rte');
+        // Final clean up of linebreaks
+        $value = $this->streamlineLineBreaksAfterProcessing($value);
+        return $value;
+    }
 
+    /**
+     * Called to process HTML content before it is stored in the database.
+     *
+     * @param string $value
+     * @param array $processingConfiguration
+     * @return string
+     */
+    public function transformTextForPersistence(string $value, array $processingConfiguration): string
+    {
+        $this->setProcessingConfiguration($processingConfiguration);
+        $modes = $this->resolveAppliedTransformationModes('db');
         $value = $this->streamlineLineBreaksForProcessing($value);
-
         // If an entry HTML cleaner was configured, pass the content through the HTMLcleaner
-        $value = $this->runHtmlParserIfConfigured($value, 'entryHTMLparser_' . $direction);
-
+        $value = $this->runHtmlParserIfConfigured($value, 'entryHTMLparser_db');
         // Traverse modes
         foreach ($modes as $cmd) {
-            if ($direction === 'db') {
-                // Checking for user defined transformation:
-                if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['transformation'][$cmd])) {
-                    $_procObj = GeneralUtility::makeInstance($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['transformation'][$cmd]);
-                    $_procObj->pObj = $this;
-                    $_procObj->transformationKey = $cmd;
-                    $value = $_procObj->transform_db($value, $this);
-                } else {
-                    // ... else use defaults:
-                    switch ($cmd) {
-                        case 'detectbrokenlinks':
-                            $value = $this->removeBrokenLinkMarkers($value);
-                            break;
-                        case 'ts_links':
-                            $value = $this->TS_links_db($value);
-                            break;
-                        case 'css_transform':
-                            // Transform empty paragraphs into spacing paragraphs
-                            $value = str_replace('<p></p>', '<p>&nbsp;</p>', $value);
-                            // Double any trailing spacing paragraph so that it does not get removed by divideIntoLines()
-                            $value = preg_replace('/<p>&nbsp;<\/p>$/', '<p>&nbsp;</p><p>&nbsp;</p>', $value);
-                            $value = $this->TS_transform_db($value);
-                            break;
-                        default:
-                            // Do nothing
-                    }
-                }
-            } elseif ($direction === 'rte') {
-                // Checking for user defined transformation:
-                if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['transformation'][$cmd])) {
-                    $_procObj = GeneralUtility::makeInstance($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['transformation'][$cmd]);
-                    $_procObj->pObj = $this;
-                    $value = $_procObj->transform_rte($value, $this);
-                } else {
-                    // ... else use defaults:
-                    switch ($cmd) {
-                        case 'detectbrokenlinks':
-                            $value = $this->markBrokenLinks($value);
-                            break;
-                        case 'css_transform':
-                            $value = $this->TS_transform_rte($value);
-                            break;
-                        default:
-                            // Do nothing
-                    }
+            // Checking for user defined transformation:
+            if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['transformation'][$cmd])) {
+                $_procObj = GeneralUtility::makeInstance($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['transformation'][$cmd]);
+                $_procObj->pObj = $this;
+                $_procObj->transformationKey = $cmd;
+                $value = $_procObj->transform_db($value, $this);
+            } else {
+                // ... else use defaults:
+                switch ($cmd) {
+                    case 'detectbrokenlinks':
+                        $value = $this->removeBrokenLinkMarkers($value);
+                        break;
+                    case 'ts_links':
+                        $value = $this->TS_links_db($value);
+                        break;
+                    case 'css_transform':
+                        // Transform empty paragraphs into spacing paragraphs
+                        $value = str_replace('<p></p>', '<p>&nbsp;</p>', $value);
+                        // Double any trailing spacing paragraph so that it does not get removed by divideIntoLines()
+                        $value = preg_replace('/<p>&nbsp;<\/p>$/', '<p>&nbsp;</p><p>&nbsp;</p>', $value);
+                        $value = $this->TS_transform_db($value);
+                        break;
+                    default:
+                        // Do nothing
                 }
             }
         }
-
         // If an exit HTML cleaner was configured, pass the content through the HTMLcleaner
-        $value = $this->runHtmlParserIfConfigured($value, 'exitHTMLparser_' . $direction);
-
+        $value = $this->runHtmlParserIfConfigured($value, 'exitHTMLparser_db');
         // Final clean up of linebreaks
         $value = $this->streamlineLineBreaksAfterProcessing($value);
+        return $value;
+    }
 
+    /**********************************************
+     *
+     * Main function
+     *
+     **********************************************/
+    /**
+     * Transform value for RTE based on specConf in the direction specified by $direction (rte/db)
+     * This is the main function called from DataHandler and transfer data classes, but has been superseded
+     * by the methods
+     * - transformTextForRichTextEditor()
+     * - transformTextForPersistence()
+     * to avoid the $direction argument.
+     * Please use the new methods for TYPO3 v10+ - only code
+     *
+     * @param string $value Input value
+     * @param null $_ unused
+     * @param string $direction Direction of the transformation. Two keywords are allowed; "db" or "rte". If "db" it means the transformation will clean up content coming from the Rich Text Editor and goes into the database. The other direction, "rte", is of course when content is coming from database and must be transformed to fit the RTE.
+     * @param array $thisConfig Parsed TypoScript content configuring the RTE, probably coming from Page TSconfig.
+     * @return string Output value
+     * @deprecated will be removed in TYPO3 v11.0, use the transformText* methods instead.
+     */
+    public function RTE_transform($value, $_ = null, $direction = 'rte', $thisConfig = [])
+    {
+        trigger_error('RteHtmlParser->RTE_transform() will be removed in TYPO3 v11.0. Use the transformTextFor* methods in the same class instead', E_USER_DEPRECATED);
+        if ($direction === 'rte') {
+            return $this->transformTextForRichTextEditor($value, $thisConfig['proc.'] ?? []);
+        }
+        if ($direction === 'db') {
+            return $this->transformTextForPersistence($value, $thisConfig['proc.'] ?? []);
+        }
         return $value;
     }
 
@@ -276,11 +299,17 @@ class RteHtmlParser extends HtmlParser implements LoggerAwareInterface
      * Ensures what transformation modes should be executed, and that they are only executed once.
      *
      * @param string $direction
-     * @param array $modes
      * @return array the resolved transformation modes
      */
-    protected function resolveAppliedTransformationModes(string $direction, array $modes)
+    protected function resolveAppliedTransformationModes(string $direction): array
     {
+        // Setting modes / transformations to be called
+        if ((string)$this->procOptions['overruleMode'] !== '') {
+            $modes = GeneralUtility::trimExplode(',', $this->procOptions['overruleMode']);
+        } else {
+            $modes = [$this->procOptions['mode']];
+        }
+
         $modeList = implode(',', $modes);
 
         // Replace the shortcut "default" with all custom modes
@@ -734,37 +763,6 @@ class RteHtmlParser extends HtmlParser implements LoggerAwareInterface
     }
 
     /**
-     * Finds width and height from attrib-array
-     * If the width and height is found in the style-attribute, use that!
-     *
-     * @param array $attribArray Array of attributes from tag in which to search. More specifically the content of the key "style" is used to extract "width:xxx / height:xxx" information
-     * @return array Integer w/h in key 0/1. Zero is returned if not found.
-     */
-    protected function getWHFromAttribs($attribArray)
-    {
-        $style = trim($attribArray['style']);
-        $w = 0;
-        $h = 0;
-        if ($style) {
-            $regex = '[[:space:]]*:[[:space:]]*([0-9]*)[[:space:]]*px';
-            // Width
-            $reg = [];
-            preg_match('/width' . $regex . '/i', $style, $reg);
-            $w = (int)$reg[1];
-            // Height
-            preg_match('/height' . $regex . '/i', $style, $reg);
-            $h = (int)$reg[1];
-        }
-        if (!$w) {
-            $w = $attribArray['width'];
-        }
-        if (!$h) {
-            $h = $attribArray['height'];
-        }
-        return [(int)$w, (int)$h];
-    }
-
-    /**
      * Called before any processing / transformation is made
      * Removing any CRs (char 13) and only deal with LFs (char 10) internally.
      * CR has a very disturbing effect, so just remove all CR and rely on LF
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-90258-SimplifiedRTEParserAPI.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-90258-SimplifiedRTEParserAPI.rst
new file mode 100644 (file)
index 0000000..f760b9c
--- /dev/null
@@ -0,0 +1,47 @@
+.. include:: ../../Includes.txt
+
+===============================================
+Deprecation: #90258 - Simplified RTE Parser API
+===============================================
+
+See :issue:`90258`
+
+Description
+===========
+
+The PHP class `RteHtmlParser` which is used to transform RTE-based
+textarea fields from the database to the configured Rich Text Editor, and back, has a new simplified API. For this reason,
+the two methods :php:`TYPO3\CMS\Core\Html\RteHtmlParser->init()` and 
+:php:`TYPO3\CMS\Core\Html\RteHtmlParser->RTE_transform()` have been
+deprecated.
+
+
+Impact
+======
+
+Calling any of the methods will trigger a PHP deprecation warning.
+
+
+Affected Installations
+======================
+
+TYPO3 installations with extensions dealing with extracting or adding content such as "l10nmgr", or any custom extension using
+the methods.
+
+
+Migration
+=========
+
+The PHP method `init()` can be removed without substitution, as it
+serves no purpose anymore.
+
+The PHP method `RTE_transform()` now has two methods as substitute,
+depending on the direction which is necessary. This was previously
+done in the third method argument ("rte" and "db"):
+
+- :php:`transformTextForRichTextEditor($content, $configuration)`
+- :php:`transformTextForPersistence($content, $configuration)`
+
+The second argument `$configuration` is now the `processing` configuration (`proc`) of the RTE configuration.
+
+.. index:: RTE, FullyScanned, ext:core
\ No newline at end of file
index 8164325..c86dfef 100644 (file)
@@ -108,8 +108,7 @@ class RteHtmlParserTest extends UnitTestCase
     {
         $eventDispatcher = $this->createMock(EventDispatcherInterface::class);
         $subject = new RteHtmlParser($eventDispatcher);
-        $thisConfig = ['proc.' => $this->procOptions];
-        self::assertEquals($expectedResult, $subject->RTE_transform($content, [], 'db', $thisConfig));
+        self::assertEquals($expectedResult, $subject->transformTextForPersistence($content, $this->procOptions));
     }
 
     /**
@@ -185,8 +184,7 @@ class RteHtmlParserTest extends UnitTestCase
     {
         $eventDispatcher = $this->createMock(EventDispatcherInterface::class);
         $subject = new RteHtmlParser($eventDispatcher);
-        $thisConfig = ['proc.' => $this->procOptions];
-        self::assertEquals($expectedResult, $subject->RTE_transform($subject->RTE_transform($content, [], 'db', $thisConfig), [], 'rte', $thisConfig));
+        self::assertEquals($expectedResult, $subject->transformTextForRichTextEditor($subject->transformTextForPersistence($content, $this->procOptions), $this->procOptions));
     }
 
     /**
@@ -374,8 +372,7 @@ class RteHtmlParserTest extends UnitTestCase
     {
         $eventDispatcher = $this->createMock(EventDispatcherInterface::class);
         $subject = new RteHtmlParser($eventDispatcher);
-        $thisConfig = ['proc.' => $this->procOptions];
-        self::assertEquals($expectedResult, $subject->RTE_transform($content, [], 'db', $thisConfig));
+        self::assertEquals($expectedResult, $subject->transformTextForPersistence($content, $this->procOptions));
     }
 
     /**
@@ -475,8 +472,7 @@ class RteHtmlParserTest extends UnitTestCase
     {
         $eventDispatcher = $this->createMock(EventDispatcherInterface::class);
         $subject = new RteHtmlParser($eventDispatcher);
-        $thisConfig = ['proc.' => $this->procOptions];
-        self::assertEquals($expectedResult, $subject->RTE_transform($content, [], 'rte', $thisConfig));
+        self::assertEquals($expectedResult, $subject->transformTextForRichTextEditor($content, $this->procOptions));
     }
 
     /**
@@ -628,8 +624,7 @@ class RteHtmlParserTest extends UnitTestCase
     {
         $eventDispatcher = $this->createMock(EventDispatcherInterface::class);
         $subject = new RteHtmlParser($eventDispatcher);
-        $thisConfig = ['proc.' => $this->procOptions];
-        self::assertEquals($expectedResult, $subject->RTE_transform($subject->RTE_transform($content, [], 'db', $thisConfig), [], 'rte', $thisConfig));
+        self::assertEquals($expectedResult, $subject->transformTextForRichTextEditor($subject->transformTextForPersistence($content, $this->procOptions), $this->procOptions));
     }
 
     /**
@@ -667,8 +662,7 @@ class RteHtmlParserTest extends UnitTestCase
     {
         $eventDispatcher = $this->createMock(EventDispatcherInterface::class);
         $subject = new RteHtmlParser($eventDispatcher);
-        $thisConfig = ['proc.' => $this->procOptions];
-        self::assertEquals($expectedResult, $subject->RTE_transform($content, [], 'db', $thisConfig));
+        self::assertEquals($expectedResult, $subject->transformTextForPersistence($content, $this->procOptions));
     }
 
     /**
@@ -706,7 +700,6 @@ class RteHtmlParserTest extends UnitTestCase
     {
         $eventDispatcher = $this->createMock(EventDispatcherInterface::class);
         $subject = new RteHtmlParser($eventDispatcher);
-        $thisConfig = ['proc.' => $this->procOptions];
-        self::assertEquals($expectedResult, $subject->RTE_transform($subject->RTE_transform($content, [], 'db', $thisConfig), [], 'rte', $thisConfig));
+        self::assertEquals($expectedResult, $subject->transformTextForRichTextEditor($subject->transformTextForPersistence($content, $this->procOptions), $this->procOptions));
     }
 }
index 060b33f..f909a31 100644 (file)
@@ -4405,5 +4405,19 @@ return [
         'restFiles' => [
             'Deprecation-89870-NewPSR-14EventsForExtbase-relatedSignals.rst',
         ],
-    ]
+    ],
+    'TYPO3\CMS\Core\Html\RteHtmlParser->init' => [
+        'numberOfMandatoryArguments' => 0,
+        'maximumNumberOfArguments' => 2,
+        'restFiles' => [
+            'Deprecation-90258-SimplifiedRTEParserAPI.rst',
+        ],
+    ],
+    'TYPO3\CMS\Core\Html\RteHtmlParser->RTE_transform' => [
+        'numberOfMandatoryArguments' => 1,
+        'maximumNumberOfArguments' => 4,
+        'restFiles' => [
+            'Deprecation-90258-SimplifiedRTEParserAPI.rst',
+        ],
+    ],
 ];