[TASK] Remove forgotten upgrade wizard in ext:form
authorChristian Kuhn <lolli@schwarzbu.ch>
Thu, 10 Jun 2021 12:48:44 +0000 (14:48 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 10 Jun 2021 13:22:42 +0000 (15:22 +0200)
An install tool upgrade wizard slated for removal has been
forgotten during v11.0 cleanup: FormFileExtensionUpdate has
been added for upgrade to v9 (and even backported to v8),
has then been kept for update to v10 and can be removed now.

Resolves: #94299
Releases: master
Change-Id: I882e7ef3926895bcc1e455bc2c0cda287c822680
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69430
Tested-by: Jochen <rothjochen@gmail.com>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Oliver Bartsch <bo@cedev.de>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Jochen <rothjochen@gmail.com>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/form/Classes/Hooks/FormFileExtensionUpdate.php [deleted file]
typo3/sysext/form/Tests/Functional/Hooks/FormFileExtensionUpdateTest.php [deleted file]
typo3/sysext/form/ext_localconf.php

diff --git a/typo3/sysext/form/Classes/Hooks/FormFileExtensionUpdate.php b/typo3/sysext/form/Classes/Hooks/FormFileExtensionUpdate.php
deleted file mode 100644 (file)
index 43ca133..0000000
+++ /dev/null
@@ -1,836 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-/*
- * 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!
- */
-
-namespace TYPO3\CMS\Form\Hooks;
-
-use Symfony\Component\Console\Output\OutputInterface;
-use TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools;
-use TYPO3\CMS\Core\Database\Connection;
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
-use TYPO3\CMS\Core\Database\ReferenceIndex;
-use TYPO3\CMS\Core\Localization\LanguageService;
-use TYPO3\CMS\Core\Resource\DuplicationBehavior;
-use TYPO3\CMS\Core\Resource\File;
-use TYPO3\CMS\Core\Resource\ResourceFactory;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Core\Utility\PathUtility;
-use TYPO3\CMS\Core\Utility\StringUtility;
-use TYPO3\CMS\Extbase\Object\ObjectManager;
-use TYPO3\CMS\Form\Mvc\Persistence\FormPersistenceManager;
-use TYPO3\CMS\Form\Slot\FilePersistenceSlot;
-use TYPO3\CMS\Install\Updates\ChattyInterface;
-use TYPO3\CMS\Install\Updates\DatabaseUpdatedPrerequisite;
-use TYPO3\CMS\Install\Updates\ReferenceIndexUpdatedPrerequisite;
-use TYPO3\CMS\Install\Updates\UpgradeWizardInterface;
-
-/**
- * Update wizard to migrate all forms currently in use to new ending
- * @internal
- */
-class FormFileExtensionUpdate implements ChattyInterface, UpgradeWizardInterface
-{
-    /**
-     * @var OutputInterface
-     */
-    protected $output;
-
-    /**
-     * @var FormPersistenceManager
-     */
-    protected $persistenceManager;
-
-    /**
-     * @var ResourceFactory
-     */
-    protected $resourceFactory;
-
-    /**
-     * @var ReferenceIndex
-     */
-    protected $referenceIndex;
-
-    /**
-     * @var FlexFormTools
-     */
-    protected $flexFormTools;
-
-    /**
-     * @var Connection
-     */
-    protected $connection;
-
-    /**
-     * Return the identifier for this wizard
-     * This should be the same string as used in the ext_localconf class registration
-     *
-     * @return string
-     */
-    public function getIdentifier(): string
-    {
-        return 'formFileExtension';
-    }
-
-    /**
-     * Return the speaking name of this wizard
-     *
-     * @return string
-     */
-    public function getTitle(): string
-    {
-        return 'Rename form definition file extension from .yaml to .form.yaml';
-    }
-
-    /**
-     * Return the description for this wizard
-     *
-     * @return string
-     */
-    public function getDescription(): string
-    {
-        return 'Form definition files need to be named *.form.yaml to have a way of distinguishing form yaml ' .
-               'configuration files from other yaml configuration files. This wizard will analyze and rename found files.';
-    }
-
-    /**
-     * Returns an array of class names of Prerequisite classes
-     * This way a wizard can define dependencies like "database up-to-date" or
-     * "reference index updated"
-     *
-     * @return string[]
-     */
-    public function getPrerequisites(): array
-    {
-        return [
-            ReferenceIndexUpdatedPrerequisite::class,
-            DatabaseUpdatedPrerequisite::class
-        ];
-    }
-
-    public function setOutput(OutputInterface $output): void
-    {
-        $this->output = $output;
-    }
-
-    /**
-     * Checks whether updates are required.
-     *
-     * @return bool Whether an update is required (TRUE) or not (FALSE)
-     */
-    public function updateNecessary(): bool
-    {
-        $updateNeeded = false;
-
-        $this->persistenceManager = $this->getObjectManager()->get(FormPersistenceManager::class);
-        $this->resourceFactory = GeneralUtility::makeInstance(ResourceFactory::class);
-
-        foreach ($this->getFormDefinitionsInformation() as $formDefinitionInformation) {
-            if (
-                (
-                    $formDefinitionInformation['hasNewFileExtension'] === true
-                    && $formDefinitionInformation['hasReferencesForOldFileExtension'] === false
-                    && $formDefinitionInformation['hasReferencesForNewFileExtension'] === false
-                )
-                || (
-                    $formDefinitionInformation['hasNewFileExtension'] === false
-                    && $formDefinitionInformation['location'] === 'extension'
-                    && $formDefinitionInformation['hasReferencesForOldFileExtension'] === false
-                    && $formDefinitionInformation['hasReferencesForNewFileExtension'] === false
-                )
-            ) {
-                continue;
-            }
-
-            if (
-                $formDefinitionInformation['hasNewFileExtension'] === false
-                && $formDefinitionInformation['location'] === 'storage'
-            ) {
-                $updateNeeded = true;
-                $this->output->writeln('Form definition files were found that should be migrated to be named .form.yaml.');
-            }
-
-            if (
-                $formDefinitionInformation['hasNewFileExtension']
-                && $formDefinitionInformation['hasReferencesForOldFileExtension']
-            ) {
-                $updateNeeded = true;
-                $this->output->writeln('Referenced form definition files found that should be updated.');
-            }
-
-            if (
-                $formDefinitionInformation['referencesForOldFileExtensionNeedsFlexformUpdates'] === true
-                || $formDefinitionInformation['referencesForNewFileExtensionNeedsFlexformUpdates'] === true
-            ) {
-                $updateNeeded = true;
-                if ($formDefinitionInformation['hasNewFileExtension'] === true) {
-                    $this->output->writeln('Referenced form definition files found that should be updated.');
-                } elseif ($formDefinitionInformation['location'] === 'storage') {
-                    $this->output->writeln('Referenced form definition files found that should be updated.');
-                } else {
-                    $this->output->writeln(
-                        '<warning>There are references to form definitions which are located in extensions and thus cannot be renamed automatically by this wizard.'
-                      . 'This form definitions from extensions that do not end with .form.yaml have to be renamed by hand!'
-                      . 'After that you can run this wizard again to migrate the references.</warning>'
-                    );
-                }
-            }
-        }
-
-        return $updateNeeded;
-    }
-
-    /**
-     * Performs the accordant updates.
-     *
-     * @return bool Whether everything went smoothly or not
-     */
-    public function executeUpdate(): bool
-    {
-        $success = true;
-
-        $GLOBALS['LANG'] = GeneralUtility::makeInstance(LanguageService::class);
-        $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
-        $filePersistenceSlot = GeneralUtility::makeInstance(FilePersistenceSlot::class);
-
-        $this->connection = $connectionPool->getConnectionForTable('tt_content');
-        $this->persistenceManager = $this->getObjectManager()->get(FormPersistenceManager::class);
-        $this->resourceFactory = GeneralUtility::makeInstance(ResourceFactory::class);
-        $this->referenceIndex = GeneralUtility::makeInstance(ReferenceIndex::class);
-        $this->flexFormTools = GeneralUtility::makeInstance(FlexFormTools::class);
-
-        $filePersistenceSlot->defineInvocation(
-            FilePersistenceSlot::COMMAND_FILE_RENAME,
-            true
-        );
-
-        $formDefinitionsInformation = $this->getFormDefinitionsInformation();
-        foreach ($formDefinitionsInformation as $currentPersistenceIdentifier => $formDefinitionInformation) {
-            if (
-                (
-                    $formDefinitionInformation['hasNewFileExtension'] === true
-                    && $formDefinitionInformation['hasReferencesForOldFileExtension'] === false
-                    && $formDefinitionInformation['hasReferencesForNewFileExtension'] === false
-                )
-                || (
-                    $formDefinitionInformation['hasNewFileExtension'] === false
-                    && $formDefinitionInformation['location'] === 'extension'
-                    && $formDefinitionInformation['hasReferencesForOldFileExtension'] === false
-                    && $formDefinitionInformation['hasReferencesForNewFileExtension'] === false
-                )
-            ) {
-                continue;
-            }
-
-            if (
-                $formDefinitionInformation['hasNewFileExtension'] === true
-                && (
-                    $formDefinitionInformation['hasReferencesForOldFileExtension'] === true
-                    || $formDefinitionInformation['hasReferencesForNewFileExtension'] === true
-                )
-            ) {
-                foreach ($formDefinitionInformation['referencesForOldFileExtension'] as $referenceForOldFileExtension) {
-                    $newFlexformXml = $this->generateNewFlexformForReference(
-                        $referenceForOldFileExtension,
-                        $referenceForOldFileExtension['sheetIdentifiersWhichNeedsUpdate'],
-                        $formDefinitionInformation['persistenceIdentifier']
-                    );
-                    $this->updateContentReference(
-                        $referenceForOldFileExtension['ttContentUid'],
-                        $newFlexformXml,
-                        true
-                    );
-                }
-
-                foreach ($formDefinitionInformation['referencesForNewFileExtension'] as $referenceForNewFileExtension) {
-                    $newFlexformXml = $this->generateNewFlexformForReference(
-                        $referenceForNewFileExtension,
-                        $referenceForNewFileExtension['sheetIdentifiersWhichNeedsUpdate']
-                    );
-                    $this->updateContentReference(
-                        $referenceForNewFileExtension['ttContentUid'],
-                        $newFlexformXml
-                    );
-                }
-
-                continue;
-            }
-
-            if ($formDefinitionInformation['location'] === 'storage') {
-                $file = $formDefinitionInformation['file'];
-
-                $newPossiblePersistenceIdentifier = $this->persistenceManager->getUniquePersistenceIdentifier(
-                    $file->getNameWithoutExtension(),
-                    $file->getParentFolder()->getCombinedIdentifier()
-                );
-                $newFileName = PathUtility::pathinfo(
-                    $newPossiblePersistenceIdentifier,
-                    PATHINFO_BASENAME
-                );
-                $newFileName = is_string($newFileName) ? $newFileName : '';
-
-                try {
-                    $file->rename($newFileName, DuplicationBehavior::RENAME);
-                    $newPersistenceIdentifier = $file->getCombinedIdentifier();
-                } catch (\Exception $e) {
-                    $this->output->writeln(sprintf(
-                        '<error>Failed to rename form definition "%s" to "%s".</error>',
-                        $formDefinitionInformation['persistenceIdentifier'],
-                        $newFileName
-                    ));
-                    $success = false;
-                    continue;
-                }
-
-                if (
-                    $formDefinitionInformation['hasReferencesForOldFileExtension'] === true
-                    || $formDefinitionInformation['hasReferencesForNewFileExtension'] === true
-                ) {
-                    foreach ($formDefinitionInformation['referencesForOldFileExtension'] as $referenceForOldFileExtension) {
-                        $sheetIdentifiersWhichNeedsUpdate = $this->getSheetIdentifiersWhichNeedsUpdate(
-                            $referenceForOldFileExtension['flexform'],
-                            $formDefinitionsInformation,
-                            $currentPersistenceIdentifier,
-                            $formDefinitionInformation['persistenceIdentifier'],
-                            $newPersistenceIdentifier
-                        );
-                        $newFlexformXml = $this->generateNewFlexformForReference(
-                            $referenceForOldFileExtension,
-                            $sheetIdentifiersWhichNeedsUpdate,
-                            $newPersistenceIdentifier
-                        );
-                        $this->updateContentReference(
-                            $referenceForOldFileExtension['ttContentUid'],
-                            $newFlexformXml
-                        );
-                    }
-
-                    foreach ($formDefinitionInformation['referencesForNewFileExtension'] as $referenceForNewFileExtension) {
-                        $sheetIdentifiersWhichNeedsUpdate = $this->getSheetIdentifiersWhichNeedsUpdate(
-                            $referenceForNewFileExtension['flexform'],
-                            $formDefinitionsInformation,
-                            $currentPersistenceIdentifier,
-                            $formDefinitionInformation['persistenceIdentifier'],
-                            $newPersistenceIdentifier
-                        );
-                        $newFlexformXml = $this->generateNewFlexformForReference(
-                            $referenceForNewFileExtension,
-                            $sheetIdentifiersWhichNeedsUpdate,
-                            $newPersistenceIdentifier
-                        );
-                        $this->updateContentReference(
-                            $referenceForNewFileExtension['ttContentUid'],
-                            $newFlexformXml
-                        );
-                    }
-                }
-            } else {
-                $success = false;
-                $this->output->writeln(sprintf(
-                    '<error>Failed to rename form definition "%s" to "%s". You have to be rename it by hand!. '
-                  . 'After that you can run this wizard again to migrate the references.</error>',
-                    $formDefinitionInformation['persistenceIdentifier'],
-                    $this->getNewPersistenceIdentifier($formDefinitionInformation['persistenceIdentifier'])
-                ));
-            }
-        }
-
-        $filePersistenceSlot->defineInvocation(
-            FilePersistenceSlot::COMMAND_FILE_RENAME,
-            null
-        );
-
-        return $success;
-    }
-
-    /**
-     * @return array
-     */
-    protected function getFormDefinitionsInformation(): array
-    {
-        $formDefinitionsInformation = array_merge(
-            $this->getFormDefinitionsInformationFromStorages(),
-            $this->getFormDefinitionsInformationFromExtensions()
-        );
-
-        $formDefinitionsInformation = $this->enrichFormDefinitionsInformationWithDataFromReferences($formDefinitionsInformation);
-
-        return $formDefinitionsInformation;
-    }
-
-    /**
-     * @return array
-     */
-    protected function getFormDefinitionsInformationFromStorages(): array
-    {
-        $formDefinitionsInformation =  [];
-
-        foreach ($this->persistenceManager->retrieveYamlFilesFromStorageFolders() as $file) {
-            $persistenceIdentifier = $file->getCombinedIdentifier();
-
-            $formDefinition = $this->getFormDefinition($file);
-            if (empty($formDefinition)) {
-                continue;
-            }
-
-            $formDefinitionsInformation[$persistenceIdentifier] = $this->setFormDefinitionInformationData(
-                $persistenceIdentifier,
-                $formDefinition,
-                $file,
-                'storage'
-            );
-        }
-
-        return $formDefinitionsInformation;
-    }
-
-    /**
-     * @return array
-     */
-    protected function getFormDefinitionsInformationFromExtensions(): array
-    {
-        $formDefinitionsInformation =  [];
-
-        foreach ($this->persistenceManager->retrieveYamlFilesFromExtensionFolders() as $persistenceIdentifier => $_) {
-            try {
-                /** @var File $file */
-                $file = $this->resourceFactory->retrieveFileOrFolderObject($persistenceIdentifier);
-            } catch (\Exception $exception) {
-                continue;
-            }
-
-            $formDefinition = $this->getFormDefinition($file);
-            if (empty($formDefinition)) {
-                continue;
-            }
-
-            $formDefinitionsInformation[$persistenceIdentifier] = $this->setFormDefinitionInformationData(
-                $persistenceIdentifier,
-                $formDefinition,
-                $file,
-                'extension'
-            );
-        }
-
-        return $formDefinitionsInformation;
-    }
-
-    /**
-     * @param string $persistenceIdentifier
-     * @param array $formDefinition
-     * @param File $file
-     * @param string $location
-     * @return array
-     */
-    protected function setFormDefinitionInformationData(
-        string $persistenceIdentifier,
-        array $formDefinition,
-        File $file,
-        string $location
-    ): array {
-        return [
-            'location' => $location,
-            'persistenceIdentifier' => $persistenceIdentifier,
-            'prototypeName' => $formDefinition['prototypeName'],
-            'formIdentifier' => $formDefinition['identifier'],
-            'file' => $file,
-            'referencesForOldFileExtension' => [],
-            'referencesForNewFileExtension' => [],
-            'hasNewFileExtension' => $this->hasNewFileExtension($persistenceIdentifier),
-            'hasReferencesForOldFileExtension' => false,
-            'hasReferencesForNewFileExtension' => false,
-            'referencesForOldFileExtensionNeedsFlexformUpdates' => false,
-            'referencesForNewFileExtensionNeedsFlexformUpdates' => false,
-        ];
-    }
-
-    /**
-     * @param array $formDefinitionsInformation
-     * @return array
-     */
-    protected function enrichFormDefinitionsInformationWithDataFromReferences(array $formDefinitionsInformation): array
-    {
-        foreach ($this->getAllFlexformFieldsFromFormPlugins() as $pluginData) {
-            if (empty($pluginData['pi_flexform'])) {
-                continue;
-            }
-            $flexform = GeneralUtility::xml2array($pluginData['pi_flexform']);
-            if (!is_array($flexform)) {
-                // * There is no data other than a base XML-structure in pi_flexform:
-                //   xml2array returns empty string or newline-character (string)
-                // * pi_flexform is invalid XML:
-                //   xml2array returns an error message (string)
-                continue;
-            }
-            $referencedPersistenceIdentifier = $this->getPersistenceIdentifierFromFlexform($flexform);
-            $referenceHasNewFileExtension = $this->hasNewFileExtension($referencedPersistenceIdentifier);
-            $possibleOldReferencedPersistenceIdentifier = $this->getOldPersistenceIdentifier($referencedPersistenceIdentifier);
-            $possibleNewReferencedPersistenceIdentifier = $this->getNewPersistenceIdentifier($referencedPersistenceIdentifier);
-
-            $referenceData = [
-                'scope' => null,
-                'ttContentUid' => (int)$pluginData['uid'],
-                'flexform' => $flexform,
-                'sheetIdentifiersWhichNeedsUpdate' => [],
-            ];
-
-            $targetPersistenceIdentifier = null;
-            if (array_key_exists($referencedPersistenceIdentifier, $formDefinitionsInformation)) {
-                $targetPersistenceIdentifier = $referencedPersistenceIdentifier;
-                if ($referenceHasNewFileExtension) {
-                    $referenceData['scope'] = 'referencesForNewFileExtension';
-                } else {
-                    $referenceData['scope'] = 'referencesForOldFileExtension';
-                }
-            } else {
-                if ($referenceHasNewFileExtension) {
-                    if (array_key_exists($possibleOldReferencedPersistenceIdentifier, $formDefinitionsInformation)) {
-                        $targetPersistenceIdentifier = $possibleOldReferencedPersistenceIdentifier;
-                        $referenceData['scope'] = 'referencesForNewFileExtension';
-                    } else {
-                        // There is no existing file for this reference
-                        continue;
-                    }
-                } else {
-                    if (array_key_exists($possibleNewReferencedPersistenceIdentifier, $formDefinitionsInformation)) {
-                        $targetPersistenceIdentifier = $possibleNewReferencedPersistenceIdentifier;
-                        $referenceData['scope'] = 'referencesForOldFileExtension';
-                    } else {
-                        // There is no existing file for this reference
-                        continue;
-                    }
-                }
-            }
-
-            $referenceData['sheetIdentifiersWhichNeedsUpdate'] = $this->getSheetIdentifiersWhichNeedsUpdate(
-                $flexform,
-                $formDefinitionsInformation,
-                $targetPersistenceIdentifier,
-                $possibleOldReferencedPersistenceIdentifier,
-                $possibleNewReferencedPersistenceIdentifier
-            );
-
-            $scope = $referenceData['scope'];
-
-            $formDefinitionsInformation[$targetPersistenceIdentifier][$scope][] = $referenceData;
-            if ($scope === 'referencesForOldFileExtension') {
-                $formDefinitionsInformation[$targetPersistenceIdentifier]['hasReferencesForOldFileExtension'] = true;
-                $formDefinitionsInformation[$targetPersistenceIdentifier]['referencesForOldFileExtensionNeedsFlexformUpdates'] = !empty($referenceData['sheetIdentifiersWhichNeedsUpdate']);
-            } else {
-                $formDefinitionsInformation[$targetPersistenceIdentifier]['hasReferencesForNewFileExtension'] = true;
-                $formDefinitionsInformation[$targetPersistenceIdentifier]['referencesForNewFileExtensionNeedsFlexformUpdates'] = !empty($referenceData['sheetIdentifiersWhichNeedsUpdate']);
-            }
-        }
-
-        return $formDefinitionsInformation;
-    }
-
-    /**
-     * @param array $flexform
-     * @param array $formDefinitionsInformation
-     * @param string $targetPersistenceIdentifier
-     * @param string $possibleOldReferencedPersistenceIdentifier
-     * @param string $possibleNewReferencedPersistenceIdentifier
-     * @return array
-     */
-    protected function getSheetIdentifiersWhichNeedsUpdate(
-        array $flexform,
-        array $formDefinitionsInformation,
-        string $targetPersistenceIdentifier,
-        string $possibleOldReferencedPersistenceIdentifier,
-        string $possibleNewReferencedPersistenceIdentifier
-    ): array {
-        $sheetIdentifiersWhichNeedsUpdate = [];
-
-        $sheetIdentifiers = $this->getSheetIdentifiersForFinisherOverrides($flexform);
-        foreach ($sheetIdentifiers as $currentSheetIdentifier => $finisherIdentifier) {
-            $sheetIdentifierForOldPersistenceIdentifier = $this->buildExpectedSheetIdentifier(
-                $possibleOldReferencedPersistenceIdentifier,
-                $formDefinitionsInformation[$targetPersistenceIdentifier]['prototypeName'],
-                $formDefinitionsInformation[$targetPersistenceIdentifier]['formIdentifier'],
-                $finisherIdentifier
-            );
-
-            $sheetIdentifierForNewPersistenceIdentifier = $this->buildExpectedSheetIdentifier(
-                $possibleNewReferencedPersistenceIdentifier,
-                $formDefinitionsInformation[$targetPersistenceIdentifier]['prototypeName'],
-                $formDefinitionsInformation[$targetPersistenceIdentifier]['formIdentifier'],
-                $finisherIdentifier
-            );
-
-            if (
-                $currentSheetIdentifier === $sheetIdentifierForOldPersistenceIdentifier
-                && !array_key_exists($sheetIdentifierForNewPersistenceIdentifier, $sheetIdentifiers)
-            ) {
-                $sheetIdentifiersWhichNeedsUpdate[$currentSheetIdentifier] = $sheetIdentifierForNewPersistenceIdentifier;
-            }
-        }
-
-        return $sheetIdentifiersWhichNeedsUpdate;
-    }
-
-    /**
-     * @param array $flexform
-     * @return array
-     */
-    protected function getSheetIdentifiersForFinisherOverrides(array $flexform): array
-    {
-        $sheetIdentifiers = [];
-        foreach ($this->getFinisherSheetsFromFlexform($flexform) as $sheetIdentifier => $sheetData) {
-            $itemOptionPath = array_keys($sheetData['lDEF']);
-            $firstSheetItemOptionPath = (string)array_shift($itemOptionPath);
-            preg_match('#^settings\.finishers\.(.*)\..+$#', $firstSheetItemOptionPath, $matches);
-            if (!isset($matches[1])) {
-                continue;
-            }
-            $sheetIdentifiers[$sheetIdentifier] = $matches[1];
-        }
-
-        return $sheetIdentifiers;
-    }
-
-    /**
-     * @param array $flexform
-     * @return array
-     */
-    protected function getFinisherSheetsFromFlexform(array $flexform): array
-    {
-        if (!isset($flexform['data'])) {
-            return [];
-        }
-
-        return array_filter(
-            $flexform['data'],
-            function ($key) {
-                return $key !== 'sDEF' && strlen($key) === 32;
-            },
-            ARRAY_FILTER_USE_KEY
-        );
-    }
-
-    /**
-     * @param array $flexform
-     * @return string
-     */
-    protected function getPersistenceIdentifierFromFlexform(array $flexform): string
-    {
-        return $flexform['data']['sDEF']['lDEF']['settings.persistenceIdentifier']['vDEF'] ?? '';
-    }
-
-    /**
-     * @param array $referenceData
-     * @param array $sheetIdentifiersWhichNeedsUpdate
-     * @param string $newPersistenceIdentifier
-     * @return string
-     */
-    protected function generateNewFlexformForReference(
-        array $referenceData,
-        array $sheetIdentifiersWhichNeedsUpdate,
-        string $newPersistenceIdentifier = ''
-    ): string {
-        $flexform = $referenceData['flexform'];
-        if (!empty($newPersistenceIdentifier)) {
-            $flexform['data']['sDEF']['lDEF']['settings.persistenceIdentifier']['vDEF'] = $newPersistenceIdentifier;
-        }
-
-        foreach ($sheetIdentifiersWhichNeedsUpdate as $oldSheetIdentifier => $newSheetIdentifier) {
-            $flexform['data'][$newSheetIdentifier] = $flexform['data'][$oldSheetIdentifier];
-            unset($flexform['data'][$oldSheetIdentifier]);
-        }
-
-        return $this->flexFormTools->flexArray2Xml($flexform, true);
-    }
-
-    /**
-     * @param string $persistenceIdentifier
-     * @return bool
-     */
-    protected function hasNewFileExtension(string $persistenceIdentifier): bool
-    {
-        return StringUtility::endsWith(
-            $persistenceIdentifier,
-            FormPersistenceManager::FORM_DEFINITION_FILE_EXTENSION
-        );
-    }
-
-    /**
-     * @param array $formDefinition
-     * @return bool
-     */
-    protected function looksLikeAFormDefinition(array $formDefinition): bool
-    {
-        return isset($formDefinition['identifier'], $formDefinition['type']) && $formDefinition['type'] === 'Form';
-    }
-
-    /**
-     * @param string $persistenceIdentifier
-     * @return string
-     */
-    protected function getOldPersistenceIdentifier(string $persistenceIdentifier): string
-    {
-        return preg_replace(
-            '
-            #^(.*)(\.form\.yaml)$#',
-            '${1}.yaml',
-            $persistenceIdentifier
-        );
-    }
-
-    /**
-     * @param string $persistenceIdentifier
-     * @return string
-     */
-    protected function getNewPersistenceIdentifier(string $persistenceIdentifier): string
-    {
-        return preg_replace(
-            '#(?<!\.form).yaml$#',
-            '.form.yaml',
-            $persistenceIdentifier
-        );
-    }
-
-    /**
-     * @param string $persistenceIdentifier
-     * @param string $prototypeName
-     * @param string $formIdentifier
-     * @param string $finisherIdentifier
-     * @return string
-     */
-    protected function buildExpectedSheetIdentifier(
-        string $persistenceIdentifier,
-        string $prototypeName,
-        string $formIdentifier,
-        string $finisherIdentifier
-    ): string {
-        return md5(
-            implode('', [
-                $persistenceIdentifier,
-                $prototypeName,
-                $formIdentifier,
-                $finisherIdentifier
-            ])
-        );
-    }
-
-    /**
-     * @param File $file
-     * @return array
-     */
-    protected function getFormDefinition(File $file): array
-    {
-        try {
-            $rawYamlContent = $file->getContents();
-            $formDefinition = $this->extractMetaDataFromCouldBeFormDefinition($rawYamlContent);
-
-            if (!$this->looksLikeAFormDefinition($formDefinition)) {
-                $formDefinition = [];
-            }
-        } catch (\Exception $exception) {
-            $formDefinition = [];
-        }
-
-        return $formDefinition;
-    }
-
-    /**
-     * @param string $maybeRawFormDefinition
-     * @return array
-     */
-    protected function extractMetaDataFromCouldBeFormDefinition(string $maybeRawFormDefinition): array
-    {
-        $metaDataProperties = ['identifier', 'type', 'label', 'prototypeName'];
-        $metaData = [];
-        foreach (explode("\n", $maybeRawFormDefinition) as $line) {
-            if (empty($line) || $line[0] === ' ') {
-                continue;
-            }
-
-            [$key, $value] = explode(':', $line);
-            if (
-                empty($key)
-                || empty($value)
-                || !in_array($key, $metaDataProperties)
-            ) {
-                continue;
-            }
-
-            $value = trim($value, ' \'"');
-            $metaData[$key] = $value;
-        }
-
-        return $metaData;
-    }
-
-    /**
-     * @return array
-     */
-    protected function getAllFlexformFieldsFromFormPlugins(): array
-    {
-        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
-            ->getQueryBuilderForTable('tt_content');
-        $queryBuilder->getRestrictions()
-            ->removeAll()
-            ->add(GeneralUtility::makeInstance(DeletedRestriction::class));
-
-        $records = $queryBuilder
-            ->select('uid', 'pi_flexform')
-            ->from('tt_content')
-            ->where(
-                $queryBuilder->expr()->eq(
-                    'CType',
-                    $queryBuilder->createNamedParameter('form_formframework', \PDO::PARAM_STR)
-                )
-            )
-            ->execute()
-            ->fetchAll();
-
-        return $records;
-    }
-
-    /**
-     * @param int $uid
-     * @param string $flexform
-     * @param bool $updateRefindex
-     */
-    protected function updateContentReference(
-        int $uid,
-        string $flexform,
-        bool $updateRefindex = false
-    ): void {
-        $this->connection->update(
-            'tt_content',
-            ['pi_flexform' => $flexform],
-            ['uid' => $uid]
-        );
-
-        if (!$updateRefindex) {
-            return;
-        }
-
-        $this->referenceIndex->updateRefIndexTable(
-            'tt_content',
-            $uid
-        );
-    }
-
-    /**
-     * @return ObjectManager
-     */
-    protected function getObjectManager(): ObjectManager
-    {
-        return GeneralUtility::makeInstance(ObjectManager::class);
-    }
-}
diff --git a/typo3/sysext/form/Tests/Functional/Hooks/FormFileExtensionUpdateTest.php b/typo3/sysext/form/Tests/Functional/Hooks/FormFileExtensionUpdateTest.php
deleted file mode 100644 (file)
index f33aded..0000000
+++ /dev/null
@@ -1,586 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-/*
- * 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!
- */
-
-namespace TYPO3\CMS\Form\Tests\Functional\Hooks;
-
-use Doctrine\DBAL\FetchMode;
-use Symfony\Component\Console\Output\NullOutput;
-use TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools;
-use TYPO3\CMS\Core\Core\Bootstrap;
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Database\ReferenceIndex;
-use TYPO3\CMS\Core\Resource\Folder;
-use TYPO3\CMS\Core\Resource\StorageRepository;
-use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Core\Utility\StringUtility;
-use TYPO3\CMS\Form\Hooks\FormFileExtensionUpdate;
-use TYPO3\CMS\Form\Slot\FilePersistenceSlot;
-use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
-
-class FormFileExtensionUpdateTest extends FunctionalTestCase
-{
-    /**
-     * @var string[]
-     */
-    protected $coreExtensionsToLoad = [
-        'form',
-    ];
-
-    /**
-     * @var string[]
-     */
-    protected $testExtensionsToLoad = [
-        'typo3/sysext/form/Tests/Functional/Hooks/Fixtures/test_resources',
-    ];
-
-    /**
-     * @var FormFileExtensionUpdate
-     */
-    private $subject;
-
-    /**
-     * @var FilePersistenceSlot
-     */
-    private $slot;
-
-    /**
-     * @var FlexFormTools
-     */
-    private $flexForm;
-
-    /**
-     * @var ReferenceIndex
-     */
-    private $referenceIndex;
-
-    /**
-     * @var Folder
-     */
-    private $storageFolder;
-
-    protected function setUp(): void
-    {
-        parent::setUp();
-
-        $this->setUpBackendUserFromFixture(1);
-        Bootstrap::initializeLanguageObject();
-
-        $folderIdentifier = 'form_definitions';
-        $storage = GeneralUtility::makeInstance(StorageRepository::class)->getStorageObject(1);
-
-        if ($storage->hasFolder($folderIdentifier)) {
-            $storage->getFolder($folderIdentifier)->delete(true);
-        }
-
-        $output = new NullOutput();
-        $this->subject = GeneralUtility::makeInstance(FormFileExtensionUpdate::class);
-        $this->subject->setOutput($output);
-        $this->slot = GeneralUtility::makeInstance(FilePersistenceSlot::class);
-        $this->flexForm = GeneralUtility::makeInstance(FlexFormTools::class);
-        $this->referenceIndex = GeneralUtility::makeInstance(ReferenceIndex::class);
-        $this->storageFolder = $storage->createFolder($folderIdentifier);
-    }
-
-    protected function tearDown(): void
-    {
-        $this->storageFolder->delete(true);
-        parent::tearDown();
-    }
-
-    /*
-     * --- CHECK FOR UPDATE ---
-     */
-
-    /**
-     * @return bool
-     */
-    private function invokeCheckForUpdate(): bool
-    {
-        return $this->subject->updateNecessary();
-    }
-
-    /**
-     * @test
-     */
-    public function updateIsNotRequiredHavingUpdatedFormDefinitions()
-    {
-        $this->createStorageFormDefinition('updated', false);
-        self::assertFalse($this->invokeCheckForUpdate());
-    }
-
-    /**
-     * @test
-     */
-    public function updateIsRequiredHavingOutdatedStorageFormDefinitions()
-    {
-        $this->createStorageFormDefinition('legacy', true);
-        self::assertTrue($this->invokeCheckForUpdate());
-    }
-
-    /**
-     * @test
-     */
-    public function updateIsNotRequiredHavingUpdatedStorageReferences()
-    {
-        $this->createStorageFormDefinition('updated', false);
-        $this->createReference(
-            $this->createStorageFileIdentifier('updated.form.yaml'),
-            'updated'
-        );
-        self::assertFalse($this->invokeCheckForUpdate());
-    }
-
-    /**
-     * @test
-     */
-    public function updateIsNotRequiredHavingUpdatedStorageReferencesWithFinisherOverrides(
-    ) {
-        $this->createStorageFormDefinition('updated', false);
-        $finisherOverrides = [
-            'FirstFinisher' => StringUtility::getUniqueId(),
-            'SecondFinisher' => StringUtility::getUniqueId(),
-        ];
-        $this->createReference(
-            $this->createStorageFileIdentifier('updated.form.yaml'),
-            'updated',
-            $finisherOverrides
-        );
-        self::assertFalse($this->invokeCheckForUpdate());
-    }
-
-    /**
-     * @test
-     */
-    public function updateIsRequiredHavingOutdatedStorageReferences()
-    {
-        // form definition was renamed already
-        $this->createStorageFormDefinition('updated', false);
-        // but references not updated yet
-        $this->createReference(
-            $this->createStorageFileIdentifier('updated.yaml'),
-            'updated'
-        );
-        self::assertTrue($this->invokeCheckForUpdate());
-    }
-
-    /**
-     * @test
-     */
-    public function updateIsRequiredHavingOutdatedStorageReferencesWithFinisherOverrides(
-    ) {
-        // form definition was renamed already
-        $this->createStorageFormDefinition('updated', false);
-        // but references not updated yet
-        $finisherOverrides = [
-            'FirstFinisher' => StringUtility::getUniqueId(),
-            'SecondFinisher' => StringUtility::getUniqueId(),
-        ];
-        $this->createReference(
-            $this->createStorageFileIdentifier('updated.yaml'),
-            'updated',
-            $finisherOverrides
-        );
-        self::assertTrue($this->invokeCheckForUpdate());
-    }
-
-    /**
-     * @test
-     */
-    public function updateIsNotRequiredHavingOutdatedExtensionFormDefinitions()
-    {
-        $this->setUpAllowedExtensionPaths();
-        self::assertFalse($this->invokeCheckForUpdate());
-    }
-
-    /**
-     * @test
-     */
-    public function updateIsNotRequiredHavingUpdatedExtensionReferences()
-    {
-        $this->setUpAllowedExtensionPaths();
-        $this->createReference(
-            $this->createExtensionFileIdentifier('updated.form.yaml'),
-            'updated'
-        );
-        self::assertFalse($this->invokeCheckForUpdate());
-    }
-
-    /**
-     * @test
-     */
-    public function updateIsRequiredHavingOutdatedExtensionReferences()
-    {
-        $this->setUpAllowedExtensionPaths();
-        $this->createReference(
-            $this->createExtensionFileIdentifier('updated.yaml'),
-            'updated'
-        );
-        self::assertTrue($this->invokeCheckForUpdate());
-    }
-
-    /**
-     * @test
-     */
-    public function updateIsRequiredHavingOutdatedExtensionReferencesWithFinisherOverrides(
-    ) {
-        $this->setUpAllowedExtensionPaths();
-        $finisherOverrides = [
-            'FirstFinisher' => StringUtility::getUniqueId(),
-            'SecondFinisher' => StringUtility::getUniqueId(),
-        ];
-        $this->createReference(
-            $this->createExtensionFileIdentifier('updated.yaml'),
-            'updated',
-            $finisherOverrides
-        );
-        self::assertTrue($this->invokeCheckForUpdate());
-    }
-
-    /*
-     * --- PERFORM UPDATE ---
-     */
-
-    private function invokePerformUpdate(): bool
-    {
-        return $this->subject->executeUpdate();
-    }
-
-    /**
-     * @test
-     */
-    public function performUpdateSucceedsHavingOutdatedStorageFormDefinitions()
-    {
-        $this->createStorageFormDefinition('legacy', true);
-        self::assertTrue(
-            $this->invokePerformUpdate()
-        );
-        self::assertTrue(
-            $this->storageFolder->hasFile('legacy.form.yaml')
-        );
-    }
-
-    /**
-     * @test
-     */
-    public function performUpdateSucceedsHavingOutdatedStorageReferences()
-    {
-        // form definition was renamed already
-        $this->createStorageFormDefinition('updated', false);
-        // but references not updated yet
-        $this->createReference(
-            $this->createStorageFileIdentifier('updated.yaml'),
-            'updated'
-        );
-        // having an additional reference
-        $this->createReference(
-            $this->createStorageFileIdentifier('updated.yaml'),
-            'updated'
-        );
-        self::assertTrue(
-            $this->invokePerformUpdate()
-        );
-        $expectedFileIdentifier = $this->createStorageFileIdentifier(
-            'updated.form.yaml'
-        );
-        foreach ($this->retrieveAllFlexForms() as $flexForm) {
-            self::assertSame(
-                $expectedFileIdentifier,
-                $flexForm['data']['sDEF']['lDEF']['settings.persistenceIdentifier']['vDEF']
-            );
-        }
-    }
-
-    /**
-     * @test
-     */
-    public function performUpdateSucceedsHavingOutdatedStorageReferencesWithFinisherOverrides(
-    ) {
-        // form definition was renamed already
-        $this->createStorageFormDefinition('updated', false);
-        // but references not updated yet
-        $finisherOverrides = [
-            'FirstFinisher' => StringUtility::getUniqueId(),
-            'SecondFinisher' => StringUtility::getUniqueId(),
-        ];
-        $this->createReference(
-            $this->createStorageFileIdentifier('updated.yaml'),
-            'updated',
-            $finisherOverrides
-        );
-        // having an additional reference
-        $this->createReference(
-            $this->createStorageFileIdentifier('updated.yaml'),
-            'updated',
-            $finisherOverrides
-        );
-        self::assertTrue(
-            $this->invokePerformUpdate()
-        );
-        $expectedFileIdentifier = $this->createStorageFileIdentifier(
-            'updated.form.yaml'
-        );
-        $expectedSheetIdentifiers = $this->createFinisherOverridesSheetIdentifiers(
-            $expectedFileIdentifier,
-            'updated',
-            $finisherOverrides
-        );
-        foreach ($this->retrieveAllFlexForms() as $flexForm) {
-            self::assertSame(
-                $expectedFileIdentifier,
-                $flexForm['data']['sDEF']['lDEF']['settings.persistenceIdentifier']['vDEF'] ?? null
-            );
-            foreach ($finisherOverrides as $finisherIdentifier => $finisherValue) {
-                $sheetIdentifier = $expectedSheetIdentifiers[$finisherIdentifier];
-                $propertyName = sprintf(
-                    'settings.finishers.%s.value',
-                    $finisherIdentifier
-                );
-                self::assertSame(
-                    $finisherValue,
-                    $flexForm['data'][$sheetIdentifier]['lDEF'][$propertyName]['vDEF'] ?? null
-                );
-            }
-        }
-    }
-
-    /**
-     * @test
-     */
-    public function performUpdateSucceedsHavingOutdatedExtensionReferences()
-    {
-        $this->setUpAllowedExtensionPaths();
-        $this->createReference(
-            $this->createExtensionFileIdentifier('updated.yaml'),
-            'updated'
-        );
-        // having an additional reference
-        $this->createReference(
-            $this->createExtensionFileIdentifier('updated.yaml'),
-            'updated'
-        );
-        self::assertTrue(
-            $this->invokePerformUpdate()
-        );
-        $expectedFileIdentifier = $this->createExtensionFileIdentifier(
-            'updated.form.yaml'
-        );
-        foreach ($this->retrieveAllFlexForms() as $flexForm) {
-            self::assertSame(
-                $expectedFileIdentifier,
-                $flexForm['data']['sDEF']['lDEF']['settings.persistenceIdentifier']['vDEF'] ?? null
-            );
-        }
-    }
-
-    /**
-     * @test
-     */
-    public function performUpdateSucceedsHavingOutdatedExtensionReferencesWithFinisherOverrides(
-    ) {
-        $this->setUpAllowedExtensionPaths();
-        $finisherOverrides = [
-            'FirstFinisher' => StringUtility::getUniqueId(),
-            'SecondFinisher' => StringUtility::getUniqueId(),
-        ];
-        $this->createReference(
-            $this->createExtensionFileIdentifier('updated.yaml'),
-            'updated',
-            $finisherOverrides
-        );
-        // having an additional reference
-        $this->createReference(
-            $this->createExtensionFileIdentifier('updated.yaml'),
-            'updated',
-            $finisherOverrides
-        );
-        self::assertTrue(
-            $this->invokePerformUpdate()
-        );
-    }
-
-    /*
-     * --- HELPER FUNCTIONS ---
-     */
-
-    /**
-     * @param string $name
-     * @param bool $legacy
-     */
-    private function createStorageFormDefinition(
-        string $name,
-        bool $legacy = false
-    ) {
-        $content = implode(LF, [
-            'type: Form',
-            'identifier: ' . $name,
-            'prototypeName: standard'
-        ]);
-
-        $fileName = $name . '.' . ($legacy ? 'yaml' : 'form.yaml');
-        $fileIdentifier = $this->createStorageFileIdentifier($fileName);
-
-        if (!$legacy) {
-            $this->slot->allowInvocation(
-                FilePersistenceSlot::COMMAND_FILE_CREATE,
-                $fileIdentifier
-            );
-            $this->slot->allowInvocation(
-                FilePersistenceSlot::COMMAND_FILE_SET_CONTENTS,
-                $fileIdentifier,
-                $this->slot->getContentSignature($content)
-            );
-        }
-
-        $this->storageFolder->createFile($fileName)->setContents($content);
-    }
-
-    /**
-     * @param string $fileIdentifier
-     * @param string $formIdentifier
-     * @param array $finisherOverrides
-     */
-    private function createReference(
-        string $fileIdentifier,
-        string $formIdentifier,
-        array $finisherOverrides = []
-    ) {
-        $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
-        $connection = $connectionPool->getConnectionForTable('tt_content');
-
-        $flexForm = [
-            'data' => [
-                'sDEF' => [
-                    'lDEF' => [
-                        'settings.persistenceIdentifier' => [
-                            'vDEF' => $fileIdentifier,
-                        ],
-                        'settings.overrideFinishers' => [
-                            'vDEF' => empty($finisherOverrides) ? '0' : '1',
-                        ],
-                    ]
-                ]
-            ]
-        ];
-
-        $sheetIdentifiers = $this->createFinisherOverridesSheetIdentifiers(
-            $fileIdentifier,
-            $formIdentifier,
-            $finisherOverrides
-        );
-        foreach ($finisherOverrides as $finisherIdentifier => $finisherValue) {
-            $sheetIdentifier = $sheetIdentifiers[$finisherIdentifier];
-            $propertyName = sprintf(
-                'settings.finishers.%s.value',
-                $finisherIdentifier
-            );
-            $flexForm['data'][$sheetIdentifier]['lDEF'] = [
-                $propertyName => [
-                    'vDEF' => $finisherValue
-                ],
-            ];
-        }
-
-        $values = [
-            'pid' => 1,
-            'header' => sprintf(
-                'Form Content Element for "%s"',
-                $formIdentifier
-            ),
-            'CType' => 'form_formframework',
-            'pi_flexform' => $this->flexForm
-                ->flexArray2Xml($flexForm, true)
-        ];
-
-        $connection->insert('tt_content', $values);
-        $id = $connection->lastInsertId('tt_content');
-        $this->referenceIndex->updateRefIndexTable('tt_content', $id);
-    }
-
-    /**
-     * Sets up additional paths to allow using form definitions from extension.
-     */
-    private function setUpAllowedExtensionPaths()
-    {
-        ExtensionManagementUtility::addTypoScriptSetup(trim('
-            module.tx_form.settings.yamlConfigurations {
-                110 = EXT:test_resources/Configuration/Yaml/AllowedExtensionPaths.yaml
-            }
-            plugin.tx_form.settings.yamlConfigurations {
-                110 = EXT:test_resources/Configuration/Yaml/AllowedExtensionPaths.yaml
-            }
-        '));
-    }
-
-    /**
-     * @return array
-     */
-    private function retrieveAllFlexForms(): array
-    {
-        $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
-        $connection = $connectionPool->getConnectionForTable('tt_content');
-
-        return array_map(
-            function (array $record) {
-                return GeneralUtility::xml2array($record['pi_flexform']);
-            },
-            $connection->select(['pi_flexform'], 'tt_content')
-                ->fetchAll(FetchMode::ASSOCIATIVE)
-        );
-    }
-
-    /**
-     * @param string $fileIdentifier
-     * @param string $formIdentifier
-     * @param array $finisherOverrides
-     * @return array
-     */
-    private function createFinisherOverridesSheetIdentifiers(
-        string $fileIdentifier,
-        string $formIdentifier,
-        array $finisherOverrides
-    ): array {
-        $sheetIdentifiers = [];
-        foreach (array_keys($finisherOverrides) as $finisherIdentifier) {
-            $sheetIdentifiers[$finisherIdentifier] = md5(
-                $fileIdentifier
-                . 'standard'
-                . $formIdentifier
-                . $finisherIdentifier
-            );
-        }
-        return $sheetIdentifiers;
-    }
-
-    /**
-     * @param string $fileName
-     * @return string
-     */
-    private function createStorageFileIdentifier(string $fileName): string
-    {
-        return $this->storageFolder->getCombinedIdentifier() . $fileName;
-    }
-
-    /**
-     * @param string $fileName
-     * @return string
-     */
-    private function createExtensionFileIdentifier(string $fileName): string
-    {
-        return 'EXT:test_resources/Configuration/Form/' . $fileName;
-    }
-}
index ee27f80..34cc263 100644 (file)
@@ -3,10 +3,6 @@
 defined('TYPO3') or die();
 
 call_user_func(function () {
-    // Register upgrade wizard in install tool
-    $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['formFileExtension']
-        = \TYPO3\CMS\Form\Hooks\FormFileExtensionUpdate::class;
-
     if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('filelist')) {
         // Context menu item handling for form files
         $GLOBALS['TYPO3_CONF_VARS']['BE']['ContextMenu']['ItemProviders'][1530637161]