[TASK] Install tool: JS driven routing 28/54128/16
authorChristian Kuhn <lolli@schwarzbu.ch>
Tue, 12 Sep 2017 22:27:21 +0000 (00:27 +0200)
committerSusanne Moog <susanne.moog@typo3.org>
Tue, 19 Sep 2017 19:52:11 +0000 (21:52 +0200)
The install tool suffered from three main issues since 6.2 rewrite:
* The "step" installer was re-used for recovery and installation
* The routing logic was server based and threw lots of redirects
  which lead to redirect loops
* The Controller/Action class structure was weird and hard to
  understand

The patch solves this with a rather huge rewrite:
* There are two request handlers: One for the Installer, one for
  the install tool.
* A simple list of controllers. One InstallerController for the
  step installer, the others for the main module points of the
  install tool and a Login and a Layout controller.
* Single action code is moved into controllers.
* Both tool and installer first load only a <head> section that
  contain JS references. All other calls are ajax based and the
  routing is done JS side.
* Installer and install tool no longer share controller code
  or templates, the installer can potentially be fully extracted
  from ext:install in another step.
* Installer.js is the "walk through installation" module of the
  installer.
* Router.js is the routing module for the install tool, all tool
  ajax requests get specific urls from this module and hand over
  errors to the Router.
* Error handling is handled on JS side: If for instance
  the login session expires and user clicks elsewhere, a 403
  response is returned which is handled by JS to route to login.
  This is also the place where a recovery can hook in later.
* The silent configuration updater is executed again which was
  removed during one of the previous master patches.
* The template structure is much easier.
* Various card content which has been calculated when loading
  the card layout is moved to the ajax code for single card
  content. That increases the performance of the main module
  points and makes them pretty snappy.

Change-Id: Ib40f40acba17bb47142c0da1bcfb389ab9b4b3a1
Resolves: #82504
Releases: master
Reviewed-on: https://review.typo3.org/54128
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Tested-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
266 files changed:
typo3/sysext/core/Classes/Configuration/ConfigurationManager.php
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/core/Configuration/DefaultConfigurationDescription.yaml
typo3/sysext/core/Configuration/FactoryConfiguration.php
typo3/sysext/install/Classes/Controller/AbstractController.php
typo3/sysext/install/Classes/Controller/Action/AbstractAction.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/ActionInterface.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/AbstractAjaxAction.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/ChangeInstallToolPassword.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/ClearAllCache.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/ClearTablesClear.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/ClearTablesStats.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/ClearTypo3tempFiles.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateAbstract.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateActivate.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateCheckPreConditions.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateDownload.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateIsUpdateAvailable.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateMove.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateUnpack.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateUpdateVersionMatrix.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateVerifyChecksum.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/CreateAdmin.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/DatabaseAnalyzerAnalyze.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/DatabaseAnalyzerExecute.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/DumpAutoload.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/EnvironmentCheckGetStatus.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/ExtensionCompatibilityTester.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/ExtensionScannerFiles.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/ExtensionScannerMarkFullyScannedRestFiles.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/ExtensionScannerScanFile.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/FolderStructureFix.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/FolderStructureGetStatus.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/ImageProcessing.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/LocalConfigurationWrite.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/MailTest.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/PresetActivate.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/ResetBackendUserUc.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/SystemMaintainerGetList.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/SystemMaintainerWrite.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/TcaExtTablesCheck.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/TcaMigrationsCheck.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/UninstallExtension.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeDocsMarkRead.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeDocsUnmarkRead.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsBlockingDatabaseAdds.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsBlockingDatabaseCharsetFix.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsBlockingDatabaseCharsetTest.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsBlockingDatabaseExecute.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsDoneUpgrades.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsExecute.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsInput.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsList.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsMarkUndone.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsSilentUpgrades.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Common/FirstInstallAction.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Common/InstallToolDisabledAction.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Common/InstallToolPasswordNotSetAction.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Common/LoginForm.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Step/AbstractStepAction.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Step/DatabaseConnect.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Step/DatabaseData.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Step/DatabaseSelect.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Step/DefaultConfiguration.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Step/EnvironmentAndFolders.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Step/StepInterface.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Tool/Environment.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Tool/Maintenance.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Tool/Settings.php [deleted file]
typo3/sysext/install/Classes/Controller/Action/Tool/Upgrade.php [deleted file]
typo3/sysext/install/Classes/Controller/AjaxController.php [deleted file]
typo3/sysext/install/Classes/Controller/BackendModuleController.php
typo3/sysext/install/Classes/Controller/EnvironmentController.php [new file with mode: 0644]
typo3/sysext/install/Classes/Controller/Exception.php [deleted file]
typo3/sysext/install/Classes/Controller/Exception/RedirectException.php [deleted file]
typo3/sysext/install/Classes/Controller/Exception/RedirectLoopException.php [deleted file]
typo3/sysext/install/Classes/Controller/InstallerController.php [new file with mode: 0644]
typo3/sysext/install/Classes/Controller/LayoutController.php [new file with mode: 0644]
typo3/sysext/install/Classes/Controller/LoginController.php [new file with mode: 0644]
typo3/sysext/install/Classes/Controller/MaintenanceController.php [new file with mode: 0644]
typo3/sysext/install/Classes/Controller/SettingsController.php [new file with mode: 0644]
typo3/sysext/install/Classes/Controller/StepController.php [deleted file]
typo3/sysext/install/Classes/Controller/ToolController.php [deleted file]
typo3/sysext/install/Classes/Controller/UpgradeController.php [new file with mode: 0644]
typo3/sysext/install/Classes/Exception/AuthenticationRequiredException.php [deleted file]
typo3/sysext/install/Classes/Http/Application.php
typo3/sysext/install/Classes/Http/InstallerRequestHandler.php [new file with mode: 0644]
typo3/sysext/install/Classes/Http/RecoveryRequestHandler.php [deleted file]
typo3/sysext/install/Classes/Http/RequestHandler.php
typo3/sysext/install/Classes/Service/EnableFileService.php
typo3/sysext/install/Classes/Service/Exception/ConfigurationChangedException.php [new file with mode: 0644]
typo3/sysext/install/Classes/Service/Exception/CoreVersionServiceException.php
typo3/sysext/install/Classes/Service/Exception/RemoteFetchException.php
typo3/sysext/install/Classes/Service/Exception/UnexpectedSignalReturnValueTypeException.php [deleted file]
typo3/sysext/install/Classes/Service/SessionService.php
typo3/sysext/install/Classes/Service/SilentConfigurationUpgradeService.php
typo3/sysext/install/Classes/View/JsonView.php [deleted file]
typo3/sysext/install/Classes/ViewHelpers/Uri/ActionViewHelper.php
typo3/sysext/install/Resources/Private/Layouts/Step.html [deleted file]
typo3/sysext/install/Resources/Private/Layouts/ToolAuthenticated.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Common/Copyright.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Common/Head.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Common/Headers.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Common/HiddenFormFields.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Common/LoginForm.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Common/MenuModuleLink.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Common/ModuleMenu.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Common/StatusMessage.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Common/SubmitButton.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Common/Topbar.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Step/DatabaseConnect/ConnectDetails.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Step/StepCounter.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Environment/EnvironmentCheck.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Environment/FolderStructure.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Environment/ImageProcessing.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Environment/MailTest.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Environment/PhpInfo.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Environment/SystemInformation.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Maintenance/ClearAllCache.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Maintenance/ClearTables.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Maintenance/ClearTypo3tempFiles.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Maintenance/CreateAdmin.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Maintenance/DatabaseAnalyzer.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Maintenance/DumpAutoload.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Maintenance/ResetBackendUserUc.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/ChangeInstallToolPassword.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/LocalConfiguration.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/LocalConfiguration/SubSection.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/Presets.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/Presets/Context.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/Presets/Context/Custom.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/Presets/Context/Debug.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/Presets/Context/Live.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/Presets/ExtbaseObjectCache.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/Presets/ExtbaseObjectCache/Apc.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/Presets/ExtbaseObjectCache/Apcu.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/Presets/ExtbaseObjectCache/Database.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/Presets/Image.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/Presets/Image/Custom.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/Presets/Image/GraphicsMagick.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/Presets/Image/ImageMagick6.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/Presets/Mail.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/Presets/Mail/Custom.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/Presets/Mail/Sendmail.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/Presets/Mail/Smtp.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Settings/SystemMaintainer.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Upgrade/CheckForBrokenExtensions.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Upgrade/CoreUpdate.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Upgrade/ExtensionScanner.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Upgrade/TcaExtTablesCheck.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Upgrade/TcaMigrationsCheck.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Upgrade/UpgradeDocs.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Upgrade/UpgradeDocs/PanelItem.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Action/Tool/Upgrade/UpgradeWizards.html [deleted file]
typo3/sysext/install/Resources/Private/Partials/Environment/EnvironmentCheck.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Environment/FolderStructure.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Environment/ImageProcessing.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Environment/MailTest.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Environment/PhpInfo.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Environment/SystemInformation.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Layout/MenuModuleLink.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Maintenance/ClearAllCache.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Maintenance/ClearTables.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Maintenance/ClearTypo3tempFiles.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Maintenance/CreateAdmin.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Maintenance/DatabaseAnalyzer.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Maintenance/DumpAutoload.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Maintenance/ResetBackendUserUc.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/ChangeInstallToolPassword.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/LocalConfiguration.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/LocalConfiguration/SubSection.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/Presets.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/Presets/Context.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/Presets/Context/Custom.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/Presets/Context/Debug.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/Presets/Context/Live.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/Presets/ExtbaseObjectCache.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/Presets/ExtbaseObjectCache/Apc.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/Presets/ExtbaseObjectCache/Apcu.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/Presets/ExtbaseObjectCache/Database.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/Presets/Image.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/Presets/Image/Custom.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/Presets/Image/GraphicsMagick.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/Presets/Image/ImageMagick6.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/Presets/Mail.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/Presets/Mail/Custom.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/Presets/Mail/Sendmail.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/Presets/Mail/Smtp.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Settings/SystemMaintainer.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Upgrade/CoreUpdate.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Upgrade/ExtensionCompatTester.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Upgrade/ExtensionScanner.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Upgrade/TcaExtTablesCheck.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Upgrade/TcaMigrationsCheck.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Upgrade/UpgradeDocs.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Upgrade/UpgradeDocs/PanelItem.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Partials/Upgrade/UpgradeWizards.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Templates/Action/Common/FirstInstall.html [deleted file]
typo3/sysext/install/Resources/Private/Templates/Action/Common/InstallToolDisabled.html [deleted file]
typo3/sysext/install/Resources/Private/Templates/Action/Common/InstallToolPasswordNotSet.html [deleted file]
typo3/sysext/install/Resources/Private/Templates/Action/Common/Login.html [deleted file]
typo3/sysext/install/Resources/Private/Templates/Action/Step/DatabaseConnect.html [deleted file]
typo3/sysext/install/Resources/Private/Templates/Action/Step/DatabaseData.html [deleted file]
typo3/sysext/install/Resources/Private/Templates/Action/Step/DatabaseSelect.html [deleted file]
typo3/sysext/install/Resources/Private/Templates/Action/Step/DefaultConfiguration.html [deleted file]
typo3/sysext/install/Resources/Private/Templates/Action/Step/EnvironmentAndFolders.html [deleted file]
typo3/sysext/install/Resources/Private/Templates/Action/Tool/Environment.html [deleted file]
typo3/sysext/install/Resources/Private/Templates/Action/Tool/Maintenance.html [deleted file]
typo3/sysext/install/Resources/Private/Templates/Action/Tool/Settings.html [deleted file]
typo3/sysext/install/Resources/Private/Templates/Action/Tool/Upgrade.html [deleted file]
typo3/sysext/install/Resources/Private/Templates/BackendModule/ShowEnableInstallToolButton.html [deleted file]
typo3/sysext/install/Resources/Private/Templates/Environment/Cards.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Templates/Installer/Init.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Templates/Installer/MainLayout.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Templates/Installer/ShowDatabaseConnect.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Templates/Installer/ShowDatabaseData.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Templates/Installer/ShowDatabaseSelect.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Templates/Installer/ShowDefaultConfiguration.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Templates/Installer/ShowEnvironmentAndFolders.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Templates/Installer/ShowInstallerNotAvailable.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Templates/Layout/Init.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Templates/Layout/MainLayout.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Templates/Login/ShowEnableInstallToolFile.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Templates/Login/ShowLogin.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Templates/Maintenance/Cards.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Templates/Settings/Cards.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Templates/Settings/LocalConfigurationGetContent.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Templates/Settings/PresetsGetContent.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Templates/Upgrade/Cards.html [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Templates/Upgrade/UpgradeDocsGetContent.html [new file with mode: 0644]
typo3/sysext/install/Resources/Public/Images/typo3_logo_orange.svg [new file with mode: 0644]
typo3/sysext/install/Resources/Public/JavaScript/Install.js
typo3/sysext/install/Resources/Public/JavaScript/Installer.js [new file with mode: 0644]
typo3/sysext/install/Resources/Public/JavaScript/Modules/Cache.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/CardLayout.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/ChangeInstallToolPassword.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/CheckForBrokenExtensions.js [deleted file]
typo3/sysext/install/Resources/Public/JavaScript/Modules/ClearTables.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/ClearTypo3tempFiles.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/CoreUpdate.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/CreateAdmin.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/DatabaseAnalyzer.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/DumpAutoload.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/EnvironmentCheck.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/ExtensionCompatTester.js [new file with mode: 0644]
typo3/sysext/install/Resources/Public/JavaScript/Modules/ExtensionScanner.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/FolderStructure.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/ImageProcessing.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/LocalConfiguration.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/MailTest.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/ModuleMenu.js [deleted file]
typo3/sysext/install/Resources/Public/JavaScript/Modules/PasswordStrength.js [new file with mode: 0644]
typo3/sysext/install/Resources/Public/JavaScript/Modules/Presets.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/ResetBackendUserUc.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/Router.js [new file with mode: 0644]
typo3/sysext/install/Resources/Public/JavaScript/Modules/SystemMaintainer.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/TcaExtTablesCheck.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/TcaMigrationsCheck.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/UpgradeDocs.js
typo3/sysext/install/Resources/Public/JavaScript/Modules/UpgradeWizards.js
typo3/sysext/install/Tests/Unit/Controller/Action/Ajax/ExtensionCompatibilityTesterTest.php [deleted file]
typo3/sysext/install/Tests/Unit/Controller/Action/Ajax/Fixtures/demo1/ext_localconf.php [deleted file]
typo3/sysext/install/Tests/Unit/Controller/Action/Ajax/Fixtures/demo1/ext_tables.php [deleted file]
typo3/sysext/install/Tests/Unit/Service/EnableFileServiceTest.php
typo3/sysext/install/Tests/Unit/Service/SilentConfigurationUpgradeServiceTest.php
typo3/sysext/install/Tests/Unit/View/JsonViewTest.php [deleted file]

index e25c010..05e60cd 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Core\Configuration;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Crypto\Random;
 use TYPO3\CMS\Core\Service\OpcodeCacheService;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -399,6 +400,9 @@ class ConfigurationManager
                 $additionalFactoryConfigurationArray
             );
         }
+        $randomKey = GeneralUtility::makeInstance(Random::class)->generateRandomHexString(96);
+        $localConfigurationArray['SYS']['encryptionKey'] = $randomKey;
+
         $this->writeLocalConfiguration($localConfigurationArray);
     }
 
index 7842692..818ff56 100644 (file)
@@ -303,8 +303,6 @@ return [
             'record' => \TYPO3\CMS\Core\LinkHandling\RecordLinkHandler::class,
         ],
         'livesearch' => [],  // Array: keywords used for commands to search for specific tables
-        'isInitialInstallationInProgress' => false,
-        'isInitialDatabaseImportDone' => true,
         'formEngine' => [
             'nodeRegistry' => [], // Array: Registry to add or overwrite FormEngine nodes. Main key is a timestamp of the date when an entry is added, sub keys type, priority and class are required. Class must implement TYPO3\CMS\Backend\Form\NodeInterface.
             'nodeResolver' => [], // Array: Additional node resolver. Main key is a timestamp of the date when an entry is added, sub keys type, priority and class are required. Class must implement TYPO3\CMS\Backend\Form\NodeResolverInterface.
index bfbda91..2c8eacc 100644 (file)
@@ -215,12 +215,6 @@ SYS:
         generateApacheHtaccess:
             type: bool
             description: 'TYPO3 can create <em>.htaccess</em> files which are used by Apache Webserver. They are useful for access protection or performance improvements. Currently <em>.htaccess</em> files in the following directories are created, if they do not exist: <ul><li>typo3temp/compressor/</li></ul>You want to disable this feature, if you are not running Apache or want to use own rulesets.'
-        isInitialInstallationInProgress:
-            type: bool
-            description: 'If TRUE, the installation is ''in progress''. This value is handled within the install tool step installer internally.'
-        isInitialDatabaseImportDone:
-            type: bool
-            description: 'If TRUE, the database import is finished. This value is handled within the install tool step installer internally.'
         systemMaintainers:
             type: array
             description: 'A list of backend user IDs allowed to access the Install Tool'
index 9a47ae0..034a630 100644 (file)
@@ -45,8 +45,6 @@ return [
         'jpg_quality' => '80',
     ],
     'SYS' => [
-        'isInitialInstallationInProgress' => true,
-        'isInitialDatabaseImportDone' => false,
         'sitename' => 'New TYPO3 site',
     ],
 ];
index 19e078a..0567b58 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 namespace TYPO3\CMS\Install\Controller;
 
 /*
@@ -14,139 +15,52 @@ namespace TYPO3\CMS\Install\Controller;
  * The TYPO3 project - inspiring people to share!
  */
 
-use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
-use TYPO3\CMS\Core\Http\RedirectResponse;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Controller\Action\Common\LoginForm;
+use TYPO3\CMS\Fluid\View\StandaloneView;
 
 /**
- * Controller abstract for shared parts of Tool, Step and Ajax controller
+ * Controller abstract for shared parts of the install tool
  */
 class AbstractController
 {
     /**
-     * @var array List of valid action names that need authentication
-     */
-    protected $authenticationActions = [];
-
-    /**
-     * Show login form
+     * Helper method to initialize a standalone view instance.
      *
      * @param ServerRequestInterface $request
-     * @param FlashMessage $message Optional status message
-     * @return ResponseInterface
-     */
-    protected function loginForm(ServerRequestInterface $request, FlashMessage $message = null): ResponseInterface
-    {
-        /** @var LoginForm $action */
-        $action = GeneralUtility::makeInstance(LoginForm::class);
-        $action->setController('common');
-        $action->setAction('login');
-        $action->setContext($request->getAttribute('context'));
-        $action->setToken($this->generateTokenForAction('login'));
-        $action->setPostValues($request->getParsedBody()['install'] ?? []);
-        if ($message) {
-            $action->setMessages([$message]);
-        }
-        return $action->handle();
-    }
-
-    /**
-     * Generate token for specific action
-     *
-     * @param string $action Action name
-     * @return string Form protection token
-     * @throws Exception
+     * @param string $templatePath
+     * @return StandaloneView
+     * @internal param string $template
      */
-    protected function generateTokenForAction($action = null)
+    protected function initializeStandaloneView(ServerRequestInterface $request, string $templatePath): StandaloneView
     {
-        if ($action === '') {
-            throw new Exception(
-                'Token must have a valid action name',
-                1369326592
-            );
-        }
-        /** @var $formProtection \TYPO3\CMS\Core\FormProtection\InstallToolFormProtection */
-        $formProtection = \TYPO3\CMS\Core\FormProtection\FormProtectionFactory::get(
-            \TYPO3\CMS\Core\FormProtection\InstallToolFormProtection::class
-        );
-        return $formProtection->generateToken('installTool', $action);
+        $viewRootPath = GeneralUtility::getFileAbsFileName('EXT:install/Resources/Private/');
+        $view = GeneralUtility::makeInstance(StandaloneView::class);
+        $view->getRequest()->setControllerExtensionName('Install');
+        $view->setTemplatePathAndFilename($viewRootPath . 'Templates/' . $templatePath);
+        $view->setLayoutRootPaths([$viewRootPath . 'Layouts/']);
+        $view->setPartialRootPaths([$viewRootPath . 'Partials/']);
+        $view->assignMultiple([
+            'controller' => $request->getQueryParams()['install']['controller'] ?? 'maintenance',
+            'context' => $request->getQueryParams()['install']['context'] ?? '',
+        ]);
+        return $view;
     }
 
     /**
-     * Check given action name is one of the allowed actions.
+     * Some actions like the database analyzer and the upgrade wizards need additional
+     * bootstrap actions performed.
      *
-     * @param string $action Given action to validate
-     * @throws Exception
+     * Those actions can potentially fatal if some old extension is loaded that triggers
+     * a fatal in ext_localconf or ext_tables code! Use only if really needed.
      */
-    protected function validateAuthenticationAction($action)
+    protected function loadExtLocalconfDatabaseAndExtTables()
     {
-        if (!in_array($action, $this->authenticationActions)) {
-            throw new Exception(
-                $action . ' is not a valid authentication action',
-                1369345838
-            );
-        }
-    }
-
-    /**
-     * Retrieve parameter from GET or POST and sanitize
-     *
-     * @throws Exception
-     * @param string $action requested action
-     * @return string Empty string if no action is given or sanitized action string
-     */
-    protected function sanitizeAction($action = '')
-    {
-        if ($action !== ''
-            && $action !== 'login'
-            && $action !== 'loginForm'
-            && $action !== 'logout'
-            && !in_array($action, $this->authenticationActions)
-        ) {
-            throw new Exception(
-                'Invalid action ' . $action,
-                1369325619
-            );
-        }
-        return $action;
-    }
-
-    /**
-     * HTTP redirect to self, preserving allowed GET variables.
-     *
-     * @param ServerRequestInterface $request
-     * @param string $action Set specific action for next request, used in step controller to specify next step
-     * @throws Exception\RedirectLoopException
-     * @return ResponseInterface
-     */
-    public function redirectToSelfAction(ServerRequestInterface $request, string $action = ''): ResponseInterface
-    {
-        $redirectCount = $request->getQueryParams()['install']['redirectCount'] ?? $request->getParsedBody()['install']['redirectCount'] ?? -1;
-        // Current redirect count
-        $redirectCount = (int)($redirectCount)+1;
-        if ($redirectCount >= 15) {
-            // Abort a redirect loop by throwing an exception. Calling this method
-            // some times in a row is ok, but break a loop if this happens too often.
-            throw new Exception\RedirectLoopException(
-                'Redirect loop aborted. If this message is shown again after a reload,' .
-                    ' your setup is so weird that the install tool is unable to handle it.' .
-                    ' Please make sure to remove the "install[redirectCount]" parameter from your request or' .
-                    ' restart the install tool from the backend navigation.',
-                1380581244
-            );
-        }
-        $parameters = [
-            'install[redirectCount]=' . $redirectCount
-        ];
-        // Add action if specified
-        if ($action !== '') {
-            $parameters[] = 'install[action]=' . $action;
-        }
-
-        $redirectLocation = GeneralUtility::getIndpEnv('TYPO3_REQUEST_SCRIPT') . '?' . implode('&', $parameters);
-        return new RedirectResponse($redirectLocation, 303);
+        \TYPO3\CMS\Core\Core\Bootstrap::getInstance()
+            ->ensureClassLoadingInformationExists()
+            ->loadTypo3LoadedExtAndExtLocalconf(false)
+            ->unsetReservedGlobalVariables()
+            ->loadBaseTca(false)
+            ->loadExtTables(false);
     }
 }
diff --git a/typo3/sysext/install/Classes/Controller/Action/AbstractAction.php b/typo3/sysext/install/Classes/Controller/Action/AbstractAction.php
deleted file mode 100644 (file)
index c278b24..0000000
+++ /dev/null
@@ -1,205 +0,0 @@
-<?php
-namespace TYPO3\CMS\Install\Controller\Action;
-
-/*
- * 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!
- */
-
-use Psr\Http\Message\ResponseInterface;
-use TYPO3\CMS\Core\Http\HtmlResponse;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Fluid\View\StandaloneView;
-
-/**
- * General purpose controller action helper methods and bootstrap
- */
-abstract class AbstractAction implements ActionInterface
-{
-    /**
-     * @var StandaloneView
-     */
-    protected $view = null;
-
-    /**
-     * @var string Name of controller. One of the strings 'step', 'tool' or 'common'
-     */
-    protected $controller = '';
-
-    /**
-     * @var string Name of target action, set by controller
-     */
-    protected $action = '';
-
-    /**
-     * @var string Form token for CSRF protection
-     */
-    protected $token = '';
-
-    /**
-     * @var array Values in $_POST['install']
-     */
-    protected $postValues = [];
-
-    /**
-     * @var array<\TYPO3\CMS\Install\Status\StatusInterface> Optional status message from controller
-     */
-    protected $messages = [];
-
-    /**
-     * @var string
-     */
-    protected $context = self::CONTEXT_STANDALONE;
-
-    /**
-     * Handles the action
-     *
-     * @return ResponseInterface
-     */
-    public function handle(): ResponseInterface
-    {
-        $this->initializeHandle();
-        return new HtmlResponse($this->executeAction(), 200, [
-            'Cache-Control' => 'no-cache, must-revalidate',
-            'Pragma' => 'no-cache'
-        ]);
-    }
-
-    /**
-     * Initialize the handle action, sets up fluid stuff and assigns default variables.
-     */
-    protected function initializeHandle()
-    {
-        $viewRootPath = GeneralUtility::getFileAbsFileName('EXT:install/Resources/Private/');
-        $controllerActionDirectoryName = ucfirst($this->controller);
-        $mainTemplate = ucfirst($this->action);
-        $this->view = GeneralUtility::makeInstance(StandaloneView::class);
-        $this->view->getRequest()->setControllerExtensionName('Install');
-        $this->view->setTemplatePathAndFilename($viewRootPath . 'Templates/Action/' . $controllerActionDirectoryName . '/' . $mainTemplate . '.html');
-        $this->view->setLayoutRootPaths([$viewRootPath . 'Layouts/']);
-        $this->view->setPartialRootPaths([$viewRootPath . 'Partials/']);
-        $this->view
-            // time is used in js and css as parameter to force loading of resources
-            ->assign('time', time())
-            ->assign('action', $this->action)
-            ->assign('controller', $this->controller)
-            ->assign('token', $this->token)
-            ->assign('context', $this->context)
-            ->assign('backendContext', $this->context === self::CONTEXT_BACKEND)
-            ->assign('messages', $this->messages)
-            ->assign('typo3Version', TYPO3_version)
-            ->assign('siteName', $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']);
-    }
-
-    /**
-     * Executes the action
-     *
-     * @return string|array Rendered content
-     */
-    abstract protected function executeAction();
-
-    /**
-     * Set form protection token
-     *
-     * @param string $token Form protection token
-     */
-    public function setToken($token)
-    {
-        $this->token = $token;
-    }
-
-    /**
-     * Set action group. Either string 'step', 'tool' or 'common'
-     *
-     * @param string $controller Controller name
-     */
-    public function setController($controller)
-    {
-        $this->controller = $controller;
-    }
-
-    /**
-     * Set action name. This is usually similar to the class name,
-     * only for loginForm, the action is login
-     *
-     * @param string $action Name of target action for forms
-     */
-    public function setAction($action)
-    {
-        $this->action = $action;
-    }
-
-    /**
-     * Set POST form values of install tool
-     *
-     * @param array $postValues
-     */
-    public function setPostValues(array $postValues)
-    {
-        $this->postValues = $postValues;
-    }
-
-    /**
-     * Status messages from controller
-     *
-     * @param array<\TYPO3\CMS\Install\Status\StatusInterface> $messages
-     */
-    public function setMessages(array $messages = [])
-    {
-        $this->messages = $messages;
-    }
-
-    /**
-     * Context determines if the install tool is called within backend or standalone
-     *
-     * @param $context string One of the `CONTEXT_*` constants.
-     */
-    public function setContext($context)
-    {
-        switch ($context) {
-            case self::CONTEXT_STANDALONE:
-            case self::CONTEXT_BACKEND:
-                $this->context = $context;
-                break;
-            default:
-                $this->context = self::CONTEXT_STANDALONE;
-        }
-    }
-
-    /**
-     * Some actions like the database analyzer and the upgrade wizards need additional
-     * bootstrap actions performed.
-     *
-     * Those actions can potentially fatal if some old extension is loaded that triggers
-     * a fatal in ext_localconf or ext_tables code! Use only if really needed.
-     */
-    protected function loadExtLocalconfDatabaseAndExtTables()
-    {
-        \TYPO3\CMS\Core\Core\Bootstrap::getInstance()
-            ->ensureClassLoadingInformationExists()
-            ->loadTypo3LoadedExtAndExtLocalconf(false)
-            ->unsetReservedGlobalVariables()
-            ->loadBaseTca(false)
-            ->loadExtTables(false);
-    }
-
-    /**
-     * This function returns a salted hashed key.
-     *
-     * @param string $password
-     * @return string
-     */
-    protected function getHashedPassword($password)
-    {
-        $saltFactory = \TYPO3\CMS\Saltedpasswords\Salt\SaltFactory::getSaltingInstance(null, 'BE');
-        return $saltFactory->getHashedPassword($password);
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/ActionInterface.php b/typo3/sysext/install/Classes/Controller/Action/ActionInterface.php
deleted file mode 100644 (file)
index 82b6edd..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<?php
-namespace TYPO3\CMS\Install\Controller\Action;
-
-/*
- * 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!
- */
-
-use Psr\Http\Message\ResponseInterface;
-
-/**
- * General action interface
- */
-interface ActionInterface
-{
-    const CONTEXT_STANDALONE = 'standalone';
-    const CONTEXT_BACKEND = 'backend';
-
-    /**
-     * Handle this action
-     *
-     * @return ResponseInterface Rendered content
-     */
-    public function handle(): ResponseInterface;
-
-    /**
-     * Set form protection token
-     *
-     * @param string $token Form protection token
-     */
-    public function setToken($token);
-
-    /**
-     * Set controller, Either string 'step', 'tool' or 'common'
-     *
-     * @param string $controller Controller name
-     */
-    public function setController($controller);
-
-    /**
-     * Set action name. This is usually similar to the class name,
-     * only for loginForm, the action is login
-     *
-     * @param string $action Name of target action for forms
-     */
-    public function setAction($action);
-
-    /**
-     * Set the context name, must be one of the `CONTEXT_*` constants.
-     *
-     * @param string $context
-     */
-    public function setContext($context);
-
-    /**
-     * Set POST values
-     *
-     * @param array $postValues List of values submitted via POST
-     */
-    public function setPostValues(array $postValues);
-
-    /**
-     * Status messages from controller
-     *
-     * @param array<\TYPO3\CMS\Install\Status\StatusInterface> $messages
-     */
-    public function setMessages(array $messages = []);
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/AbstractAjaxAction.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/AbstractAjaxAction.php
deleted file mode 100644 (file)
index bfe235d..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use Psr\Http\Message\ResponseInterface;
-use TYPO3\CMS\Core\Http\JsonResponse;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Controller\Action\AbstractAction;
-use TYPO3\CMS\Install\View\JsonView;
-
-/**
- * General purpose AJAX controller action helper methods and bootstrap
- */
-abstract class AbstractAjaxAction extends AbstractAction
-{
-    /**
-     * @var JsonView
-     */
-    protected $view;
-
-    /**
-     * @param JsonView $view
-     */
-    public function __construct(JsonView $view = null)
-    {
-        $this->view = $view ?: GeneralUtility::makeInstance(JsonView::class);
-    }
-
-    /**
-     * AbstractAjaxAction still overwrites $this->view with StandaloneView, which is
-     * shut off here.
-     */
-    protected function initializeHandle()
-    {
-        // Deliberately empty
-    }
-
-    /**
-     * Handles the action.
-     *
-     * @return ResponseInterface Rendered content
-     */
-    public function handle(): ResponseInterface
-    {
-        $this->initializeHandle();
-        return new JsonResponse((array)$this->executeAction(), 200, [
-            'Cache-Control' => 'no-cache, must-revalidate',
-            'Pragma' => 'no-cache'
-        ]);
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/ChangeInstallToolPassword.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/ChangeInstallToolPassword.php
deleted file mode 100644 (file)
index 92b7f38..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Configuration\ConfigurationManager;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Change install tool password
- */
-class ChangeInstallToolPassword extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $password = $this->postValues['password'];
-        $passwordCheck = $this->postValues['passwordCheck'];
-        $messageQueue = new FlashMessageQueue('install');
-
-        if ($password !== $passwordCheck) {
-            $messageQueue->enqueue(new FlashMessage(
-                'Install tool password not changed. Given passwords do not match.',
-                '',
-                FlashMessage::ERROR
-            ));
-        } elseif (strlen($password) < 8) {
-            $messageQueue->enqueue(new FlashMessage(
-                'Install tool password not changed. Given password must be at least eight characters long.',
-                '',
-                FlashMessage::ERROR
-            ));
-        } else {
-            $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
-            $configurationManager->setLocalConfigurationValueByPath(
-                'BE/installToolPassword',
-                $this->getHashedPassword($password)
-            );
-            $messageQueue->enqueue(new FlashMessage('Install tool password changed'));
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messageQueue,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/ClearAllCache.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/ClearAllCache.php
deleted file mode 100644 (file)
index 4782443..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Core\Service\OpcodeCacheService;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Service\ClearCacheService;
-
-/**
- * Clear Cache
- *
- * This is an ajax wrapper for clearing all cache.
- */
-class ClearAllCache extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        GeneralUtility::makeInstance(ClearCacheService::class)->clearAll();
-        GeneralUtility::makeInstance(OpcodeCacheService::class)->clearAllActive();
-
-        $messageQueue = (new FlashMessageQueue('install'))->enqueue(
-            new FlashMessage('Successfully cleared all caches and all available opcode caches.')
-        );
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messageQueue,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/ClearTablesClear.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/ClearTablesClear.php
deleted file mode 100644 (file)
index 58ccc39..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Install\Service\ClearTableService;
-
-/**
- * Truncate a given table via ClearTableService
- */
-class ClearTablesClear extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     * @throws \RuntimeException
-     */
-    protected function executeAction(): array
-    {
-        if (empty($this->postValues['table'])) {
-            throw new \RuntimeException(
-                'No table name given',
-                1501944076
-            );
-        }
-
-        (new ClearTableService())->clearSelectedTable($this->postValues['table']);
-        $messageQueue = (new FlashMessageQueue('install'))->enqueue(
-            new FlashMessage('Cleared table')
-        );
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messageQueue
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/ClearTablesStats.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/ClearTablesStats.php
deleted file mode 100644 (file)
index 8724e6b..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Install\Service\ClearTableService;
-
-/**
- * Get "clear table" stats
- */
-class ClearTablesStats extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     * @throws \RuntimeException
-     */
-    protected function executeAction(): array
-    {
-        $this->view->assignMultiple([
-            'success' => true,
-            'stats' => (new ClearTableService())->getTableStatistics(),
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/ClearTypo3tempFiles.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/ClearTypo3tempFiles.php
deleted file mode 100644 (file)
index 4b106a6..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Install\Service\Typo3tempFileService;
-
-/**
- * Clear Processed Files
- *
- * This is an ajax wrapper for clearing processed files.
- */
-class ClearTypo3tempFiles extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $messageQueue = new FlashMessageQueue('install');
-        $typo3tempFileService = new Typo3tempFileService();
-        if ($this->postValues['folder'] === '_processed_') {
-            $failedDeletions = $typo3tempFileService->clearProcessedFiles();
-            if ($failedDeletions) {
-                $messageQueue->enqueue(new FlashMessage(
-                    'Failed to delete ' . $failedDeletions . ' processed files. See TYPO3 log (by default typo3temp/var/logs/typo3_*.log)',
-                    '',
-                    FlashMessage::ERROR
-                ));
-            } else {
-                $messageQueue->enqueue(new FlashMessage('Cleared processed files'));
-            }
-        } else {
-            $typo3tempFileService->clearAssetsFolder($this->postValues['folder']);
-            $messageQueue->enqueue(new FlashMessage('Cleared files in "' . $this->postValues['folder'] . '" folder'));
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messageQueue,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateAbstract.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateAbstract.php
deleted file mode 100644 (file)
index 5974f5f..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Controller\Exception;
-use TYPO3\CMS\Install\Service\CoreUpdateService;
-use TYPO3\CMS\Install\Service\CoreVersionService;
-use TYPO3\CMS\Install\View\JsonView;
-
-/**
- * Abstract core update class contains general core update
- * related methods
- */
-abstract class CoreUpdateAbstract extends AbstractAjaxAction
-{
-    /**
-     * @var CoreUpdateService
-     */
-    protected $coreUpdateService;
-
-    /**
-     * @var CoreVersionService
-     */
-    protected $coreVersionService;
-
-    /**
-     * @param JsonView $view
-     * @param CoreUpdateService $coreUpdateService
-     * @param CoreVersionService $coreVersionService
-     */
-    public function __construct(
-        JsonView $view = null,
-        CoreUpdateService $coreUpdateService = null,
-        CoreVersionService $coreVersionService = null
-    ) {
-        parent::__construct($view);
-        $this->coreUpdateService = $coreUpdateService ?: GeneralUtility::makeInstance(CoreUpdateService::class);
-        $this->coreVersionService = $coreVersionService ?: GeneralUtility::makeInstance(CoreVersionService::class);
-    }
-
-    /**
-     * Initialize the handle action, sets up fluid stuff and assigns default variables.
-     *
-     * @throws Exception
-     */
-    protected function initializeHandle()
-    {
-        if (!$this->coreUpdateService->isCoreUpdateEnabled()) {
-            throw new Exception(
-                'Core Update disabled in this environment',
-                1381609294
-            );
-        }
-        $this->loadExtLocalconfDatabaseAndExtTables();
-    }
-
-    /**
-     * Find out which version upgrade should be handled. This may
-     * be different depending on whether development or regular release.
-     *
-     * @throws Exception
-     * @return string Version to handle, eg. 6.2.2
-     */
-    protected function getVersionToHandle(): string
-    {
-        $getVars = GeneralUtility::_GET('install');
-        if (!isset($getVars['type'])) {
-            throw new Exception(
-                'Type must be set to either "regular" or "development"',
-                1380975303
-            );
-        }
-        $type = $getVars['type'];
-        if ($type === 'development') {
-            $versionToHandle = $this->coreVersionService->getYoungestPatchDevelopmentRelease();
-        } else {
-            $versionToHandle = $this->coreVersionService->getYoungestPatchRelease();
-        }
-        return $versionToHandle;
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateActivate.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateActivate.php
deleted file mode 100644 (file)
index 76e5eb8..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-/**
- * Activate a downloaded core
- */
-class CoreUpdateActivate extends CoreUpdateAbstract
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $this->view->assignMultiple([
-            'success' => $this->coreUpdateService->activateVersion($this->getVersionToHandle()),
-            'status' => $this->coreUpdateService->getMessages(),
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateCheckPreConditions.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateCheckPreConditions.php
deleted file mode 100644 (file)
index 7cedc7b..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-/**
- * Activate a downloaded core
- */
-class CoreUpdateCheckPreConditions extends CoreUpdateAbstract
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $this->view->assignMultiple([
-            'success' => $this->coreUpdateService->checkPreConditions($this->getVersionToHandle()),
-            'status' => $this->coreUpdateService->getMessages(),
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateDownload.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateDownload.php
deleted file mode 100644 (file)
index bf356d7..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-/**
- * Download latest core version
- */
-class CoreUpdateDownload extends CoreUpdateAbstract
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $this->view->assignMultiple([
-            'success' => $this->coreUpdateService->downloadVersion($this->getVersionToHandle()),
-            'status' => $this->coreUpdateService->getMessages(),
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateIsUpdateAvailable.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateIsUpdateAvailable.php
deleted file mode 100644 (file)
index 77abf6e..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-
-/**
- * Check if a younger version is available
- */
-class CoreUpdateIsUpdateAvailable extends CoreUpdateAbstract
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $messageQueue = new FlashMessageQueue('install');
-        if ($this->coreVersionService->isInstalledVersionAReleasedVersion()) {
-            $isDevelopmentUpdateAvailable = $this->coreVersionService->isYoungerPatchDevelopmentReleaseAvailable();
-            $isUpdateAvailable = $this->coreVersionService->isYoungerPatchReleaseAvailable();
-            $isUpdateSecurityRelevant = $this->coreVersionService->isUpdateSecurityRelevant();
-            if (!$isUpdateAvailable && !$isDevelopmentUpdateAvailable) {
-                $messageQueue->enqueue(new FlashMessage(
-                    '',
-                    'No regular update available',
-                    FlashMessage::NOTICE
-                ));
-            } elseif ($isUpdateAvailable) {
-                $newVersion = $this->coreVersionService->getYoungestPatchRelease();
-                if ($isUpdateSecurityRelevant) {
-                    $messageQueue->enqueue(new FlashMessage(
-                        '',
-                        'Update to security relevant released version ' . $newVersion . ' is available!',
-                        FlashMessage::WARNING
-                    ));
-                    $action = $this->getAction('Update now', 'updateRegular');
-                } else {
-                    $messageQueue->enqueue(new FlashMessage(
-                        '',
-                        'Update to regular released version ' . $newVersion . ' is available!',
-                        FlashMessage::INFO
-                    ));
-                    $action = $this->getAction('Update now', 'updateRegular');
-                }
-            } elseif ($isDevelopmentUpdateAvailable) {
-                $newVersion = $this->coreVersionService->getYoungestPatchDevelopmentRelease();
-                $messageQueue->enqueue(new FlashMessage(
-                    '',
-                    'Update to development release ' . $newVersion . ' is available!',
-                    FlashMessage::INFO
-                ));
-                $action = $this->getAction('Update now', 'updateDevelopment');
-            }
-        } else {
-            $messageQueue->enqueue(new FlashMessage(
-                '',
-                'Current version is a development version and can not be updated',
-                FlashMessage::WARNING
-            ));
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messageQueue,
-        ]);
-        if (isset($action)) {
-            $this->view->assign('action', $action);
-        }
-        return $this->view->render();
-    }
-
-    /**
-     * @param string $title
-     * @param string $action
-     * @return array
-     */
-    protected function getAction($title, $action): array
-    {
-        return [
-            'title' => $title,
-            'action' => $action,
-        ];
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateMove.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateMove.php
deleted file mode 100644 (file)
index 8657ab6..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-/**
- * Move a downloaded core
- */
-class CoreUpdateMove extends CoreUpdateAbstract
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $this->view->assignMultiple([
-            'success' => $this->coreUpdateService->moveVersion($this->getVersionToHandle()),
-            'status' => $this->coreUpdateService->getMessages(),
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateUnpack.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateUnpack.php
deleted file mode 100644 (file)
index b1855a5..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-/**
- * Unpack a downloaded core
- */
-class CoreUpdateUnpack extends CoreUpdateAbstract
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction()
-    {
-        $this->view->assignMultiple([
-            'success' => $this->coreUpdateService->unpackVersion($this->getVersionToHandle()),
-            'status' => $this->coreUpdateService->getMessages(),
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateUpdateVersionMatrix.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateUpdateVersionMatrix.php
deleted file mode 100644 (file)
index 3e95fed..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-/**
- * Update version matrix from get.typo3.org
- */
-class CoreUpdateUpdateVersionMatrix extends CoreUpdateAbstract
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $this->view->assignMultiple([
-            'success' => $this->coreUpdateService->updateVersionMatrix(),
-            'status' => $this->coreUpdateService->getMessages(),
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateVerifyChecksum.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateVerifyChecksum.php
deleted file mode 100644 (file)
index 10e68b4..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-/**
- * Verify checksum of a downloaded core
- */
-class CoreUpdateVerifyChecksum extends CoreUpdateAbstract
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction()
-    {
-        $this->view->assignMultiple([
-            'success' => $this->coreUpdateService->verifyFileChecksum($this->getVersionToHandle()),
-            'status' => $this->coreUpdateService->getMessages(),
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/CreateAdmin.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/CreateAdmin.php
deleted file mode 100644 (file)
index 2cdc92f..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Create an administrator from given username and password
- */
-class CreateAdmin extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     * @throws \RuntimeException
-     */
-    protected function executeAction(): array
-    {
-        $username = preg_replace('/\\s/i', '', $this->postValues['userName']);
-        $password = $this->postValues['userPassword'];
-        $passwordCheck = $this->postValues['userPasswordCheck'];
-        $messages = new FlashMessageQueue('install');
-        if (strlen($username) < 1) {
-            $messages->enqueue(new FlashMessage(
-                'No valid username given.',
-                'Administrator user not created',
-                FlashMessage::ERROR
-            ));
-        } elseif ($password !== $passwordCheck) {
-            $messages->enqueue(new FlashMessage(
-                'Passwords do not match.',
-                'Administrator user not created',
-                FlashMessage::ERROR
-            ));
-        } elseif (strlen($password) < 8) {
-            $messages->enqueue(new FlashMessage(
-                'Password must be at least eight characters long.',
-                'Administrator user not created',
-                FlashMessage::ERROR
-            ));
-        } else {
-            $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
-            $userExists = $connectionPool->getConnectionForTable('be_users')
-                ->count(
-                    'uid',
-                    'be_users',
-                    ['username' => $username]
-                );
-            if ($userExists) {
-                $messages->enqueue(new FlashMessage(
-                    'A user with username "' . $username . '" exists already.',
-                    'Administrator user not created',
-                    FlashMessage::ERROR
-                ));
-            } else {
-                $hashedPassword = $this->getHashedPassword($password);
-                $adminUserFields = [
-                    'username' => $username,
-                    'password' => $hashedPassword,
-                    'admin' => 1,
-                    'tstamp' => $GLOBALS['EXEC_TIME'],
-                    'crdate' => $GLOBALS['EXEC_TIME']
-                ];
-                $connectionPool->getConnectionForTable('be_users')->insert('be_users', $adminUserFields);
-                $messages->enqueue(new FlashMessage(
-                    '',
-                    'Administrator created with username "' . $username . '".'
-                ));
-            }
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messages,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/DatabaseAnalyzerAnalyze.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/DatabaseAnalyzerAnalyze.php
deleted file mode 100644 (file)
index d7e0b6c..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Database\Schema\Exception\StatementException;
-use TYPO3\CMS\Core\Database\Schema\SchemaMigrator;
-use TYPO3\CMS\Core\Database\Schema\SqlReader;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Execute database analyzer "analyze" / "show" status action
- */
-class DatabaseAnalyzerAnalyze extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $this->loadExtLocalconfDatabaseAndExtTables();
-        $messageQueue = new FlashMessageQueue('install');
-
-        $suggestions = [];
-        try {
-            $sqlReader = GeneralUtility::makeInstance(SqlReader::class);
-            $sqlStatements = $sqlReader->getCreateTableStatementArray($sqlReader->getTablesDefinitionString());
-            $schemaMigrationService = GeneralUtility::makeInstance(SchemaMigrator::class);
-            $addCreateChange = $schemaMigrationService->getUpdateSuggestions($sqlStatements);
-
-            // Aggregate the per-connection statements into one flat array
-            $addCreateChange = array_merge_recursive(...array_values($addCreateChange));
-            if (!empty($addCreateChange['create_table'])) {
-                $suggestion = [
-                    'key' => 'addTable',
-                    'label' => 'Add tables',
-                    'enabled' => true,
-                    'children' => [],
-                ];
-                foreach ($addCreateChange['create_table'] as $hash => $statement) {
-                    $suggestion['children'][] = [
-                        'hash' => $hash,
-                        'statement' => $statement,
-                    ];
-                }
-                $suggestions[] = $suggestion;
-            }
-            if (!empty($addCreateChange['add'])) {
-                $suggestion = [
-                    'key' => 'addField',
-                    'label' => 'Add fields to tables',
-                    'enabled' => true,
-                    'children' => [],
-                ];
-                foreach ($addCreateChange['add'] as $hash => $statement) {
-                    $suggestion['children'][] = [
-                        'hash' => $hash,
-                        'statement' => $statement,
-                    ];
-                }
-                $suggestions[] = $suggestion;
-            }
-            if (!empty($addCreateChange['change'])) {
-                $suggestion = [
-                    'key' => 'change',
-                    'label' => 'Change fields',
-                    'enabled' => false,
-                    'children' => [],
-                ];
-                foreach ($addCreateChange['change'] as $hash => $statement) {
-                    $child = [
-                        'hash' => $hash,
-                        'statement' => $statement,
-                    ];
-                    if (isset($addCreateChange['change_currentValue'][$hash])) {
-                        $child['current'] = $addCreateChange['change_currentValue'][$hash];
-                    }
-                    $suggestion['children'][] = $child;
-                }
-                $suggestions[] = $suggestion;
-            }
-
-            // Difference from current to expected
-            $dropRename = $schemaMigrationService->getUpdateSuggestions($sqlStatements, true);
-
-            // Aggregate the per-connection statements into one flat array
-            $dropRename = array_merge_recursive(...array_values($dropRename));
-            if (!empty($dropRename['change_table'])) {
-                $suggestion = [
-                    'key' => 'renameTableToUnused',
-                    'label' => 'Remove tables (rename with prefix)',
-                    'enabled' => false,
-                    'children' => [],
-                ];
-                foreach ($dropRename['change_table'] as $hash => $statement) {
-                    $child = [
-                        'hash' => $hash,
-                        'statement' => $statement,
-                    ];
-                    if (!empty($dropRename['tables_count'][$hash])) {
-                        $child['rowCount'] = $dropRename['tables_count'][$hash];
-                    }
-                    $suggestion['children'][] = $child;
-                }
-                $suggestions[] = $suggestion;
-            }
-            if (!empty($dropRename['change'])) {
-                $suggestion = [
-                    'key' => 'renameTableFieldToUnused',
-                    'label' => 'Remove unused fields (rename with prefix)',
-                    'enabled' => false,
-                    'children' => [],
-                ];
-                foreach ($dropRename['change'] as $hash => $statement) {
-                    $suggestion['children'][] = [
-                        'hash' => $hash,
-                        'statement' => $statement,
-                    ];
-                }
-                $suggestions[] = $suggestion;
-            }
-            if (!empty($dropRename['drop'])) {
-                $suggestion = [
-                    'key' => 'deleteField',
-                    'label' => 'Drop fields (really!)',
-                    'enabled' => false,
-                    'children' => [],
-                ];
-                foreach ($dropRename['drop'] as $hash => $statement) {
-                    $suggestion['children'][] = [
-                        'hash' => $hash,
-                        'statement' => $statement,
-                    ];
-                }
-                $suggestions[] = $suggestion;
-            }
-            if (!empty($dropRename['drop_table'])) {
-                $suggestion = [
-                    'key' => 'deleteTable',
-                    'label' => 'Drop tables (really!)',
-                    'enabled' => false,
-                    'children' => [],
-                ];
-                foreach ($dropRename['drop_table'] as $hash => $statement) {
-                    $child = [
-                        'hash' => $hash,
-                        'statement' => $statement,
-                    ];
-                    if (!empty($dropRename['tables_count'][$hash])) {
-                        $child['rowCount'] = $dropRename['tables_count'][$hash];
-                    }
-                    $suggestion['children'][] = $child;
-                }
-                $suggestions[] = $suggestion;
-            }
-
-            $messageQueue->enqueue(new FlashMessage(
-                '',
-                'Analyzed current database'
-            ));
-        } catch (StatementException $e) {
-            $messageQueue->enqueue(new FlashMessage(
-                '',
-                'Database analysis failed',
-                FlashMessage::ERROR
-            ));
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messageQueue,
-            'suggestions' => $suggestions,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/DatabaseAnalyzerExecute.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/DatabaseAnalyzerExecute.php
deleted file mode 100644 (file)
index 72d73d3..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Database\Schema\SchemaMigrator;
-use TYPO3\CMS\Core\Database\Schema\SqlReader;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Execute database analyzer "execute" action to apply
- * a set of DB changes.
- */
-class DatabaseAnalyzerExecute extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $this->loadExtLocalconfDatabaseAndExtTables();
-
-        $messageQueue = new FlashMessageQueue('install');
-        if (empty($this->postValues['hashes'])) {
-            $messageQueue->enqueue(new FlashMessage(
-                '',
-                'No database changes selected',
-                FlashMessage::WARNING
-            ));
-        } else {
-            $sqlReader = GeneralUtility::makeInstance(SqlReader::class);
-            $sqlStatements = $sqlReader->getCreateTableStatementArray($sqlReader->getTablesDefinitionString());
-            $schemaMigrationService = GeneralUtility::makeInstance(SchemaMigrator::class);
-            $statementHashesToPerform = array_flip($this->postValues['hashes']);
-            $results = $schemaMigrationService->migrate($sqlStatements, $statementHashesToPerform);
-            // Create error flash messages if any
-            foreach ($results as $errorMessage) {
-                $messageQueue->enqueue(new FlashMessage(
-                    'Error: ' . $errorMessage,
-                    'Database update failed',
-                    FlashMessage::ERROR
-                ));
-            }
-            $messageQueue->enqueue(new FlashMessage(
-                '',
-                'Executed database updates'
-            ));
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messageQueue,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/DumpAutoload.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/DumpAutoload.php
deleted file mode 100644 (file)
index c4813c1..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Core\Bootstrap;
-use TYPO3\CMS\Core\Core\ClassLoadingInformation;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-
-/**
- * Ajax wrapper for dumping autoload.
- */
-class DumpAutoload extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $messageQueue = new FlashMessageQueue('install');
-        if (Bootstrap::usesComposerClassLoading()) {
-            $messageQueue->enqueue(new FlashMessage(
-                '',
-                'Skipped generating additional class loading information in composer mode.',
-                FlashMessage::NOTICE
-            ));
-        } else {
-            ClassLoadingInformation::dumpClassLoadingInformation();
-            $messageQueue->enqueue(new FlashMessage(
-                '',
-                'Successfully dumped class loading information for extensions.'
-            ));
-        }
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messageQueue
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/EnvironmentCheckGetStatus.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/EnvironmentCheckGetStatus.php
deleted file mode 100644 (file)
index bb3c5fe..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Install\SystemEnvironment\Check;
-use TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck;
-use TYPO3\CMS\Install\SystemEnvironment\SetupCheck;
-
-/**
- * Get environment status
- */
-class EnvironmentCheckGetStatus extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $messageQueue = new FlashMessageQueue('install');
-        $checkMessages = (new Check())->getStatus();
-        foreach ($checkMessages as $message) {
-            $messageQueue->enqueue($message);
-        }
-        $setupMessages = (new SetupCheck())->getStatus();
-        foreach ($setupMessages as $message) {
-            $messageQueue->enqueue($message);
-        }
-        $databaseMessages = (new DatabaseCheck())->getStatus();
-        foreach ($databaseMessages as $message) {
-            $messageQueue->enqueue($message);
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => [
-                'error' => $messageQueue->getAllMessages(FlashMessage::ERROR),
-                'warning' => $messageQueue->getAllMessages(FlashMessage::WARNING),
-                'ok' => $messageQueue->getAllMessages(FlashMessage::OK),
-                'information' => $messageQueue->getAllMessages(FlashMessage::INFO),
-                'notice' => $messageQueue->getAllMessages(FlashMessage::NOTICE),
-            ],
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/ExtensionCompatibilityTester.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/ExtensionCompatibilityTester.php
deleted file mode 100644 (file)
index ef51742..0000000
+++ /dev/null
@@ -1,273 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\View\JsonView;
-
-/**
- * Load Extensions
- *
- * The idea is to load ext_localconf and ext_tables of extensions one-by-one
- * until one of those files throws a fatal. The javascript will then recognise
- * the fatal and initiates another run that will leave out the fataling extension
- * to check the rest.
- */
-class ExtensionCompatibilityTester extends AbstractAjaxAction
-{
-    /**
-     * Store extension loading protocol
-     *
-     * @var string
-     */
-    protected $protocolFile = '';
-
-    /**
-     * Store errors that occurred during checks.
-     *
-     * @var string
-     */
-    protected $errorProtocolFile = '';
-
-    /**
-     * Define whether to log errors to file or not.
-     *
-     * @var bool
-     */
-    protected $logError = false;
-
-    /**
-     * Construct this class
-     * set default protocol file location
-     *
-     * @param JsonView $view
-     */
-    public function __construct(JsonView $view = null)
-    {
-        parent::__construct($view);
-        $this->protocolFile = PATH_site . 'typo3temp/assets/ExtensionCompatibilityTester.txt';
-        $this->errorProtocolFile = PATH_site . 'typo3temp/assets/ExtensionCompatibilityTesterErrors.json';
-    }
-
-    /**
-     * Main entry point for checking extensions to load,
-     * setting up the checks (deleting protocol), and returning
-     * OK if process run through without errors
-     *
-     * @return array
-     */
-    protected function executeAction(): array
-    {
-        register_shutdown_function([$this, 'logError']);
-        $getVars = GeneralUtility::_GET('install');
-        if (isset($getVars['extensionCompatibilityTester']) && isset($getVars['extensionCompatibilityTester']['forceCheck']) && ($getVars['extensionCompatibilityTester']['forceCheck'] == 1)) {
-            $this->deleteProtocolFile();
-        }
-        $this->tryToLoadExtLocalconfAndExtTablesOfExtensions($this->getExtensionsToLoad());
-        return ['success' => true];
-    }
-
-    /**
-     * Delete the protocol files if they exist
-     */
-    protected function deleteProtocolFile()
-    {
-        if (file_exists($this->protocolFile)) {
-            unlink($this->protocolFile);
-        }
-        if (file_exists($this->errorProtocolFile)) {
-            unlink($this->errorProtocolFile);
-        }
-    }
-
-    /**
-     * Get extensions that should be loaded.
-     * Fills the TYPO3_LOADED_EXT array.
-     * Only considers local extensions
-     *
-     * @return array
-     */
-    protected function getExtensionsToLoad(): array
-    {
-        $extensionsToLoad = [];
-        $extensionsToExclude = $this->getExtensionsToExclude();
-        foreach ($GLOBALS['TYPO3_LOADED_EXT'] as $key => $extension) {
-            if (!in_array($key, $extensionsToExclude)) {
-                $extensionsToLoad[$key] = $extension;
-            }
-        }
-        return $extensionsToLoad;
-    }
-
-    /**
-     * Gets extensions already known to be incompatible
-     * This class is recursively called, and this method is needed
-     * to not run into the same errors twice.
-     *
-     * @return array
-     */
-    protected function getExtensionsToExclude(): array
-    {
-        if (is_file($this->protocolFile)) {
-            $exclude = (string)file_get_contents($this->protocolFile);
-            return GeneralUtility::trimExplode(',', $exclude);
-        }
-        return [];
-    }
-
-    /**
-     * Tries to load the ext_localconf and ext_tables files of all non-core extensions
-     * Writes current extension name to file and deletes it again when inclusion was
-     * successful.
-     *
-     * @param array $extensions
-     */
-    protected function tryToLoadExtLocalconfAndExtTablesOfExtensions(array $extensions)
-    {
-        foreach ($extensions as $extensionKey => $extension) {
-            $this->writeCurrentExtensionToFile($extensionKey);
-            $this->loadExtLocalconfForExtension($extensionKey, $extension);
-            $this->removeCurrentExtensionFromFile($extensionKey);
-        }
-        ExtensionManagementUtility::loadBaseTca(false);
-        foreach ($extensions as $extensionKey => $extension) {
-            $this->writeCurrentExtensionToFile($extensionKey);
-            $this->loadExtTablesForExtension($extensionKey, $extension);
-            $this->removeCurrentExtensionFromFile($extensionKey);
-        }
-    }
-
-    /**
-     * Loads ext_tables.php for a single extension. Method is a modified copy of
-     * the original bootstrap method.
-     *
-     * @param string $extensionKey
-     * @param array $extension
-     */
-    protected function loadExtTablesForExtension($extensionKey, array $extension)
-    {
-        // In general it is recommended to not rely on it to be globally defined in that
-        // scope, but we can not prohibit this without breaking backwards compatibility
-        global $T3_SERVICES, $T3_VAR, $TYPO3_CONF_VARS;
-        global $TBE_MODULES, $TBE_MODULES_EXT, $TCA;
-        global $PAGES_TYPES, $TBE_STYLES;
-        global $_EXTKEY;
-        // Load each ext_tables.php file of loaded extensions
-        $_EXTKEY = $extensionKey;
-        if (isset($extension['ext_tables.php']) && $extension['ext_tables.php']) {
-            // $_EXTKEY and $_EXTCONF are available in ext_tables.php
-            // and are explicitly set in cached file as well
-            $_EXTCONF = $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY];
-            require $extension['ext_tables.php'];
-        }
-    }
-
-    /**
-     * Loads ext_localconf.php for a single extension. Method is a modified copy of
-     * the original bootstrap method.
-     *
-     * @param string $extensionKey
-     * @param array $extension
-     */
-    protected function loadExtLocalconfForExtension($extensionKey, array $extension)
-    {
-        // This is the main array meant to be manipulated in the ext_localconf.php files
-        // In general it is recommended to not rely on it to be globally defined in that
-        // scope but to use $GLOBALS['TYPO3_CONF_VARS'] instead.
-        // Nevertheless we define it here as global for backwards compatibility.
-        global $TYPO3_CONF_VARS;
-        $_EXTKEY = $extensionKey;
-        if (isset($extension['ext_localconf.php']) && $extension['ext_localconf.php']) {
-            // $_EXTKEY and $_EXTCONF are available in ext_localconf.php
-            // and are explicitly set in cached file as well
-            $_EXTCONF = $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY];
-            require $extension['ext_localconf.php'];
-        }
-    }
-
-    /**
-     * Writes $extensionKey to the protocol file by adding it comma separated at
-     * the end of the file.
-     *
-     * @param string $extensionKey
-     */
-    protected function writeCurrentExtensionToFile($extensionKey)
-    {
-        $incompatibleExtensions = $this->getExtensionsToExclude();
-        $incompatibleExtensions = array_filter($incompatibleExtensions);
-        $incompatibleExtensions = array_merge($incompatibleExtensions, [$extensionKey]);
-        GeneralUtility::writeFileToTypo3tempDir($this->protocolFile, implode(', ', $incompatibleExtensions));
-        $this->logError = true;
-    }
-
-    /**
-     * Removes $extensionKey from protocol file.
-     *
-     * @param string $extensionKey
-     */
-    protected function removeCurrentExtensionFromFile($extensionKey)
-    {
-        $extensionsInFile = $this->getExtensionsToExclude();
-        $extensionsInFile = array_filter($extensionsInFile);
-        $extensionsByKey = array_flip($extensionsInFile);
-        unset($extensionsByKey[$extensionKey]);
-        $extensionsForFile = array_flip($extensionsByKey);
-        GeneralUtility::writeFile($this->protocolFile, implode(', ', $extensionsForFile));
-        $this->logError = false;
-    }
-
-    /**
-     * Log last occurred error for logging.
-     */
-    public function logError()
-    {
-        $errors = [];
-
-        // Logging is disabled.
-        if (!$this->logError) {
-            // Create an empty file to avoid 404 errors
-            if (!is_file($this->errorProtocolFile)) {
-                GeneralUtility::writeFileToTypo3tempDir($this->errorProtocolFile, json_encode($errors));
-            }
-            return;
-        }
-
-        // Fetch existing errors, add last one and write to file again.
-        $lastError = error_get_last();
-
-        if (file_exists($this->errorProtocolFile)) {
-            $errors = json_decode(file_get_contents($this->errorProtocolFile));
-        }
-        switch ($lastError['type']) {
-            case E_ERROR:
-                $lastError['type'] = 'E_ERROR';
-                break;
-            case E_WARNING:
-                $lastError['type'] = 'E_WARNING';
-                break;
-            case E_PARSE:
-                $lastError['type'] = 'E_PARSE';
-                break;
-            case E_NOTICE:
-                $lastError['type'] = 'E_NOTICE';
-                break;
-        }
-        $errors[] = $lastError;
-
-        GeneralUtility::writeFileToTypo3tempDir($this->errorProtocolFile, json_encode($errors));
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/ExtensionScannerFiles.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/ExtensionScannerFiles.php
deleted file mode 100644 (file)
index e460b02..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use Symfony\Component\Finder\Finder;
-use Symfony\Component\Finder\SplFileInfo;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Return a list of files of an extension
- */
-class ExtensionScannerFiles extends AbstractAjaxAction
-{
-    /**
-     * Get list of files of an extension for extension scanner
-     *
-     * @return array
-     * @throws \RuntimeException
-     */
-    protected function executeAction(): array
-    {
-        // Get and validate path
-        $extension = $this->postValues['extension'];
-        $extensionBasePath = PATH_site . 'typo3conf/ext/' . $extension;
-        if (empty($extension) || !GeneralUtility::isAllowedAbsPath($extensionBasePath)) {
-            throw new \RuntimeException(
-                'Path to extension ' . $extension . ' not allowed.',
-                1499777261
-            );
-        }
-        if (!is_dir($extensionBasePath)) {
-            throw new \RuntimeException(
-                'Extension path ' . $extensionBasePath . ' does not exist or is no directory.',
-                1499777330
-            );
-        }
-
-        $finder = new Finder();
-        $files = $finder->files()->in($extensionBasePath)->name('*.php')->sortByName();
-        // A list of file names relative to extension directory
-        $relativeFileNames = [];
-        foreach ($files as $file) {
-            /** @var $file SplFileInfo */
-            $relativeFileNames[] = GeneralUtility::fixWindowsFilePath($file->getRelativePathname());
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'files' => $relativeFileNames,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/ExtensionScannerMarkFullyScannedRestFiles.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/ExtensionScannerMarkFullyScannedRestFiles.php
deleted file mode 100644 (file)
index be5f413..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use Symfony\Component\Finder\Finder;
-use Symfony\Component\Finder\SplFileInfo;
-use TYPO3\CMS\Core\Registry;
-use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
-use TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile;
-
-/**
- * Ajax controller, part of "extension scanner". Called at the end of "scan all"
- * as last action. Gets a list of RST file hashes that matched, goes through all
- * existing RST files, finds those marked as "FullyScanned" and marks those that
- * did not had any matches as "you are not affected".
- */
-class ExtensionScannerMarkFullyScannedRestFiles extends AbstractAjaxAction
-{
-    /**
-     * Get list of files of an extension for extension scanner
-     *
-     * @return array
-     */
-    protected function executeAction(): array
-    {
-        $foundRestFileHashes = (array)$this->postValues['hashes'];
-
-        // First un-mark files marked as scanned-ok
-        $registry = new Registry();
-        $registry->removeAllByNamespace('extensionScannerNotAffected');
-
-        // Find all .rst files (except those from v8), see if they are tagged with "FullyScanned"
-        // and if their content is not in incoming "hashes" array, mark as "not affected"
-        $documentationFile = new DocumentationFile();
-        $finder = new Finder();
-        $restFilesBasePath = PATH_site . ExtensionManagementUtility::siteRelPath('core') . 'Documentation/Changelog';
-        $restFiles = $finder->files()->in($restFilesBasePath);
-        $fullyScannedRestFilesNotAffected = [];
-        foreach ($restFiles as $restFile) {
-            // Skip files in "8.x" directory
-            /** @var $restFile SplFileInfo */
-            if (substr($restFile->getRelativePath(), 0, 1) === '8') {
-                continue;
-            }
-
-            // Build array of file (hashes) not affected by current scan, if they are tagged as "FullyScanned"
-            $parsedRestFile = array_pop($documentationFile->getListEntry(strtr(realpath($restFile->getPathname()), '\\', '/')));
-            if (!in_array($parsedRestFile['file_hash'], $foundRestFileHashes, true)
-                && in_array('FullyScanned', $parsedRestFile['tags'], true)
-            ) {
-                $fullyScannedRestFilesNotAffected[] = $parsedRestFile['file_hash'];
-            }
-        }
-
-        foreach ($fullyScannedRestFilesNotAffected as $fileHash) {
-            $registry->set('extensionScannerNotAffected', $fileHash, $fileHash);
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'markedAsNotAffected' => count($fullyScannedRestFilesNotAffected),
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/ExtensionScannerScanFile.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/ExtensionScannerScanFile.php
deleted file mode 100644 (file)
index ecc904d..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use PhpParser\NodeTraverser;
-use PhpParser\NodeVisitor\NameResolver;
-use PhpParser\ParserFactory;
-use Symfony\Component\Finder\Finder;
-use Symfony\Component\Finder\SplFileInfo;
-use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\ExtensionScanner\Php\CodeStatistics;
-use TYPO3\CMS\Install\ExtensionScanner\Php\GeneratorClassesResolver;
-use TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\ArrayDimensionMatcher;
-use TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\ArrayGlobalMatcher;
-use TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\ClassConstantMatcher;
-use TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\ClassNameMatcher;
-use TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\ConstantMatcher;
-use TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\FunctionCallMatcher;
-use TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\InterfaceMethodChangedMatcher;
-use TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodArgumentDroppedMatcher;
-use TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodArgumentDroppedStaticMatcher;
-use TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodArgumentRequiredMatcher;
-use TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodArgumentUnusedMatcher;
-use TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodCallMatcher;
-use TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\MethodCallStaticMatcher;
-use TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\PropertyProtectedMatcher;
-use TYPO3\CMS\Install\ExtensionScanner\Php\Matcher\PropertyPublicMatcher;
-use TYPO3\CMS\Install\ExtensionScanner\Php\MatcherFactory;
-use TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile;
-
-/**
- * Scan a single extension file for breaking / deprecated core code usages
- */
-class ExtensionScannerScanFile extends AbstractAjaxAction
-{
-    /**
-     * @var array Node visitors that implement CodeScannerInterface
-     */
-    protected $matchers = [
-        [
-            'class' => ArrayDimensionMatcher::class,
-            'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/ArrayDimensionMatcher.php',
-        ],
-        [
-            'class' => ArrayGlobalMatcher::class,
-            'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/ArrayGlobalMatcher.php',
-        ],
-        [
-            'class' => ClassConstantMatcher::class,
-            'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/ClassConstantMatcher.php',
-        ],
-        [
-            'class' => ClassNameMatcher::class,
-            'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php',
-        ],
-        [
-            'class' => ConstantMatcher::class,
-            'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/ConstantMatcher.php',
-        ],
-        [
-            'class' => FunctionCallMatcher::class,
-            'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/FunctionCallMatcher.php',
-        ],
-        [
-            'class' => InterfaceMethodChangedMatcher::class,
-            'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/InterfaceMethodChangedMatcher.php',
-        ],
-        [
-            'class' => MethodArgumentDroppedMatcher::class,
-            'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodArgumentDroppedMatcher.php',
-        ],
-        [
-            'class' => MethodArgumentDroppedStaticMatcher::class,
-            'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodArgumentDroppedStaticMatcher.php',
-        ],
-        [
-            'class' => MethodArgumentRequiredMatcher::class,
-            'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodArgumentRequiredMatcher.php',
-        ],
-        [
-            'class' => MethodArgumentUnusedMatcher::class,
-            'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodArgumentUnusedMatcher.php',
-        ],
-        [
-            'class' => MethodCallMatcher::class,
-            'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php',
-        ],
-        [
-            'class' => MethodCallStaticMatcher::class,
-            'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/MethodCallStaticMatcher.php',
-        ],
-        [
-            'class' => PropertyProtectedMatcher::class,
-            'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/PropertyProtectedMatcher.php',
-        ],
-        [
-            'class' => PropertyPublicMatcher::class,
-            'configurationFile' => 'EXT:install/Configuration/ExtensionScanner/Php/PropertyPublicMatcher.php',
-        ],
-    ];
-
-    /**
-     * Find code violations in a single file
-     *
-     * @return array
-     * @throws \RuntimeException
-     */
-    protected function executeAction(): array
-    {
-        // Get and validate path and file
-        $extension = $this->postValues['extension'];
-        $extensionBasePath = PATH_site . 'typo3conf/ext/' . $extension;
-        if (empty($extension) || !GeneralUtility::isAllowedAbsPath($extensionBasePath)) {
-            throw new \RuntimeException(
-                'Path to extension ' . $extension . ' not allowed.',
-                1499789246
-            );
-        }
-        if (!is_dir($extensionBasePath)) {
-            throw new \RuntimeException(
-                'Extension path ' . $extensionBasePath . ' does not exist or is no directory.',
-                1499789259
-            );
-        }
-        $file = $this->postValues['file'];
-        $absoluteFilePath = $extensionBasePath . '/' . $file;
-        if (empty($file) || !GeneralUtility::isAllowedAbsPath($absoluteFilePath)) {
-            throw new \RuntimeException(
-                'Path to file ' . $file . ' of extension ' . $extension . ' not allowed.',
-                1499789384
-            );
-        }
-        if (!is_file($absoluteFilePath)) {
-            throw new \RuntimeException(
-                'File ' . $file . ' not found or is not a file.',
-                1499789433
-            );
-        }
-
-        $parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7);
-        // Parse PHP file to AST and traverse tree calling visitors
-        $statements = $parser->parse(file_get_contents($absoluteFilePath));
-
-        $traverser = new NodeTraverser();
-        // The built in NameResolver translates class names shortened with 'use' to fully qualified
-        // class names at all places. Incredibly useful for us and added as first visitor.
-        $traverser->addVisitor(new NameResolver());
-        // Understand makeInstance('My\\Package\\Foo\\Bar') as fqdn class name in first argument
-        $traverser->addVisitor(new GeneratorClassesResolver());
-        // Count ignored lines, effective code lines, ...
-        $statistics = new CodeStatistics();
-        $traverser->addVisitor($statistics);
-
-        // Add all configured matcher classes
-        $matcherFactory = new MatcherFactory();
-        $matchers = $matcherFactory->createAll($this->matchers);
-        foreach ($matchers as $matcher) {
-            $traverser->addVisitor($matcher);
-        }
-
-        $traverser->traverse($statements);
-
-        // Gather code matches
-        $matches = [];
-        foreach ($matchers as $matcher) {
-            $matches = array_merge($matches, $matcher->getMatches());
-        }
-
-        // Prepare match output
-        $restFilesBasePath = PATH_site . ExtensionManagementUtility::siteRelPath('core') . 'Documentation/Changelog';
-        $documentationFile = new DocumentationFile();
-        $preparedMatches = [];
-        foreach ($matches as $match) {
-            $preparedHit = [];
-            $preparedHit['uniqueId'] = str_replace('.', '', uniqid((string)mt_rand(), true));
-            $preparedHit['message'] = $match['message'];
-            $preparedHit['line'] = $match['line'];
-            $preparedHit['indicator'] = $match['indicator'];
-            $preparedHit['lineContent'] = $this->getLineFromFile($absoluteFilePath, $match['line']);
-            $preparedHit['restFiles'] = [];
-            foreach ($match['restFiles'] as $fileName) {
-                $finder = new Finder();
-                $restFileLocation = $finder->files()->in($restFilesBasePath)->name($fileName);
-                if ($restFileLocation->count() !== 1) {
-                    throw new \RuntimeException(
-                        'ResT file ' . $fileName . ' not found or multiple files found.',
-                        1499803909
-                    );
-                }
-                foreach ($restFileLocation as $restFile) {
-                    /** @var SplFileInfo $restFile */
-                    $restFileLocation = $restFile->getPathname();
-                    break;
-                }
-                $parsedRestFile = array_pop($documentationFile->getListEntry(strtr(realpath($restFileLocation), '\\', '/')));
-                $version = GeneralUtility::trimExplode('/', $restFileLocation);
-                array_pop($version);
-                // something like "8.2" .. "8.7" .. "master"
-                $parsedRestFile['version'] = array_pop($version);
-                $parsedRestFile['uniqueId'] = str_replace('.', '', uniqid((string)mt_rand(), true));
-                $preparedHit['restFiles'][] = $parsedRestFile;
-            }
-            $preparedMatches[] = $preparedHit;
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'matches' => $preparedMatches,
-            'isFileIgnored' => $statistics->isFileIgnored(),
-            'effectiveCodeLines' => $statistics->getNumberOfEffectiveCodeLines(),
-            'ignoredLines' => $statistics->getNumberOfIgnoredLines(),
-        ]);
-        return $this->view->render();
-    }
-
-    /**
-     * Find a code line in a file
-     *
-     * @param string $file Absolute path to file
-     * @param int $lineNumber Find this line in file
-     * @return string Code line
-     */
-    protected function getLineFromFile(string $file, int $lineNumber): string
-    {
-        $fileContent = file($file, FILE_IGNORE_NEW_LINES);
-        $line = '';
-        if (isset($fileContent[$lineNumber - 1])) {
-            $line = trim($fileContent[$lineNumber - 1]);
-        }
-        return $line;
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/FolderStructureFix.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/FolderStructureFix.php
deleted file mode 100644 (file)
index 0523e2b..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\FolderStructure\DefaultFactory;
-
-/**
- * Try to fix folder structure errors
- */
-class FolderStructureFix extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $folderStructureFactory = GeneralUtility::makeInstance(DefaultFactory::class);
-        $structureFacade = $folderStructureFactory->getStructure();
-        $fixedStatusObjects = $structureFacade->fix();
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'fixedStatus' => $fixedStatusObjects,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/FolderStructureGetStatus.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/FolderStructureGetStatus.php
deleted file mode 100644 (file)
index 3dfe0f0..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\FolderStructure\DefaultFactory;
-
-/**
- * Get folder structure status
- */
-class FolderStructureGetStatus extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $folderStructureFactory = GeneralUtility::makeInstance(DefaultFactory::class);
-        $structureFacade = $folderStructureFactory->getStructure();
-
-        $structureMessages = $structureFacade->getStatus();
-        $errorQueue = new FlashMessageQueue('install');
-        $okQueue = new FlashMessageQueue('install');
-        foreach ($structureMessages as $message) {
-            if ($message->getSeverity() === FlashMessage::ERROR
-                || $message->getSeverity() === FlashMessage::WARNING
-            ) {
-                $errorQueue->enqueue($message);
-            } else {
-                $okQueue->enqueue($message);
-            }
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'errorStatus' => $errorQueue,
-            'okStatus' => $okQueue,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/ImageProcessing.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/ImageProcessing.php
deleted file mode 100644 (file)
index fc03ef3..0000000
+++ /dev/null
@@ -1,725 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Imaging\GraphicalFunctions;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Core\Utility\StringUtility;
-
-/**
- * Execute an image test.
- */
-class ImageProcessing extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $testType = $this->postValues['testType'];
-        $testMethod = $testType . 'Test';
-        if (!method_exists($this, $testType . 'Test')) {
-            throw new \RuntimeException(
-                'Test method ' . $testMethod . ' does not exist',
-                1502977949
-            );
-        }
-        $result = $this->$testMethod();
-        if (!empty($result['referenceFile'])) {
-            $fileExt = end(explode('.', $result['referenceFile']));
-            $result['referenceFile'] = 'data:image/' . $fileExt . ';base64,' . base64_encode(file_get_contents($result['referenceFile']));
-        }
-        if (!empty($result['outputFile'])) {
-            $fileExt = end(explode('.', $result['outputFile']));
-            $result['outputFile'] = 'data:image/' . $fileExt . ';base64,' . base64_encode(file_get_contents($result['outputFile']));
-        }
-        $result['success'] = true;
-        foreach ($result as $variable => $value) {
-            $this->view->assign($variable, $value);
-        }
-        return $this->view->render();
-    }
-
-    /**
-     * Create true type font test image
-     *
-     * @return array
-     */
-    protected function trueTypeTest(): array
-    {
-        $image = @imagecreate(200, 50);
-        imagecolorallocate($image, 255, 255, 55);
-        $textColor = imagecolorallocate($image, 233, 14, 91);
-        @imagettftext(
-            $image,
-            20 / 96.0 * 72, // As in  compensateFontSizeiBasedOnFreetypeDpi
-            0,
-            10,
-            20,
-            $textColor,
-            ExtensionManagementUtility::extPath('install') . 'Resources/Private/Font/vera.ttf',
-            'Testing true type'
-        );
-        $outputFile = PATH_site . 'typo3temp/assets/images/installTool-' . StringUtility::getUniqueId('createTrueTypeFontTestImage') . '.gif';
-        imagegif($image, $outputFile);
-        return [
-            'fileExists' => file_exists($outputFile),
-            'outputFile' => $outputFile,
-            'referenceFile' => PATH_site . 'typo3/sysext/install/Resources/Public/Images/TestReference/Font.gif',
-        ];
-    }
-
-    /**
-     * Convert to jpg from jpg
-     *
-     * @return array
-     */
-    protected function readJpgTest(): array
-    {
-        return $this->convertImageFormatsToJpg('jpg');
-    }
-
-    /**
-     * Convert to jpg from gif
-     *
-     * @return array
-     */
-    protected function readGifTest(): array
-    {
-        return $this->convertImageFormatsToJpg('gif');
-    }
-
-    /**
-     * Convert to jpg from png
-     *
-     * @return array
-     */
-    protected function readPngTest(): array
-    {
-        return $this->convertImageFormatsToJpg('png');
-    }
-
-    /**
-     * Convert to jpg from tif
-     *
-     * @return array
-     */
-    protected function readTifTest(): array
-    {
-        return $this->convertImageFormatsToJpg('tif');
-    }
-
-    /**
-     * Convert to jpg from pdf
-     *
-     * @return array
-     */
-    protected function readPdfTest(): array
-    {
-        return $this->convertImageFormatsToJpg('pdf');
-    }
-
-    /**
-     * Convert to jpg from ai
-     *
-     * @return array
-     */
-    protected function readAiTest(): array
-    {
-        return $this->convertImageFormatsToJpg('ai');
-    }
-
-    /**
-     * Convert to jpg from given input format
-     *
-     * @param string $inputFormat
-     * @return array
-     */
-    protected function convertImageFormatsToJpg(string $inputFormat): array
-    {
-        if (!$this->isImageMagickEnabledAndConfigured()) {
-            return [
-                'status' => [ $this->imageMagickDisabledMessage() ],
-            ];
-        }
-        if (!GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $inputFormat)) {
-            return [
-                'status' => [
-                    new FlashMessage(
-                        'Handling format ' . $inputFormat . ' must be enabled in TYPO3_CONF_VARS[\'GFX\'][\'imagefile_ext\']',
-                        'Skipped test',
-                        FlashMessage::WARNING
-                    )
-                ]
-            ];
-        }
-        $imageBasePath = ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
-        $imageProcessor = $this->initializeImageProcessor();
-        $inputFile = $imageBasePath . 'TestInput/Test.' . $inputFormat;
-        $imageProcessor->imageMagickConvert_forceFileNameBody = StringUtility::getUniqueId('read') . '-' . $inputFormat;
-        $imResult = $imageProcessor->imageMagickConvert($inputFile, 'jpg', '300', '', '', '', [], true);
-        $result = [];
-        if ($imResult !== null) {
-            $result = [
-                'fileExists' => file_exists($imResult[3]),
-                'outputFile' => $imResult[3],
-                'referenceFile' => PATH_site . 'typo3/sysext/install/Resources/Public/Images/TestReference/Read-' . $inputFormat . '.jpg',
-                'command' => $imageProcessor->IM_commands,
-            ];
-        } else {
-            $result['status'] = [ $this->imageGenerationFailedMessage() ];
-        }
-        return $result;
-    }
-
-    /**
-     * Writing gif test
-     *
-     * @return array
-     */
-    protected function writeGifTest(): array
-    {
-        if (!$this->isImageMagickEnabledAndConfigured()) {
-            return [
-                'status' => [ $this->imageMagickDisabledMessage() ],
-            ];
-        }
-        $imageBasePath = ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
-        $inputFile = $imageBasePath . 'TestInput/Test.gif';
-        $imageProcessor = $this->initializeImageProcessor();
-        $imageProcessor->imageMagickConvert_forceFileNameBody = StringUtility::getUniqueId('write-gif');
-        $imResult = $imageProcessor->imageMagickConvert($inputFile, 'gif', '300', '', '', '', [], true);
-        $messages = new FlashMessageQueue('install');
-        if ($imResult !== null && is_file($imResult[3])) {
-            if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gif_compress']) {
-                clearstatcache();
-                $previousSize = GeneralUtility::formatSize(filesize($imResult[3]));
-                $methodUsed = GraphicalFunctions::gifCompress($imResult[3], '');
-                clearstatcache();
-                $compressedSize = GeneralUtility::formatSize(filesize($imResult[3]));
-                $messages->enqueue(new FlashMessage(
-                    'Method used by compress: ' . $methodUsed . LF
-                        . ' Previous filesize: ' . $previousSize . '. Current filesize:' . $compressedSize,
-                    'Compressed gif',
-                    FlashMessage::INFO
-                ));
-            } else {
-                $messages->enqueue(new FlashMessage(
-                    '',
-                    'Gif compression not enabled by [GFX][gif_compress]',
-                    FlashMessage::INFO
-                ));
-            }
-            $result = [
-                'status' => $messages,
-                'fileExists' => true,
-                'outputFile' => $imResult[3],
-                'referenceFile' => PATH_site . 'typo3/sysext/install/Resources/Public/Images/TestReference/Write-gif.gif',
-                'command' => $imageProcessor->IM_commands,
-            ];
-        } else {
-            $result = [
-                'status' => [ $this->imageGenerationFailedMessage() ],
-            ];
-        }
-        return $result;
-    }
-
-    /**
-     * Writing png test
-     *
-     * @return array
-     */
-    protected function writePngTest(): array
-    {
-        if (!$this->isImageMagickEnabledAndConfigured()) {
-            return [
-                'status' => [ $this->imageMagickDisabledMessage() ],
-            ];
-        }
-        $imageBasePath = ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
-        $inputFile = $imageBasePath . 'TestInput/Test.png';
-        $imageProcessor = $this->initializeImageProcessor();
-        $imageProcessor->imageMagickConvert_forceFileNameBody = StringUtility::getUniqueId('write-png');
-        $imResult = $imageProcessor->imageMagickConvert($inputFile, 'png', '300', '', '', '', [], true);
-        if ($imResult !== null && is_file($imResult[3])) {
-            $result = [
-                'fileExists' => true,
-                'outputFile' => $imResult[3],
-                'referenceFile' => PATH_site . 'typo3/sysext/install/Resources/Public/Images/TestReference/Write-png.png',
-                'command' => $imageProcessor->IM_commands,
-            ];
-        } else {
-            $result = [
-                'status' => [ $this->imageGenerationFailedMessage() ],
-            ];
-        }
-        return $result;
-    }
-
-    /**
-     * Scaling transparent files - gif to gif
-     *
-     * @return array
-     */
-    protected function gifToGifTest(): array
-    {
-        if (!$this->isImageMagickEnabledAndConfigured()) {
-            return [
-                'status' => [ $this->imageMagickDisabledMessage() ],
-            ];
-        }
-        $imageBasePath = ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
-        $imageProcessor = $this->initializeImageProcessor();
-        $inputFile = $imageBasePath . 'TestInput/Transparent.gif';
-        $imageProcessor->imageMagickConvert_forceFileNameBody = StringUtility::getUniqueId('scale-gif');
-        $imResult = $imageProcessor->imageMagickConvert($inputFile, 'gif', '300', '', '', '', [], true);
-        if ($imResult !== null && file_exists($imResult[3])) {
-            $result = [
-                'fileExists' => true,
-                'outputFile' => $imResult[3],
-                'referenceFile' => PATH_site . 'typo3/sysext/install/Resources/Public/Images/TestReference/Scale-gif.gif',
-                'command' => $imageProcessor->IM_commands,
-            ];
-        } else {
-            $result = [
-                'status' => [ $this->imageGenerationFailedMessage() ],
-            ];
-        }
-        return $result;
-    }
-
-    /**
-     * Scaling transparent files - png to png
-     *
-     * @return array
-     */
-    protected function pngToPngTest(): array
-    {
-        if (!$this->isImageMagickEnabledAndConfigured()) {
-            return [
-                'status' => [ $this->imageMagickDisabledMessage() ],
-            ];
-        }
-        $imageBasePath = ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
-        $imageProcessor = $this->initializeImageProcessor();
-        $inputFile = $imageBasePath . 'TestInput/Transparent.png';
-        $imageProcessor->imageMagickConvert_forceFileNameBody = StringUtility::getUniqueId('scale-png');
-        $imResult = $imageProcessor->imageMagickConvert($inputFile, 'png', '300', '', '', '', [], true);
-        if ($imResult !== null && file_exists($imResult[3])) {
-            $result = [
-                'fileExists' => true,
-                'outputFile' => $imResult[3],
-                'referenceFile' => PATH_site . 'typo3/sysext/install/Resources/Public/Images/TestReference/Scale-png.png',
-                'command' => $imageProcessor->IM_commands,
-            ];
-        } else {
-            $result = [
-                'status' => [ $this->imageGenerationFailedMessage() ],
-            ];
-        }
-        return $result;
-    }
-
-    /**
-     * Scaling transparent files - gif to jpg
-     *
-     * @return array
-     */
-    protected function gifToJpgTest(): array
-    {
-        if (!$this->isImageMagickEnabledAndConfigured()) {
-            return [
-                'status' => [ $this->imageMagickDisabledMessage() ],
-            ];
-        }
-        $imageBasePath = ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
-        $imageProcessor = $this->initializeImageProcessor();
-        $inputFile = $imageBasePath . 'TestInput/Transparent.gif';
-        $imageProcessor->imageMagickConvert_forceFileNameBody = StringUtility::getUniqueId('scale-jpg');
-        $imResult = $imageProcessor->imageMagickConvert($inputFile, 'jpg', '300', '', '-opaque white -background white -flatten', '', [], true);
-        if ($imResult !== null && file_exists($imResult[3])) {
-            $result = [
-                'fileExists' => true,
-                'outputFile' => $imResult[3],
-                'referenceFile' => PATH_site . 'typo3/sysext/install/Resources/Public/Images/TestReference/Scale-jpg.jpg',
-                'command' => $imageProcessor->IM_commands,
-            ];
-        } else {
-            $result = [
-                'status' => [ $this->imageGenerationFailedMessage() ],
-            ];
-        }
-        return $result;
-    }
-
-    /**
-     * Combine images with gif mask
-     *
-     * @return array
-     */
-    protected function combineGifMaskTest(): array
-    {
-        if (!$this->isImageMagickEnabledAndConfigured()) {
-            return [
-                'status' => [ $this->imageMagickDisabledMessage() ],
-            ];
-        }
-        $imageBasePath = ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
-        $imageProcessor = $this->initializeImageProcessor();
-        $inputFile = $imageBasePath . 'TestInput/BackgroundOrange.gif';
-        $overlayFile = $imageBasePath . 'TestInput/Test.jpg';
-        $maskFile = $imageBasePath . 'TestInput/MaskBlackWhite.gif';
-        $resultFile = $this->getImagesPath($imageProcessor) . $imageProcessor->filenamePrefix
-            . StringUtility::getUniqueId($imageProcessor->alternativeOutputKey . 'combine1') . '.jpg';
-        $imageProcessor->combineExec($inputFile, $overlayFile, $maskFile, $resultFile);
-        $imResult = $imageProcessor->getImageDimensions($resultFile);
-        if ($imResult) {
-            $result = [
-                'fileExists' => true,
-                'outputFile' => $imResult[3],
-                'referenceFile' => PATH_site . 'typo3/sysext/install/Resources/Public/Images/TestReference/Combine-1.jpg',
-                'command' => $imageProcessor->IM_commands,
-            ];
-        } else {
-            $result = [
-                'status' => [ $this->imageGenerationFailedMessage() ],
-            ];
-        }
-        return $result;
-    }
-
-    /**
-     * Combine images with jpg mask
-     *
-     * @return array
-     */
-    protected function combineJpgMaskTest(): array
-    {
-        if (!$this->isImageMagickEnabledAndConfigured()) {
-            return [
-                'status' => [ $this->imageMagickDisabledMessage() ],
-            ];
-        }
-        $imageBasePath = ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
-        $imageProcessor = $this->initializeImageProcessor();
-        $inputFile = $imageBasePath . 'TestInput/BackgroundCombine.jpg';
-        $overlayFile = $imageBasePath . 'TestInput/Test.jpg';
-        $maskFile = $imageBasePath . 'TestInput/MaskCombine.jpg';
-        $resultFile = $this->getImagesPath($imageProcessor) . $imageProcessor->filenamePrefix
-            . StringUtility::getUniqueId($imageProcessor->alternativeOutputKey . 'combine2') . '.jpg';
-        $imageProcessor->combineExec($inputFile, $overlayFile, $maskFile, $resultFile);
-        $imResult = $imageProcessor->getImageDimensions($resultFile);
-        if ($imResult) {
-            $result = [
-                'fileExists' => true,
-                'outputFile' => $imResult[3],
-                'referenceFile' => PATH_site . 'typo3/sysext/install/Resources/Public/Images/TestReference/Combine-2.jpg',
-                'command' => $imageProcessor->IM_commands,
-            ];
-        } else {
-            $result = [
-                'status' => [ $this->imageGenerationFailedMessage() ],
-            ];
-        }
-        return $result;
-    }
-
-    /**
-     * GD with simple box
-     *
-     * @return array
-     */
-    protected function gdlibSimpleTest(): array
-    {
-        $imageProcessor = $this->initializeImageProcessor();
-        $gifOrPng = $imageProcessor->gifExtension;
-        $image = imagecreatetruecolor(300, 225);
-        $backgroundColor = imagecolorallocate($image, 0, 0, 0);
-        imagefilledrectangle($image, 0, 0, 300, 225, $backgroundColor);
-        $workArea = [0, 0, 300, 225];
-        $conf = [
-            'dimensions' => '10,50,280,50',
-            'color' => 'olive',
-        ];
-        $imageProcessor->makeBox($image, $conf, $workArea);
-        $outputFile = $this->getImagesPath($imageProcessor) . $imageProcessor->filenamePrefix . StringUtility::getUniqueId('gdSimple') . '.' . $gifOrPng;
-        $imageProcessor->ImageWrite($image, $outputFile);
-        $imResult = $imageProcessor->getImageDimensions($outputFile);
-        $result = [
-            'fileExists' => true,
-            'outputFile' => $imResult[3],
-            'referenceFile' => PATH_site . 'typo3/sysext/install/Resources/Public/Images/TestReference/Gdlib-simple.' . $gifOrPng,
-            'command' => $imageProcessor->IM_commands,
-        ];
-        return $result;
-    }
-
-    /**
-     * GD from image with box
-     *
-     * @return array
-     */
-    protected function gdlibFromFileTest(): array
-    {
-        $imageProcessor = $this->initializeImageProcessor();
-        $gifOrPng = $imageProcessor->gifExtension;
-        $imageBasePath = ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
-        $inputFile = $imageBasePath . 'TestInput/Test.' . $gifOrPng;
-        $image = $imageProcessor->imageCreateFromFile($inputFile);
-        $workArea = [0, 0, 400, 300];
-        $conf = [
-            'dimensions' => '10,50,380,50',
-            'color' => 'olive',
-        ];
-        $imageProcessor->makeBox($image, $conf, $workArea);
-        $outputFile = $this->getImagesPath($imageProcessor) . $imageProcessor->filenamePrefix . StringUtility::getUniqueId('gdBox') . '.' . $gifOrPng;
-        $imageProcessor->ImageWrite($image, $outputFile);
-        $imResult = $imageProcessor->getImageDimensions($outputFile);
-        $result = [
-            'fileExists' => true,
-            'outputFile' => $imResult[3],
-            'referenceFile' => PATH_site . 'typo3/sysext/install/Resources/Public/Images/TestReference/Gdlib-box.' . $gifOrPng,
-            'command' => $imageProcessor->IM_commands,
-        ];
-        return $result;
-    }
-
-    /**
-     * GD with text
-     *
-     * @return array
-     */
-    protected function gdlibRenderTextTest(): array
-    {
-        $imageProcessor = $this->initializeImageProcessor();
-        $gifOrPng = $imageProcessor->gifExtension;
-        $image = imagecreatetruecolor(300, 225);
-        $backgroundColor = imagecolorallocate($image, 128, 128, 150);
-        imagefilledrectangle($image, 0, 0, 300, 225, $backgroundColor);
-        $workArea = [0, 0, 300, 225];
-        $conf = [
-            'iterations' => 1,
-            'angle' => 0,
-            'antiAlias' => 1,
-            'text' => 'HELLO WORLD',
-            'fontColor' => '#003366',
-            'fontSize' => 30,
-            'fontFile' => ExtensionManagementUtility::extPath('install') . 'Resources/Private/Font/vera.ttf',
-            'offset' => '30,80',
-        ];
-        $conf['BBOX'] = $imageProcessor->calcBBox($conf);
-        $imageProcessor->makeText($image, $conf, $workArea);
-        $outputFile = $this->getImagesPath($imageProcessor) . $imageProcessor->filenamePrefix . StringUtility::getUniqueId('gdText') . '.' . $gifOrPng;
-        $imageProcessor->ImageWrite($image, $outputFile);
-        $imResult = $imageProcessor->getImageDimensions($outputFile);
-        $result = [
-            'fileExists' => true,
-            'outputFile' => $imResult[3],
-            'referenceFile' => PATH_site . 'typo3/sysext/install/Resources/Public/Images/TestReference/Gdlib-text.' . $gifOrPng,
-            'command' => $imageProcessor->IM_commands,
-        ];
-        return $result;
-    }
-
-    /**
-     * GD with text, niceText
-     *
-     * @return array
-     */
-    protected function gdlibNiceTextTest(): array
-    {
-        if (!$this->isImageMagickEnabledAndConfigured()) {
-            return [
-                'status' => [ $this->imageMagickDisabledMessage() ],
-            ];
-        }
-        $imageProcessor = $this->initializeImageProcessor();
-        $gifOrPng = $imageProcessor->gifExtension;
-        $image = imagecreatetruecolor(300, 225);
-        $backgroundColor = imagecolorallocate($image, 128, 128, 150);
-        imagefilledrectangle($image, 0, 0, 300, 225, $backgroundColor);
-        $workArea = [0, 0, 300, 225];
-        $conf = [
-            'iterations' => 1,
-            'angle' => 0,
-            'antiAlias' => 1,
-            'text' => 'HELLO WORLD',
-            'fontColor' => '#003366',
-            'fontSize' => 30,
-            'fontFile' => ExtensionManagementUtility::extPath('install') . 'Resources/Private/Font/vera.ttf',
-            'offset' => '30,80',
-        ];
-        $conf['BBOX'] = $imageProcessor->calcBBox($conf);
-        $imageProcessor->makeText($image, $conf, $workArea);
-        $outputFile = $this->getImagesPath($imageProcessor) . $imageProcessor->filenamePrefix . StringUtility::getUniqueId('gdText') . '.' . $gifOrPng;
-        $imageProcessor->ImageWrite($image, $outputFile);
-        $conf['offset'] = '30,120';
-        $conf['niceText'] = 1;
-        $imageProcessor->makeText($image, $conf, $workArea);
-        $outputFile = $this->getImagesPath($imageProcessor) . $imageProcessor->filenamePrefix . StringUtility::getUniqueId('gdNiceText') . '.' . $gifOrPng;
-        $imageProcessor->ImageWrite($image, $outputFile);
-        $imResult = $imageProcessor->getImageDimensions($outputFile);
-        $result = [
-            'fileExists' => true,
-            'outputFile' => $imResult[3],
-            'referenceFile' => PATH_site . 'typo3/sysext/install/Resources/Public/Images/TestReference/Gdlib-niceText.' . $gifOrPng,
-            'command' => $imageProcessor->IM_commands,
-        ];
-        return $result;
-    }
-
-    /**
-     * GD with text, niceText, shadow
-     *
-     * @return array
-     */
-    protected function gdlibNiceTextShadowTest(): array
-    {
-        if (!$this->isImageMagickEnabledAndConfigured()) {
-            return [
-                'status' => [ $this->imageMagickDisabledMessage() ],
-            ];
-        }
-        $imageProcessor = $this->initializeImageProcessor();
-        $gifOrPng = $imageProcessor->gifExtension;
-        $image = imagecreatetruecolor(300, 225);
-        $backgroundColor = imagecolorallocate($image, 128, 128, 150);
-        imagefilledrectangle($image, 0, 0, 300, 225, $backgroundColor);
-        $workArea = [0, 0, 300, 225];
-        $conf = [
-            'iterations' => 1,
-            'angle' => 0,
-            'antiAlias' => 1,
-            'text' => 'HELLO WORLD',
-            'fontColor' => '#003366',
-            'fontSize' => 30,
-            'fontFile' => ExtensionManagementUtility::extPath('install') . 'Resources/Private/Font/vera.ttf',
-            'offset' => '30,80',
-        ];
-        $conf['BBOX'] = $imageProcessor->calcBBox($conf);
-        $imageProcessor->makeText($image, $conf, $workArea);
-        $outputFile = $this->getImagesPath($imageProcessor) . $imageProcessor->filenamePrefix . StringUtility::getUniqueId('gdText') . '.' . $gifOrPng;
-        $imageProcessor->ImageWrite($image, $outputFile);
-        $conf['offset'] = '30,120';
-        $conf['niceText'] = 1;
-        $imageProcessor->makeText($image, $conf, $workArea);
-        $outputFile = $this->getImagesPath($imageProcessor) . $imageProcessor->filenamePrefix . StringUtility::getUniqueId('gdNiceText') . '.' . $gifOrPng;
-        $imageProcessor->ImageWrite($image, $outputFile);
-        $conf['offset'] = '30,160';
-        $conf['niceText'] = 1;
-        $conf['shadow.'] = [
-            'offset' => '2,2',
-            'blur' => $imageProcessor->NO_IM_EFFECTS ? '90' : '20',
-            'opacity' => '50',
-            'color' => 'black'
-        ];
-        // Warning: Re-uses $image from above!
-        $imageProcessor->makeShadow($image, $conf['shadow.'], $workArea, $conf);
-        $imageProcessor->makeText($image, $conf, $workArea);
-        $outputFile = $this->getImagesPath($imageProcessor) . $imageProcessor->filenamePrefix . StringUtility::getUniqueId('GDwithText-niceText-shadow') . '.' . $gifOrPng;
-        $imageProcessor->ImageWrite($image, $outputFile);
-        $imResult = $imageProcessor->getImageDimensions($outputFile);
-        $result = [
-            'fileExists' => true,
-            'outputFile' => $imResult[3],
-            'referenceFile' => PATH_site . 'typo3/sysext/install/Resources/Public/Images/TestReference/Gdlib-shadow.' . $gifOrPng,
-            'command' => $imageProcessor->IM_commands,
-        ];
-        return $result;
-    }
-
-    /**
-     * Initialize image processor
-     *
-     * @return GraphicalFunctions Initialized image processor
-     */
-    protected function initializeImageProcessor(): GraphicalFunctions
-    {
-        $imageProcessor = GeneralUtility::makeInstance(GraphicalFunctions::class);
-        $imageProcessor->init();
-        $imageProcessor->absPrefix = PATH_site;
-        $imageProcessor->dontCheckForExistingTempFile = 1;
-        $imageProcessor->filenamePrefix = 'installTool-';
-        $imageProcessor->dontCompress = 1;
-        $imageProcessor->alternativeOutputKey = 'typo3InstallTest';
-        $imageProcessor->noFramePrepended = $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_allowFrameSelection'];
-        return $imageProcessor;
-    }
-
-    /**
-     * Create a 'image generation failed' message
-     *
-     * @return FlashMessage
-     */
-    protected function imageGenerationFailedMessage(): FlashMessage
-    {
-        return new FlashMessage(
-            'ImageMagick / GraphicsMagick handling is enabled, but the execute'
-                . ' command returned an error. Please check your settings, especially'
-                . ' [\'GFX\'][\'processor_path\'] and [\'GFX\'][\'processor_path_lzw\'] and ensure Ghostscript is installed on your server.',
-            'Image generation failed',
-            FlashMessage::ERROR
-        );
-    }
-
-    /**
-     * Find out if ImageMagick or GraphicsMagick is enabled and set up
-     *
-     * @return bool TRUE if enabled and path is set
-     */
-    protected function isImageMagickEnabledAndConfigured(): bool
-    {
-        $enabled = $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_enabled'];
-        $path = $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_path'];
-        return $enabled && $path;
-    }
-
-    /**
-     * Create a 'imageMagick disabled' message
-     *
-     * @return FlashMessage
-     */
-    protected function imageMagickDisabledMessage(): FlashMessage
-    {
-        return new FlashMessage(
-            'ImageMagick / GraphicsMagick handling is disabled or not configured correctly.',
-            'Tests not executed',
-            FlashMessage::ERROR
-        );
-    }
-
-    /**
-     * Return the temp image dir.
-     * If not exist it will be created
-     *
-     * @param GraphicalFunctions $imageProcessor
-     * @return string
-     */
-    protected function getImagesPath(GraphicalFunctions $imageProcessor): string
-    {
-        $imagePath = $imageProcessor->absPrefix . 'typo3temp/assets/images/';
-        if (!is_dir($imagePath)) {
-            GeneralUtility::mkdir_deep($imagePath);
-        }
-        return $imagePath;
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/LocalConfigurationWrite.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/LocalConfigurationWrite.php
deleted file mode 100644 (file)
index 862c9a4..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Install\Service\LocalConfigurationValueService;
-
-/**
- * Write values to LocalConfiguration
- */
-class LocalConfigurationWrite extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        if (!is_array($this->postValues['configurationValues']) || empty($this->postValues['configurationValues'])) {
-            throw new \RuntimeException(
-                'Expected value array not found',
-                1502282283
-            );
-        }
-
-        $localConfigurationValueService = new LocalConfigurationValueService();
-        $messageQueue = $localConfigurationValueService->updateLocalConfigurationValues($this->postValues['configurationValues']);
-
-        if (empty($messageQueue)) {
-            $messageQueue->enqueue(new FlashMessage(
-                '',
-                'No values changed',
-                FlashMessage::WARNING
-            ));
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messageQueue,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/MailTest.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/MailTest.php
deleted file mode 100644 (file)
index 0a4d5da..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Mail\MailMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Send a test mail
- */
-class MailTest extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $messages = new FlashMessageQueue('install');
-        $recipient = $this->postValues['email'];
-        if (empty($recipient) || !GeneralUtility::validEmail($recipient)) {
-            $messages->enqueue(new FlashMessage(
-                'Given address is not a valid email address.',
-                'Mail not sent',
-                FlashMessage::ERROR
-            ));
-        } else {
-            $mailMessage = GeneralUtility::makeInstance(MailMessage::class);
-            $mailMessage
-                ->addTo($recipient)
-                ->addFrom($this->getSenderEmailAddress(), $this->getSenderEmailName())
-                ->setSubject($this->getEmailSubject())
-                ->setBody('<html><body>html test content</body></html>', 'text/html')
-                ->addPart('TEST CONTENT')
-                ->send();
-            $messages->enqueue(new FlashMessage(
-                'Recipient: ' . $recipient,
-                'Test mail sent'
-            ));
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messages,
-        ]);
-        return $this->view->render();
-    }
-
-    /**
-     * Get sender address from configuration
-     * ['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress']
-     * If this setting is empty fall back to 'no-reply@example.com'
-     *
-     * @return string Returns an email address
-     */
-    protected function getSenderEmailAddress(): string
-    {
-        return !empty($GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'])
-            ? $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress']
-            : 'no-reply@example.com';
-    }
-
-    /**
-     * Gets sender name from configuration
-     * ['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName']
-     * If this setting is empty, it falls back to a default string.
-     *
-     * @return string
-     */
-    protected function getSenderEmailName(): string
-    {
-        return !empty($GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName'])
-            ? $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName']
-            : 'TYPO3 CMS install tool';
-    }
-
-    /**
-     * Gets email subject from configuration
-     * ['TYPO3_CONF_VARS']['SYS']['sitename']
-     * If this setting is empty, it falls back to a default string.
-     *
-     * @return string
-     */
-    protected function getEmailSubject(): string
-    {
-        $name = !empty($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'])
-            ? ' from site "' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . '"'
-            : '';
-        return 'Test TYPO3 CMS mail delivery' . $name;
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/PresetActivate.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/PresetActivate.php
deleted file mode 100644 (file)
index 45fb4fb..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Configuration\ConfigurationManager;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Install\Configuration\FeatureManager;
-
-/**
- * Activate a LocalConfiguration preset
- */
-class PresetActivate extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $messages = new FlashMessageQueue('install');
-        $configurationManager = new ConfigurationManager();
-        $featureManager = new FeatureManager();
-        $configurationValues = $featureManager->getConfigurationForSelectedFeaturePresets($this->postValues['values']);
-        if (!empty($configurationValues)) {
-            $configurationManager->setLocalConfigurationValuesByPathValuePairs($configurationValues);
-            $messageBody = [];
-            foreach ($configurationValues as $configurationKey => $configurationValue) {
-                $messageBody[] = '\'' . $configurationKey . '\' => \'' . $configurationValue . '\'';
-            }
-            $messages->enqueue(new FlashMessage(
-                implode('<br>', $messageBody),
-                'Configuration written'
-            ));
-        } else {
-            $messages->enqueue(new FlashMessage(
-                '',
-                'No configuration change selected',
-                FlashMessage::INFO
-            ));
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messages,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/ResetBackendUserUc.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/ResetBackendUserUc.php
deleted file mode 100644 (file)
index c1d122b..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Ajax wrapper to reset backend user preferences
- */
-class ResetBackendUserUc extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     * @throws \InvalidArgumentException
-     */
-    protected function executeAction(): array
-    {
-        GeneralUtility::makeInstance(ConnectionPool::class)
-            ->getQueryBuilderForTable('be_users')
-            ->update('be_users')
-            ->set('uc', '')
-            ->execute();
-
-        $messageQueue = new FlashMessageQueue('install');
-        $messageQueue->enqueue(new FlashMessage(
-            '',
-            'Reset all backend users preferences'
-        ));
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messageQueue
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/SystemMaintainerGetList.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/SystemMaintainerGetList.php
deleted file mode 100644 (file)
index bc3ec60..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Get list of backend admin users with information if they are system maintainers
- */
-class SystemMaintainerGetList extends AbstractAjaxAction
-{
-    /**
-     * Get backend admin user list
-     *
-     * @return array
-     */
-    protected function executeAction(): array
-    {
-        $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
-
-        // We have to respect the enable fields here by our own because no TCA is loaded in standalone mode
-        $queryBuilder = $connectionPool->getQueryBuilderForTable('be_users');
-        $queryBuilder->getRestrictions()->removeAll();
-
-        $users = $queryBuilder
-            ->select('uid', 'username', 'disable', 'starttime', 'endtime')
-            ->from('be_users')
-            ->where(
-                $queryBuilder->expr()->andX(
-                    $queryBuilder->expr()->eq('deleted', $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)),
-                    $queryBuilder->expr()->eq('admin', $queryBuilder->createNamedParameter(1, \PDO::PARAM_INT)),
-                    $queryBuilder->expr()->neq('username', $queryBuilder->createNamedParameter('_cli_', \PDO::PARAM_STR))
-                )
-            )
-            ->orderBy('uid')
-            ->execute()
-            ->fetchAll();
-
-        $systemMaintainerList = $GLOBALS['TYPO3_CONF_VARS']['SYS']['systemMaintainers'] ?? [];
-        $currentTime = time();
-        foreach ($users as &$user) {
-            $user['disable'] = $user['disable'] ||
-                ((int)$user['starttime'] !== 0 && $user['starttime'] > $currentTime) ||
-                ((int)$user['endtime'] !== 0 && $user['endtime'] < $currentTime);
-            $user['isSystemMaintainer'] = in_array((int)$user['uid'], $systemMaintainerList, true);
-        }
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => [],
-            'users' => $users,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/SystemMaintainerWrite.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/SystemMaintainerWrite.php
deleted file mode 100644 (file)
index ebfe020..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Configuration\ConfigurationManager;
-use TYPO3\CMS\Core\Database\Connection;
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Core\Utility\MathUtility;
-
-/**
- * Write out system maintainer list to LocalConfiguration
- */
-class SystemMaintainerWrite extends AbstractAjaxAction
-{
-    /**
-     * Write system maintainer list
-     *
-     * @return array
-     */
-    protected function executeAction(): array
-    {
-        // Sanitize given user list and write out
-        $newUserList = [];
-        if (isset($this->postValues['users']) && is_array($this->postValues['users'])) {
-            foreach ($this->postValues['users'] as $uid) {
-                if (MathUtility::canBeInterpretedAsInteger($uid)) {
-                    $newUserList[] = (int)$uid;
-                }
-            }
-        }
-
-        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('be_users');
-        $queryBuilder->getRestrictions()->removeAll();
-
-        $validatedUserList = $queryBuilder
-            ->select('uid')
-            ->from('be_users')
-            ->where(
-                $queryBuilder->expr()->andX(
-                    $queryBuilder->expr()->eq('deleted', $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)),
-                    $queryBuilder->expr()->eq('admin', $queryBuilder->createNamedParameter(1, \PDO::PARAM_INT)),
-                    $queryBuilder->expr()->in('uid', $queryBuilder->createNamedParameter($newUserList, Connection::PARAM_INT_ARRAY))
-                )
-            )->execute()->fetchAll();
-
-        $validatedUserList = array_column($validatedUserList, 'uid');
-
-        $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
-        $configurationManager->setLocalConfigurationValuesByPathValuePairs(
-            [ 'SYS/systemMaintainers' => $validatedUserList ]
-        );
-
-        $messages = [];
-        if (empty($validatedUserList)) {
-            $messages[] = new FlashMessage(
-                '',
-                'Set system maintainer list to an empty array',
-                FlashMessage::INFO
-            );
-        } else {
-            $messages[] = new FlashMessage(
-                implode(', ', $validatedUserList),
-                'New system maintainer uid list',
-                FlashMessage::INFO
-            );
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messages
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/TcaExtTablesCheck.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/TcaExtTablesCheck.php
deleted file mode 100644 (file)
index 828d8c0..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Service\LoadTcaService;
-
-/**
- * Check ext_tables.php files of loaded extensions for TCA changes.
- *
- * Changing TCA in ext_tables is highly discouraged since core version 7
- * and can break the frontend since core version 8.
- *
- * This test loads all ext_tables.php one-by-one and finds files that
- * still change TCA.
- */
-class TcaExtTablesCheck extends AbstractAjaxAction
-{
-    /**
-     * Fetches all installed extensions that still mess with the TCA in a way they shouldn't
-     *
-     * @return array status list of extensions that still mess with the TCA
-     */
-    protected function executeAction(): array
-    {
-        $messageQueue = new FlashMessageQueue('install');
-        $tcaMessages = $this->checkTcaChangesInExtTables();
-        foreach ($tcaMessages as $tcaMessage) {
-            $messageQueue->enqueue(new FlashMessage(
-                '',
-                $tcaMessage,
-                FlashMessage::NOTICE
-            ));
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messageQueue,
-        ]);
-        return $this->view->render();
-    }
-
-    /**
-     * Load base TCA, then load each single ext_tables.php file and see if TCA changed.
-     *
-     * @return array list of extensions that still mess with the tca
-     */
-    protected function checkTcaChangesInExtTables(): array
-    {
-        $loadTcaService = GeneralUtility::makeInstance(LoadTcaService::class);
-        $loadTcaService->loadExtensionTablesWithoutMigration();
-        $baseTca = $GLOBALS['TCA'];
-        $extensions = [];
-        foreach ($GLOBALS['TYPO3_LOADED_EXT'] as $extensionKey => $extensionInformation) {
-            if ((is_array($extensionInformation) || $extensionInformation instanceof \ArrayAccess)
-                && $extensionInformation['ext_tables.php']
-            ) {
-                $loadTcaService->loadSingleExtTablesFile($extensionKey);
-                $newTca = $GLOBALS['TCA'];
-                if ($newTca !== $baseTca) {
-                    $extensions[] = $extensionKey;
-                }
-                $baseTca = $newTca;
-            }
-        }
-        return $extensions;
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/TcaMigrationsCheck.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/TcaMigrationsCheck.php
deleted file mode 100644 (file)
index ab6b907..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Core\Migrations\TcaMigration;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Service\LoadTcaService;
-
-/**
- * Checks whether the current TCA needs migrations and displays applied migrations.
- */
-class TcaMigrationsCheck extends AbstractAjaxAction
-{
-    /**
-     * Load all TCA Migrations and return if there are any todos
-     *
-     * @return array TCA status messages
-     */
-    protected function executeAction(): array
-    {
-        $messageQueue = new FlashMessageQueue('install');
-        $tcaMessages = $this->checkTcaMigrations();
-        foreach ($tcaMessages as $tcaMessage) {
-            $messageQueue->enqueue(new FlashMessage(
-                '',
-                $tcaMessage,
-                FlashMessage::NOTICE
-            ));
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messageQueue,
-        ]);
-        return $this->view->render();
-    }
-
-    /**
-     * "TCA migration" action
-     *
-     * @return array The TCA migration messages
-     */
-    protected function checkTcaMigrations(): array
-    {
-        GeneralUtility::makeInstance(LoadTcaService::class)->loadExtensionTablesWithoutMigration();
-        $tcaMigration = GeneralUtility::makeInstance(TcaMigration::class);
-        $GLOBALS['TCA'] = $tcaMigration->migrate($GLOBALS['TCA']);
-        return $tcaMigration->getMessages();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/UninstallExtension.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/UninstallExtension.php
deleted file mode 100644 (file)
index 6a701e5..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Uninstall Extensions
- *
- * Used for uninstalling an extension (or multiple) via an ajax request.
- *
- * If you use this class you have to take care of clearing the cache afterwards,
- * it's not done here because for fully clearing the cache you need a reload
- * to take care of changed cache configurations due to no longer installed extensions.
- * Use the clearCache ajax action afterwards.
- */
-class UninstallExtension extends AbstractAjaxAction
-{
-    /**
-     * Uninstall one or multiple extensions
-     * Extension keys are read from get vars, more than one extension has to be comma separated
-     *
-     * @return array
-     */
-    protected function executeAction(): array
-    {
-        $getVars = GeneralUtility::_GET('install');
-        $messageQueue = new FlashMessageQueue('install');
-        if (isset($getVars['uninstallExtension']) && isset($getVars['uninstallExtension']['extensions'])) {
-            $extensionsToUninstall = GeneralUtility::trimExplode(',', $getVars['uninstallExtension']['extensions']);
-            foreach ($extensionsToUninstall as $extension) {
-                if (ExtensionManagementUtility::isLoaded($extension)) {
-                    try {
-                        ExtensionManagementUtility::unloadExtension($extension);
-                    } catch (\Exception $e) {
-                        $messageQueue->enqueue(new FlashMessage(
-                            $e->getMessage(),
-                            '',
-                            FlashMessage::ERROR
-                        ));
-                        return [
-                            'success' => true,
-                            'status' => $messageQueue
-                        ];
-                    }
-                }
-            }
-        }
-        return [
-            'success' => true,
-        ];
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeDocsMarkRead.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeDocsMarkRead.php
deleted file mode 100644 (file)
index 8d142bc..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Registry;
-
-/**
- * Save ignored documentation file items and hide them from display
- */
-class UpgradeDocsMarkRead extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return string content
-     * @throws \InvalidArgumentException
-     */
-    protected function executeAction(): array
-    {
-        $registry = new Registry();
-        $filePath = $this->postValues['ignoreFile'];
-        $fileHash = md5_file($filePath);
-        $registry->set('upgradeAnalysisIgnoredFiles', $fileHash, $filePath);
-        return [
-            'success' => true,
-        ];
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeDocsUnmarkRead.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeDocsUnmarkRead.php
deleted file mode 100644 (file)
index f1cc0e4..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Registry;
-
-/**
- * Remove ignored items from registry and therefor bring them back
- */
-class UpgradeDocsUnmarkRead extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return string Rendered content
-     * @throws \InvalidArgumentException
-     */
-    protected function executeAction(): array
-    {
-        $registry = new Registry();
-        $filePath = $this->postValues['ignoreFile'];
-        $fileHash = md5_file($filePath);
-        $registry->remove('upgradeAnalysisIgnoredFiles', $fileHash);
-        return [
-            'success' => true,
-        ];
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsBlockingDatabaseAdds.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsBlockingDatabaseAdds.php
deleted file mode 100644 (file)
index 2e13984..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Install\Service\UpgradeWizardsService;
-
-/**
- * "Blocking" upgrade to add missing fields + tables to DB.
- * This one must be green before others can be executed
- */
-class UpgradeWizardsBlockingDatabaseAdds extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        // ext_localconf, db and ext_tables must be loaded for the updates :(
-        $this->loadExtLocalconfDatabaseAndExtTables();
-
-        $upgradeWizardsService = new UpgradeWizardsService();
-        $adds = $upgradeWizardsService->getBlockingDatabaseAdds();
-
-        $needsUpdate = false;
-        if (!empty($adds)) {
-            $needsUpdate = true;
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'needsUpdate' => $needsUpdate,
-            'adds' => $adds,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsBlockingDatabaseCharsetFix.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsBlockingDatabaseCharsetFix.php
deleted file mode 100644 (file)
index 2f2b39a..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Install\Service\UpgradeWizardsService;
-
-/**
- * Set default connection MySQL database charset to utf8.
- */
-class UpgradeWizardsBlockingDatabaseCharsetFix extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $upgradeWizardsService = new UpgradeWizardsService();
-        $upgradeWizardsService->setDatabaseCharsetUtf8();
-
-        $messages = new FlashMessageQueue('install');
-        $messages->enqueue(new FlashMessage(
-            '',
-            'Default connection database has been set to utf8'
-        ));
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messages,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsBlockingDatabaseCharsetTest.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsBlockingDatabaseCharsetTest.php
deleted file mode 100644 (file)
index 6efc31e..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Install\Service\UpgradeWizardsService;
-
-/**
- * "Blocking" upgrade to add missing fields + tables to DB.
- * This one must be green before others can be executed
- */
-class UpgradeWizardsBlockingDatabaseCharsetTest extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $upgradeWizardsService = new UpgradeWizardsService();
-        $result = $upgradeWizardsService->isDatabaseCharsetUtf8();
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'needsUpdate' => $result,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsBlockingDatabaseExecute.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsBlockingDatabaseExecute.php
deleted file mode 100644 (file)
index 08dbae0..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Install\Service\UpgradeWizardsService;
-
-/**
- * Execute "Add required db tables and fields" blocking upgrade wizard
- * to add them
- */
-class UpgradeWizardsBlockingDatabaseExecute extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        // ext_localconf, db and ext_tables must be loaded for the updates :(
-        $this->loadExtLocalconfDatabaseAndExtTables();
-
-        $upgradeWizardsService = new UpgradeWizardsService();
-        $upgradeWizardsService->addMissingTablesAndFields();
-
-        $messages = new FlashMessageQueue('install');
-        $messages->enqueue(new FlashMessage(
-            '',
-            'Added missing database fields and tables'
-        ));
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messages,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsDoneUpgrades.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsDoneUpgrades.php
deleted file mode 100644 (file)
index 531d206..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Install\Service\UpgradeWizardsService;
-
-/**
- * Get a list of wizards and row updaters marked as "done" in registry
- */
-class UpgradeWizardsDoneUpgrades extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $this->loadExtLocalconfDatabaseAndExtTables();
-
-        $upgradeWizardsService = new UpgradeWizardsService();
-        $wizardsDone = $upgradeWizardsService->listOfWizardsDoneInRegistry();
-        $rowUpdatersDone = $upgradeWizardsService->listOfRowUpdatersDoneInRegistry();
-
-        $messages = new FlashMessageQueue('install');
-        if (empty($wizardsDone) && empty($rowUpdatersDone)) {
-            $messages->enqueue(new FlashMessage(
-                '',
-                'No wizards are marked as done'
-            ));
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messages,
-            'wizardsDone' => $wizardsDone,
-            'rowUpdatersDone' => $rowUpdatersDone,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsExecute.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsExecute.php
deleted file mode 100644 (file)
index 2cd0c0c..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Install\Service\UpgradeWizardsService;
-
-/**
- * Execute a specific upgrade wizard
- */
-class UpgradeWizardsExecute extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        // ext_localconf, db and ext_tables must be loaded for the updates :(
-        $this->loadExtLocalconfDatabaseAndExtTables();
-
-        $upgradeWizardsService = new UpgradeWizardsService();
-
-        $identifier = $this->postValues['identifier'];
-        $messages = $upgradeWizardsService->executeWizard($identifier);
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messages,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsInput.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsInput.php
deleted file mode 100644 (file)
index dd2626d..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Install\Service\UpgradeWizardsService;
-
-/**
- * Get user input of a specific upgrade wizard
- */
-class UpgradeWizardsInput extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        // ext_localconf, db and ext_tables must be loaded for the updates :(
-        $this->loadExtLocalconfDatabaseAndExtTables();
-
-        $upgradeWizardsService = new UpgradeWizardsService();
-
-        $identifier = $this->postValues['identifier'];
-        $result = $upgradeWizardsService->getWizardUserInput($identifier);
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => [],
-            'userInput' => $result,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsList.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsList.php
deleted file mode 100644 (file)
index 307b14a..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Install\Service\UpgradeWizardsService;
-
-/**
- * List available wizards to execute
- */
-class UpgradeWizardsList extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        // ext_localconf, db and ext_tables must be loaded for the updates :(
-        $this->loadExtLocalconfDatabaseAndExtTables();
-
-        $upgradeWizardsService = new UpgradeWizardsService();
-        $wizards = $upgradeWizardsService->getUpgradeWizardsList();
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => [],
-            'wizards' => $wizards,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsMarkUndone.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsMarkUndone.php
deleted file mode 100644 (file)
index 601c7b0..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Install\Service\UpgradeWizardsService;
-
-/**
- * Mark a wizard as undone in registry. Can be either a
- * casual wizard, or a "row updater" wizard.
- */
-class UpgradeWizardsMarkUndone extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        $this->loadExtLocalconfDatabaseAndExtTables();
-
-        $wizardToBeMarkedAsUndoneIdentifier = $this->postValues['identifier'];
-        $upgradeWizardsService = new UpgradeWizardsService();
-        $result = $upgradeWizardsService->markWizardUndoneInRegistry($wizardToBeMarkedAsUndoneIdentifier);
-
-        $messages = new FlashMessageQueue('install');
-        if ($result) {
-            $messages->enqueue(new FlashMessage(
-                '',
-                'Wizard has been marked undone'
-            ));
-        } else {
-            $messages->enqueue(new FlashMessage(
-                '',
-                'Wizard has not been marked undone',
-                FlashMessage::ERROR
-            ));
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messages,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsSilentUpgrades.php b/typo3/sysext/install/Classes/Controller/Action/Ajax/UpgradeWizardsSilentUpgrades.php
deleted file mode 100644 (file)
index 3c0317b..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Ajax;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Install\Service\UpgradeWizardsService;
-
-/**
- * Perform "silent" wizard upgrades on first opening of the card
- */
-class UpgradeWizardsSilentUpgrades extends AbstractAjaxAction
-{
-    /**
-     * Executes the action
-     *
-     * @return array Rendered content
-     */
-    protected function executeAction(): array
-    {
-        // ext_localconf, db and ext_tables must be loaded for the updates :(
-        $this->loadExtLocalconfDatabaseAndExtTables();
-
-        // Perform silent cache framework table upgrade
-        $upgradeWizardsService = new UpgradeWizardsService();
-        $statements = $upgradeWizardsService->silentCacheFrameworkTableSchemaMigration();
-
-        $messages = new FlashMessageQueue('install');
-        if (!empty($statements)) {
-            $messages->enqueue(new FlashMessage(
-                '',
-                'Created some database cache tables.'
-            ));
-        }
-
-        $this->view->assignMultiple([
-            'success' => true,
-            'status' => $messages,
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Common/FirstInstallAction.php b/typo3/sysext/install/Classes/Controller/Action/Common/FirstInstallAction.php
deleted file mode 100644 (file)
index 0812d90..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-namespace TYPO3\CMS\Install\Controller\Action\Common;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Install\Controller\Action;
-
-/**
- * Welcome page
- */
-class FirstInstallAction extends Action\AbstractAction
-{
-    /**
-     * Handle this action
-     *
-     * @return string content
-     */
-    public function executeAction()
-    {
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Common/InstallToolDisabledAction.php b/typo3/sysext/install/Classes/Controller/Action/Common/InstallToolDisabledAction.php
deleted file mode 100644 (file)
index bf93c63..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-namespace TYPO3\CMS\Install\Controller\Action\Common;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Install\Controller\Action;
-
-/**
- * Welcome page
- */
-class InstallToolDisabledAction extends Action\AbstractAction
-{
-    /**
-     * Executes the action
-     *
-     * @return string Rendered content
-     */
-    protected function executeAction()
-    {
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Common/InstallToolPasswordNotSetAction.php b/typo3/sysext/install/Classes/Controller/Action/Common/InstallToolPasswordNotSetAction.php
deleted file mode 100644 (file)
index 98bc066..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-namespace TYPO3\CMS\Install\Controller\Action\Common;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Install\Controller\Action;
-
-/**
- * Welcome page
- */
-class InstallToolPasswordNotSetAction extends Action\AbstractAction
-{
-    /**
-     * Executes the action
-     *
-     * @return string Rendered content
-     */
-    protected function executeAction()
-    {
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Common/LoginForm.php b/typo3/sysext/install/Classes/Controller/Action/Common/LoginForm.php
deleted file mode 100644 (file)
index ca6ad8f..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-namespace TYPO3\CMS\Install\Controller\Action\Common;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Install\Controller\Action;
-
-/**
- * Show login form
- */
-class LoginForm extends Action\AbstractAction
-{
-    /**
-     * Executes the action
-     *
-     * @return string Rendered content
-     */
-    protected function executeAction()
-    {
-        $this->view->assign('messages', $this->messages);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Step/AbstractStepAction.php b/typo3/sysext/install/Classes/Controller/Action/Step/AbstractStepAction.php
deleted file mode 100644 (file)
index e0e0992..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-<?php
-namespace TYPO3\CMS\Install\Controller\Action\Step;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Install\Controller\Action\AbstractAction;
-
-/**
- * General purpose Step controller action
- */
-abstract class AbstractStepAction extends AbstractAction implements StepInterface
-{
-    /**
-     * @var int Current step position
-     */
-    protected $currentStep = 0;
-
-    /**
-     * @var int Total number of available steps
-     */
-    protected $totalSteps = 0;
-
-    /**
-     * Tell the action which position it has in the list of actions
-     *
-     * @param int $current The current position
-     * @param int $total The total number of steps
-     */
-    public function setStepsCounter($current, $total)
-    {
-        $this->currentStep = $current;
-        $this->totalSteps = $total;
-    }
-
-    /**
-     * Gets current position
-     *
-     * @return int
-     */
-    public function getCurrentStep()
-    {
-        return $this->currentStep;
-    }
-
-    /**
-     * Gets total steps
-     *
-     * @return int
-     */
-    public function getTotalSteps()
-    {
-        return $this->totalSteps;
-    }
-
-    /**
-     * Define the steps to the view.
-     */
-    protected function assignSteps()
-    {
-        $steps = [];
-        $currentStep = $this->getCurrentStep();
-        $totalSteps = $this->getTotalSteps();
-        for ($i = 1; $i <= $totalSteps; $i++) {
-            $class = '';
-            if ($i == $currentStep) {
-                $class = 'cur';
-            } elseif ($i < $currentStep) {
-                $class = 'prev';
-            }
-            $steps[] = [
-                'number' => $i,
-                'class' => $class,
-                'total' => $totalSteps,
-                'percent' => floor((100 * $i) / $totalSteps)
-            ];
-        }
-        $this->view->assign('steps', $steps);
-        $this->view->assign('currentStep', $steps[$currentStep-1]);
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Step/DatabaseConnect.php b/typo3/sysext/install/Classes/Controller/Action/Step/DatabaseConnect.php
deleted file mode 100644 (file)
index b979908..0000000
+++ /dev/null
@@ -1,339 +0,0 @@
-<?php
-namespace TYPO3\CMS\Install\Controller\Action\Step;
-
-/*
- * 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!
- */
-
-use Doctrine\DBAL\DBALException;
-use Doctrine\DBAL\DriverManager;
-use TYPO3\CMS\Core\Configuration\ConfigurationManager;
-use TYPO3\CMS\Core\Database\Connection;
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Database connect step:
- * - Needs execution if database credentials are not set or fail to connect
- * - Renders fields for database connection fields
- * - Sets database credentials in LocalConfiguration
- */
-class DatabaseConnect extends AbstractStepAction
-{
-    /**
-     * Execute database step:
-     * - Set database connect credentials in LocalConfiguration
-     *
-     * @return FlashMessage[]
-     */
-    public function execute()
-    {
-        $messages = [];
-        $postValues = $this->postValues['values'];
-        $defaultConnectionSettings = [];
-
-        if ($postValues['availableSet'] === 'configurationFromEnvironment') {
-            $defaultConnectionSettings = $this->getConfigurationFromEnvironment();
-        } else {
-            if (isset($postValues['driver'])) {
-                $validDrivers = [
-                    'mysqli',
-                    'pdo_mysql',
-                    'pdo_pgsql',
-                    'mssql',
-                ];
-                if (in_array($postValues['driver'], $validDrivers, true)) {
-                    $defaultConnectionSettings['driver'] = $postValues['driver'];
-                } else {
-                    $messages[] = new FlashMessage(
-                        'Given driver must be one of ' . implode(', ', $validDrivers),
-                        'Database driver unknown',
-                        FlashMessage::ERROR
-                    );
-                }
-            }
-            if (isset($postValues['username'])) {
-                $value = $postValues['username'];
-                if (strlen($value) <= 50) {
-                    $defaultConnectionSettings['user'] = $value;
-                } else {
-                    $messages[] = new FlashMessage(
-                        'Given username must be shorter than fifty characters.',
-                        'Database username not valid',
-                        FlashMessage::ERROR
-                    );
-                }
-            }
-            if (isset($postValues['password'])) {
-                $value = $postValues['password'];
-                if (strlen($value) <= 50) {
-                    $defaultConnectionSettings['password'] = $value;
-                } else {
-                    $messages[] = new FlashMessage(
-                        'Given password must be shorter than fifty characters.',
-                        'Database password not valid',
-                        FlashMessage::ERROR
-                    );
-                }
-            }
-            if (isset($postValues['host'])) {
-                $value = $postValues['host'];
-                if (preg_match('/^[a-zA-Z0-9_\\.-]+(:.+)?$/', $value) && strlen($value) <= 255) {
-                    $defaultConnectionSettings['host'] = $value;
-                } else {
-                    $messages[] = new FlashMessage(
-                        'Given host is not alphanumeric (a-z, A-Z, 0-9 or _-.:) or longer than 255 characters.',
-                        'Database host not valid',
-                        FlashMessage::ERROR
-                    );
-                }
-            }
-            if (isset($postValues['port']) && $postValues['host'] !== 'localhost') {
-                $value = $postValues['port'];
-                if (preg_match('/^[0-9]+(:.+)?$/', $value) && $value > 0 && $value <= 65535) {
-                    $defaultConnectionSettings['port'] = (int)$value;
-                } else {
-                    $messages[] = new FlashMessage(
-                        'Given port is not numeric or within range 1 to 65535.',
-                        'Database port not valid',
-                        FlashMessage::ERROR
-                    );
-                }
-            }
-            if (isset($postValues['socket']) && $postValues['socket'] !== '') {
-                if (@file_exists($postValues['socket'])) {
-                    $defaultConnectionSettings['unix_socket'] = $postValues['socket'];
-                } else {
-                    $messages[] = new FlashMessage(
-                        'Given socket location does not exist on server.',
-                        'Socket does not exist',
-                        FlashMessage::ERROR
-                    );
-                }
-            }
-            if (isset($postValues['database'])) {
-                $value = $postValues['database'];
-                if (strlen($value) <= 50) {
-                    $defaultConnectionSettings['dbname'] = $value;
-                } else {
-                    $messages[] = new FlashMessage(
-                        'Given database name must be shorter than fifty characters.',
-                        'Database name not valid',
-                        FlashMessage::ERROR
-                    );
-                }
-            }
-        }
-
-        if (!empty($defaultConnectionSettings)) {
-            // Test connection settings and write to config if connect is successful
-            try {
-                $connectionParams = $defaultConnectionSettings;
-                $connectionParams['wrapperClass'] = Connection::class;
-                $connectionParams['charset'] = 'utf-8';
-                DriverManager::getConnection($connectionParams)->ping();
-            } catch (DBALException $e) {
-                $messages[] = new FlashMessage(
-                    'Connecting to the database with given settings failed: ' . $e->getMessage(),
-                    'Database connect not successful',
-                    FlashMessage::ERROR
-                );
-            }
-            $localConfigurationPathValuePairs = [];
-            foreach ($defaultConnectionSettings as $settingsName => $value) {
-                $localConfigurationPathValuePairs['DB/Connections/Default/' . $settingsName] = $value;
-            }
-            $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
-            // Remove full default connection array
-            $configurationManager->removeLocalConfigurationKeysByPath([ 'DB/Connections/Default' ]);
-            // Write new values
-            $configurationManager->setLocalConfigurationValuesByPathValuePairs($localConfigurationPathValuePairs);
-        }
-
-        return $messages;
-    }
-
-    /**
-     * Step needs to be executed if database connection is not successful.
-     *
-     * @throws \TYPO3\CMS\Install\Controller\Exception\RedirectException
-     * @return bool
-     */
-    public function needsExecution()
-    {
-        if ($this->isConnectSuccessful() && $this->isConfigurationComplete()) {
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * Executes the step
-     *
-     * @return string Rendered content
-     */
-    protected function executeAction()
-    {
-        $hasAtLeastOneOption = false;
-        $activeAvailableOption = '';
-        if (extension_loaded('mysqli')) {
-            $hasAtLeastOneOption = true;
-            $this->view->assign('hasMysqliManualConfiguration', true);
-            $mysqliManualConfigurationOptions = [
-                'username' => $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['user'] ?? '',
-                'password' => $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['password'] ?? '',
-                'port' => $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['port'] ?? 3306,
-            ];
-            $host = $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['host'] ?? '127.0.0.1';
-            if ($host === 'localhost') {
-                $host = '127.0.0.1';
-            }
-            $mysqliManualConfigurationOptions['host'] = $host;
-            $this->view->assign('mysqliManualConfigurationOptions', $mysqliManualConfigurationOptions);
-            $activeAvailableOption = 'mysqliManualConfiguration';
-
-            $this->view->assign('hasMysqliSocketManualConfiguration', true);
-            $this->view->assign(
-                'mysqliSocketManualConfigurationOptions',
-                [
-                    'username' => $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['user'] ?? '',
-                    'password' => $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['password'] ?? '',
-                    'socket' => $this->getConfiguredMysqliSocket(),
-                ]
-            );
-            if ($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['driver'] === 'mysqli'
-                && $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['host'] === 'localhost') {
-                $activeAvailableOption = 'mysqliSocketManualConfiguration';
-            }
-        }
-        if (extension_loaded('pdo_pgsql')) {
-            $hasAtLeastOneOption = true;
-            $this->view->assign('hasPostgresManualConfiguration', true);
-            $this->view->assign(
-                'postgresManualConfigurationOptions',
-                [
-                    'username' => $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['user'] ?? '',
-                    'password' => $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['password'] ?? '',
-                    'host' => $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['host'] ?? '127.0.0.1',
-                    'port' => $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['port'] ?? 5432,
-                    'database' => $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['dbname'] ?? '',
-                ]
-            );
-            if ($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['driver'] === 'pdo_pgsql') {
-                $activeAvailableOption = 'postgresManualConfiguration';
-            }
-        }
-
-        if (!empty($this->getConfigurationFromEnvironment())) {
-            $hasAtLeastOneOption = true;
-            $activeAvailableOption = 'configurationFromEnvironment';
-            $this->view->assign('hasConfigurationFromEnvironment', true);
-        }
-
-        $this->view->assign('hasAtLeastOneOption', $hasAtLeastOneOption);
-        $this->view->assign('activeAvailableOption', $activeAvailableOption);
-
-        $this->assignSteps();
-
-        return $this->view->render();
-    }
-
-    /**
-     * Test connection with given credentials
-     *
-     * @return bool true if connect was successful
-     */
-    protected function isConnectSuccessful()
-    {
-        return empty($this->isConnectSuccessfulWithExceptionMessage());
-    }
-
-    /**
-     * Test connection with given credentials and return exception message if exception trown
-     *
-     * @return string
-     */
-    protected function isConnectSuccessfulWithExceptionMessage(): string
-    {
-        try {
-            GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionByName('Default')->ping();
-        } catch (DBALException $e) {
-            return $e->getMessage();
-        }
-        return '';
-    }
-
-    /**
-     * Check LocalConfiguration.php for required database settings:
-     * - 'username' and 'password' are mandatory, but may be empty
-     *
-     * @return bool TRUE if required settings are present
-     */
-    protected function isConfigurationComplete()
-    {
-        $configurationComplete = true;
-        if (!isset($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['user'])) {
-            $configurationComplete = false;
-        }
-        if (!isset($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['password'])) {
-            $configurationComplete = false;
-        }
-        return $configurationComplete;
-    }
-
-    /**
-     * Returns configured socket, if set.
-     *
-     * @return string
-     */
-    protected function getConfiguredMysqliSocket()
-    {
-        $socket = $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['unix_socket'] ?? '';
-        if ($socket === '') {
-            // If no configured socket, use default php socket
-            $defaultSocket = (string)ini_get('mysqli.default_socket');
-            if ($defaultSocket !== '') {
-                $socket = $defaultSocket;
-            }
-        }
-        return $socket;
-    }
-
-    /**
-     * Try to fetch db credentials from a .env file and see if connect works
-     *
-     * @return array Empty array if no file is found or connect is not successful, else working credentials
-     */
-    protected function getConfigurationFromEnvironment(): array
-    {
-        $envCredentials = [];
-        foreach (['driver', 'host', 'user', 'password', 'port', 'dbname', 'unix_socket'] as $value) {
-            $envVar = 'TYPO3_INSTALL_DB_' . strtoupper($value);
-            if (getenv($envVar) !== false) {
-                $envCredentials[$value] = getenv($envVar);
-            }
-        }
-        if (!empty($envCredentials)) {
-            $connectionParams = $envCredentials;
-            $connectionParams['wrapperClass'] = Connection::class;
-            $connectionParams['charset'] = 'utf-8';
-            try {
-                DriverManager::getConnection($connectionParams)->ping();
-                return $envCredentials;
-            } catch (DBALException $e) {
-                return [];
-            }
-        }
-        return [];
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Step/DatabaseData.php b/typo3/sysext/install/Classes/Controller/Action/Step/DatabaseData.php
deleted file mode 100644 (file)
index cc25a68..0000000
+++ /dev/null
@@ -1,209 +0,0 @@
-<?php
-namespace TYPO3\CMS\Install\Controller\Action\Step;
-
-/*
- * 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!
- */
-
-use Doctrine\DBAL\DBALException;
-use TYPO3\CMS\Core\Configuration\ConfigurationManager;
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Database\Schema\Exception\StatementException;
-use TYPO3\CMS\Core\Database\Schema\SchemaMigrator;
-use TYPO3\CMS\Core\Database\Schema\SqlReader;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Populate base tables, insert admin user, set install tool password
- */
-class DatabaseData extends AbstractStepAction
-{
-    /**
-     * Import tables and data, create admin user, create install tool password
-     *
-     * @return FlashMessage[]
-     */
-    public function execute()
-    {
-        $messages = [];
-
-        /** @var ConfigurationManager $configurationManager */
-        $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
-
-        $postValues = $this->postValues['values'];
-
-        $username = (string)$postValues['username'] !== '' ? $postValues['username'] : 'admin';
-
-        // Check password and return early if not good enough
-        $password = $postValues['password'];
-        if (strlen($password) < 8) {
-            $messages[] = new FlashMessage(
-                'You are setting an important password here! It gives an attacker full control over your instance if cracked.'
-                    . ' It should be strong (include lower and upper case characters, special characters and numbers) and must be at least eight characters long.',
-                'Administrator password not secure enough!',
-                FlashMessage::ERROR
-            );
-            return $messages;
-        }
-
-        // Set site name
-        if (!empty($postValues['sitename'])) {
-            $configurationManager->setLocalConfigurationValueByPath('SYS/sitename', $postValues['sitename']);
-        }
-
-        try {
-            $messages = $this->importDatabaseData();
-            if (!empty($messages)) {
-                return $messages;
-            }
-        } catch (StatementException $exception) {
-            $messages[] = new FlashMessage(
-                'Error detected in SQL statement:' . LF . $exception->getMessage(),
-                'Import of database data could not be performed',
-                FlashMessage::ERROR
-            );
-            return $messages;
-        }
-
-        // Insert admin user
-        $adminUserFields = [
-            'username' => $username,
-            'password' => $this->getHashedPassword($password),
-            'admin' => 1,
-            'tstamp' => $GLOBALS['EXEC_TIME'],
-            'crdate' => $GLOBALS['EXEC_TIME']
-        ];
-        $databaseConnection = GeneralUtility::makeInstance(ConnectionPool::class)
-            ->getConnectionForTable('be_users');
-        try {
-            $databaseConnection->insert('be_users', $adminUserFields);
-        } catch (DBALException $exception) {
-            $messages[] = new FlashMessage(
-                'The administrator account could not be created. The following error occurred:' . LF
-                    . $exception->getPrevious()->getMessage(),
-                'Administrator account not created!',
-                FlashMessage::ERROR
-            );
-            return $messages;
-        }
-
-        // Set password as install tool password
-        $configurationManager->setLocalConfigurationValueByPath('BE/installToolPassword', $this->getHashedPassword($password));
-
-        // Mark the initial import as done
-        $this->markImportDatabaseDone();
-
-        return $messages;
-    }
-
-    /**
-     * Step needs to be executed if there are no tables in database
-     *
-     * @return bool
-     */
-    public function needsExecution()
-    {
-        $existingTables = GeneralUtility::makeInstance(ConnectionPool::class)
-            ->getConnectionByName('Default')
-            ->getSchemaManager()
-            ->listTableNames();
-        if (empty($existingTables)) {
-            $result = true;
-        } else {
-            $result = !$this->isImportDatabaseDone();
-        }
-        return $result;
-    }
-
-    /**
-     * Executes the step
-     *
-     * @return string Rendered content
-     */
-    protected function executeAction()
-    {
-        $this->assignSteps();
-        return $this->view->render();
-    }
-
-    /**
-     * Create tables and import static rows
-     *
-     * @return FlashMessage[]
-     * @throws \Doctrine\DBAL\DBALException
-     * @throws \Doctrine\DBAL\Schema\SchemaException
-     * @throws \InvalidArgumentException
-     * @throws \RuntimeException
-     * @throws \TYPO3\CMS\Core\Database\Schema\Exception\StatementException
-     * @throws \TYPO3\CMS\Core\Database\Schema\Exception\UnexpectedSignalReturnValueTypeException
-     * @throws \TYPO3\CMS\Extbase\SignalSlot\Exception\InvalidSlotReturnException
-     * @throws \TYPO3\CMS\Extbase\SignalSlot\Exception\InvalidSlotException
-     */
-    protected function importDatabaseData()
-    {
-        // Will load ext_localconf and ext_tables. This is pretty safe here since we are
-        // in first install (database empty), so it is very likely that no extension is loaded
-        // that could trigger a fatal at this point.
-        $this->loadExtLocalconfDatabaseAndExtTables();
-
-        $sqlReader = GeneralUtility::makeInstance(SqlReader::class);
-        $sqlCode = $sqlReader->getTablesDefinitionString(true);
-
-        $schemaMigrationService = GeneralUtility::makeInstance(SchemaMigrator::class);
-        $createTableStatements = $sqlReader->getCreateTableStatementArray($sqlCode);
-
-        $results = $schemaMigrationService->install($createTableStatements);
-
-        // Only keep statements with error messages
-        $results = array_filter($results);
-        if (count($results) === 0) {
-            $insertStatements = $sqlReader->getInsertStatementArray($sqlCode);
-            $results = $schemaMigrationService->importStaticData($insertStatements);
-        }
-
-        foreach ($results as $statement => &$message) {
-            if ($message === '') {
-                unset($results[$statement]);
-                continue;
-            }
-
-            $message = new FlashMessage(
-                'Query:' . LF . ' ' . $statement . LF . 'Error:' . LF . ' ' . $message,
-                'Database query failed!',
-                FlashMessage::ERROR
-            );
-        }
-
-        return array_values($results);
-    }
-
-    /**
-     * Persist the information that the initial import has been performed
-     */
-    protected function markImportDatabaseDone()
-    {
-        GeneralUtility::makeInstance(ConfigurationManager::class)
-            ->setLocalConfigurationValueByPath('SYS/isInitialDatabaseImportDone', true);
-    }
-
-    /**
-     * Checks if the initial import has been performed
-     *
-     * @return bool
-     */
-    protected function isImportDatabaseDone()
-    {
-        return GeneralUtility::makeInstance(ConfigurationManager::class)
-            ->getConfigurationValueByPath('SYS/isInitialDatabaseImportDone');
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Step/DatabaseSelect.php b/typo3/sysext/install/Classes/Controller/Action/Step/DatabaseSelect.php
deleted file mode 100644 (file)
index eee5ae6..0000000
+++ /dev/null
@@ -1,297 +0,0 @@
-<?php
-namespace TYPO3\CMS\Install\Controller\Action\Step;
-
-/*
- * 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!
- */
-
-use Doctrine\DBAL\DBALException;
-use Doctrine\DBAL\DriverManager;
-use TYPO3\CMS\Core\Configuration\ConfigurationManager;
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Database select step.
- * This step is only rendered if database is mysql.
- */
-class DatabaseSelect extends AbstractStepAction
-{
-    /**
-     * Create database if needed, save selected db name in configuration
-     *
-     * @return FlashMessage[]
-     */
-    public function execute()
-    {
-        $postValues = $this->postValues['values'];
-        if ($postValues['type'] === 'new') {
-            $status = $this->createNewDatabase($postValues['new']);
-            if ($status->getSeverity() === FlashMessage::ERROR) {
-                return [ $status ];
-            }
-        } elseif ($postValues['type'] === 'existing' && !empty($postValues['existing'])) {
-            $status = $this->checkExistingDatabase($postValues['existing']);
-            if ($status->getSeverity() === FlashMessage::ERROR) {
-                return [ $status ];
-            }
-        } else {
-            return [
-                new FlashMessage(
-                    'You must select a database.',
-                    'No Database selected',
-                    FlashMessage::ERROR
-                ),
-            ];
-        }
-        return [];
-    }
-
-    /**
-     * Step needs to be executed if database is not set or can
-     * not be selected.
-     *
-     * @return bool
-     */
-    public function needsExecution()
-    {
-        $result = true;
-        if ((string)$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['dbname'] !== '') {
-            try {
-                $pingResult = GeneralUtility::makeInstance(ConnectionPool::class)
-                    ->getConnectionByName(ConnectionPool::DEFAULT_CONNECTION_NAME)
-                    ->ping();
-                if ($pingResult === true) {
-                    $result = false;
-                }
-            } catch (DBALException $e) {
-            }
-        }
-        return $result;
-    }
-
-    /**
-     * Executes the step
-     *
-     * @return string Rendered content
-     */
-    protected function executeAction()
-    {
-        $errors = [];
-        /** @var $configurationManager ConfigurationManager */
-        $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
-        $isInitialInstallationInProgress = $configurationManager
-            ->getConfigurationValueByPath('SYS/isInitialInstallationInProgress');
-        try {
-            $this->view->assign('databaseList', $this->getDatabaseList($isInitialInstallationInProgress));
-        } catch (\Exception $exception) {
-            $errors[] = $exception->getMessage();
-        }
-        $this->view->assign('errors', $errors);
-        $this->view->assign('isInitialInstallationInProgress', $isInitialInstallationInProgress);
-        $this->assignSteps();
-        return $this->view->render();
-    }
-
-    /**
-     * Returns list of available databases (with access-check based on username/password)
-     *
-     * @param bool $initialInstallation TRUE if first installation is in progress, FALSE if upgrading or usual access
-     * @return array List of available databases
-     */
-    protected function getDatabaseList($initialInstallation)
-    {
-        $connectionParams = $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections'][ConnectionPool::DEFAULT_CONNECTION_NAME];
-        unset($connectionParams['dbname']);
-
-        // Establishing the connection using the Doctrine DriverManager directly
-        // as we need a connection without selecting a database right away. Otherwise
-        // an invalid database name would lead to exceptions which would prevent
-        // changing the currently configured database.
-        $connection = DriverManager::getConnection($connectionParams);
-        $databaseArray = $connection->getSchemaManager()->listDatabases();
-        $connection->close();
-
-        // Remove organizational tables from database list
-        $reservedDatabaseNames = ['mysql', 'information_schema', 'performance_schema'];
-        $allPossibleDatabases = array_diff($databaseArray, $reservedDatabaseNames);
-
-        // If we are upgrading we show *all* databases the user has access to
-        if ($initialInstallation === false) {
-            return $allPossibleDatabases;
-        }
-
-        // In first installation we show all databases but disable not empty ones (with tables)
-        $databases = [];
-        foreach ($allPossibleDatabases as $databaseName) {
-            // Reestablising the connection for each database since there is no
-            // portable way to switch databases on the same Doctrine connection.
-            // Directly using the Doctrine DriverManager here to avoid messing with
-            // the $GLOBALS database configuration array.
-            $connectionParams['dbname'] = $databaseName;
-            $connection = DriverManager::getConnection($connectionParams);
-
-            $databases[] = [
-                'name' => $databaseName,
-                'tables' => count($connection->getSchemaManager()->listTableNames()),
-            ];
-            $connection->close();
-        }
-
-        return $databases;
-    }
-
-    /**
-     * Validate the database name against the lowest common denominator of valid identifiers across different DBMS
-     *
-     * @param string $databaseName
-     * @return bool
-     */
-    protected function isValidDatabaseName($databaseName)
-    {
-        return strlen($databaseName) <= 50 && preg_match('/^[a-zA-Z0-9\$_]*$/', $databaseName);
-    }
-
-    /**
-     * Retrieves the default character set of the database.
-     *
-     * @todo this function is MySQL specific. If the core has migrated to Doctrine it should be reexamined
-     * whether this function and the check in $this->checkExistingDatabase could be deleted and utf8 otherwise
-     * enforced (guaranteeing compatibility with other database servers).
-     *
-     * @param string $dbName
-     * @return string
-     */
-    protected function getDefaultDatabaseCharset(string $dbName): string
-    {
-        $connection = GeneralUtility::makeInstance(ConnectionPool::class)
-            ->getConnectionByName(ConnectionPool::DEFAULT_CONNECTION_NAME);
-        $queryBuilder = $connection->createQueryBuilder();
-        $defaultDatabaseCharset = $queryBuilder->select('DEFAULT_CHARACTER_SET_NAME')
-            ->from('information_schema.SCHEMATA')
-            ->where(
-                $queryBuilder->expr()->eq(
-                    'SCHEMA_NAME',
-                    $queryBuilder->createNamedParameter($dbName, \PDO::PARAM_STR)
-                )
-            )
-            ->setMaxResults(1)
-            ->execute()
-            ->fetchColumn();
-
-        return (string)$defaultDatabaseCharset;
-    }
-
-    /**
-     * Creates a new database on the default connection
-     *
-     * @param string $dbName name of database
-     *
-     * @return FlashMessage
-     */
-    protected function createNewDatabase($dbName)
-    {
-        if (!$this->isValidDatabaseName($dbName)) {
-            return new FlashMessage(
-                'Given database name must be shorter than fifty characters'
-                    . ' and consist solely of basic latin letters (a-z), digits (0-9), dollar signs ($)'
-                    . ' and underscores (_).',
-                'Database name not valid',
-                FlashMessage::ERROR
-            );
-        }
-
-        try {
-            GeneralUtility::makeInstance(ConnectionPool::class)
-                ->getConnectionByName(ConnectionPool::DEFAULT_CONNECTION_NAME)
-                ->getSchemaManager()
-                ->createDatabase($dbName);
-            GeneralUtility::makeInstance(ConfigurationManager::class)
-                ->setLocalConfigurationValueByPath('DB/Connections/Default/dbname', $dbName);
-        } catch (DBALException $e) {
-            return new FlashMessage(
-                'Database with name "' . $dbName . '" could not be created.'
-                    . ' Either your database name contains a reserved keyword or your database'
-                    . ' user does not have sufficient permissions to create it or the database already exists.'
-                    . ' Please choose an existing (empty) database, choose another name or contact administration.',
-                'Unable to create database',
-                FlashMessage::ERROR
-            );
-        }
-        return new FlashMessage(
-            '',
-            'Database created'
-        );
-    }
-
-    /**
-     * Checks whether an existing database on the default connection
-     * can be used for a TYPO3 installation. The database name is only
-     * persisted to the local configuration if the database is empty.
-     *
-     * @param string $dbName name of the database
-     * @return FlashMessage
-     */
-    protected function checkExistingDatabase($dbName)
-    {
-        $result = new FlashMessage('');
-        $localConfigurationPathValuePairs = [];
-        $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
-        $isInitialInstallation = $configurationManager
-            ->getConfigurationValueByPath('SYS/isInitialInstallationInProgress');
-
-        $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections'][ConnectionPool::DEFAULT_CONNECTION_NAME]['dbname'] = $dbName;
-        try {
-            $connection = GeneralUtility::makeInstance(ConnectionPool::class)
-                ->getConnectionByName(ConnectionPool::DEFAULT_CONNECTION_NAME);
-
-            if ($isInitialInstallation && !empty($connection->getSchemaManager()->listTableNames())) {
-                $result = new FlashMessage(
-                    sprintf('Cannot use database "%s"', $dbName)
-                        . ', because it already contains tables. '
-                        . 'Please select a different database or choose to create one!',
-                    'Selected database is not empty!',
-                    FlashMessage::ERROR
-                );
-            }
-        } catch (\Exception $e) {
-            $result = new FlashMessage(
-                sprintf('Could not connect to database "%s"', $dbName)
-                    . '! Make sure it really exists and your database user has the permissions to select it!',
-                'Could not connect to selected database!',
-                FlashMessage::ERROR
-            );
-        }
-
-        if ($result->getSeverity() === FlashMessage::OK) {
-            $localConfigurationPathValuePairs['DB/Connections/Default/dbname'] = $dbName;
-        }
-
-        // check if database charset is utf-8 - also allow utf8mb4
-        $defaultDatabaseCharset = $this->getDefaultDatabaseCharset($dbName);
-        if (substr($defaultDatabaseCharset, 0, 4) !== 'utf8') {
-            $result = new FlashMessage(
-                'Your database uses character set "' . $defaultDatabaseCharset . '", '
-                    . 'but only "utf8" is supported with TYPO3. You probably want to change this before proceeding.',
-                'Invalid Charset',
-                FlashMessage::ERROR
-            );
-        }
-
-        if ($result->getSeverity() === FlashMessage::OK && !empty($localConfigurationPathValuePairs)) {
-            $configurationManager->setLocalConfigurationValuesByPathValuePairs($localConfigurationPathValuePairs);
-        }
-
-        return $result;
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Step/DefaultConfiguration.php b/typo3/sysext/install/Classes/Controller/Action/Step/DefaultConfiguration.php
deleted file mode 100644 (file)
index baed3a9..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-<?php
-namespace TYPO3\CMS\Install\Controller\Action\Step;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Core\Bootstrap;
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Registry;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Service\EnableFileService;
-
-/**
- * Set production defaults
- */
-class DefaultConfiguration extends AbstractStepAction
-{
-    /**
-     * Set defaults of auto configuration, mark installation as completed
-     *
-     * @return FlashMessage[]
-     */
-    public function execute()
-    {
-        /** @var \TYPO3\CMS\Install\Configuration\FeatureManager $featureManager */
-        $featureManager = GeneralUtility::makeInstance(\TYPO3\CMS\Install\Configuration\FeatureManager::class);
-        // Get best matching configuration presets
-        $configurationValues = $featureManager->getBestMatchingConfigurationForAllFeatures();
-        $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
-
-        // let the admin user redirect to the distributions page on first login
-        switch ($this->postValues['values']['sitesetup']) {
-            // Update the admin backend user to show the distribution management on login
-            case 'loaddistribution':
-                $adminUserFirstLogin = [
-                    'startModuleOnFirstLogin' => 'tools_ExtensionmanagerExtensionmanager->tx_extensionmanager_tools_extensionmanagerextensionmanager%5Baction%5D=distributions&tx_extensionmanager_tools_extensionmanagerextensionmanager%5Bcontroller%5D=List',
-                    'ucSetByInstallTool' => '1',
-                ];
-                $connectionPool->getConnectionForTable('be_users')->update(
-                    'be_users',
-                    ['uc' => serialize($adminUserFirstLogin)],
-                    ['admin' => 1]
-                );
-            break;
-
-            // Create a page with UID 1 and PID1 and fluid_styled_content for page TS config, respect ownership
-            case 'createsite':
-                $databaseConnectionForPages = $connectionPool->getConnectionForTable('pages');
-                $databaseConnectionForPages->insert(
-                    'pages',
-                    [
-                        'pid' => 0,
-                        'crdate' => time(),
-                        'cruser_id' => 1,
-                        'tstamp' => time(),
-                        'title' => 'Home',
-                        'doktype' => 1,
-                        'is_siteroot' => 1,
-                        'perms_userid' => 1,
-                        'perms_groupid' => 1,
-                        'perms_user' => 32,
-                        'perms_group' => 32,
-                        'perms_everybody' => 1
-                    ]
-                );
-                $pageUid = $databaseConnectionForPages->lastInsertId('pages');
-
-                // add a root sys_template with fluid_styled_content and a default PAGE typoscript snippet
-                $connectionPool->getConnectionForTable('sys_template')->insert(
-                    'sys_template',
-                    [
-                        'pid' => $pageUid,
-                        'crdate' => time(),
-                        'cruser_id' => 1,
-                        'tstamp' => time(),
-                        'title' => 'Main TypoScript Rendering',
-                        'sitetitle' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'],
-                        'root' => 1,
-                        'clear' => 1,
-                        'include_static_file' => 'EXT:fluid_styled_content/Configuration/TypoScript/,EXT:fluid_styled_content/Configuration/TypoScript/Styling/',
-                        'constants' => '',
-                        'config' => 'page = PAGE
-page.10 = TEXT
-page.10.value (
-   <div style="width: 800px; margin: 15% auto;">
-      <div style="width: 300px;">
-        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 42"><path d="M60.2 14.4v27h-3.8v-27h-6.7v-3.3h17.1v3.3h-6.6zm20.2 12.9v14h-3.9v-14l-7.7-16.2h4.1l5.7 12.2 5.7-12.2h3.9l-7.8 16.2zm19.5 2.6h-3.6v11.4h-3.8V11.1s3.7-.3 7.3-.3c6.6 0 8.5 4.1 8.5 9.4 0 6.5-2.3 9.7-8.4 9.7m.4-16c-2.4 0-4.1.3-4.1.3v12.6h4.1c2.4 0 4.1-1.6 4.1-6.3 0-4.4-1-6.6-4.1-6.6m21.5 27.7c-7.1 0-9-5.2-9-15.8 0-10.2 1.9-15.1 9-15.1s9 4.9 9 15.1c.1 10.6-1.8 15.8-9 15.8m0-27.7c-3.9 0-5.2 2.6-5.2 12.1 0 9.3 1.3 12.4 5.2 12.4 3.9 0 5.2-3.1 5.2-12.4 0-9.4-1.3-12.1-5.2-12.1m19.9 27.7c-2.1 0-5.3-.6-5.7-.7v-3.1c1 .2 3.7.7 5.6.7 2.2 0 3.6-1.9 3.6-5.2 0-3.9-.6-6-3.7-6H138V24h3.1c3.5 0 3.7-3.6 3.7-5.3 0-3.4-1.1-4.8-3.2-4.8-1.9 0-4.1.5-5.3.7v-3.2c.5-.1 3-.7 5.2-.7 4.4 0 7 1.9 7 8.3 0 2.9-1 5.5-3.3 6.3 2.6.2 3.8 3.1 3.8 7.3 0 6.6-2.5 9-7.3 9"/><path fill="#FF8700" d="M31.7 28.8c-.6.2-1.1.2-1.7.2-5.2 0-12.9-18.2-12.9-24.3 0-2.2.5-3 1.3-3.6C12 1.9 4.3 4.2 1.9 7.2 1.3 8 1 9.1 1 10.6c0 9.5 10.1 31 17.3 31 3.3 0 8.8-5.4 13.4-12.8M28.4.5c6.6 0 13.2 1.1 13.2 4.8 0 7.6-4.8 16.7-7.2 16.7-4.4 0-9.9-12.1-9.9-18.2C24.5 1 25.6.5 28.4.5"/></svg>
-      </div>
-      <h4 style="font-family: sans-serif;">Welcome to a default website made with <a href="https://typo3.org">TYPO3</a></h4>
-   </div>
-)
-page.100 =< styles.content.get',
-                        'description' => 'This is an Empty Site Package TypoScript template.
-
-For each website you need a TypoScript template on the main page of your website (on the top level). For better maintenance all TypoScript should be extracted into external files via <INCLUDE_TYPOSCRIPT: source="FILE:EXT:site_myproject/Configuration/TypoScript/setup.typoscript">.'
-                    ]
-                );
-            break;
-        }
-
-        // Setting SYS/isInitialInstallationInProgress to FALSE marks this instance installation as complete
-        $configurationValues['SYS/isInitialInstallationInProgress'] = false;
-
-        // Mark upgrade wizards as done
-        $this->loadExtLocalconfDatabaseAndExtTables();
-        if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'])) {
-            $registry = GeneralUtility::makeInstance(Registry::class);
-            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'] as $updateClassName) {
-                $registry->set('installUpdate', $updateClassName, 1);
-            }
-        }
-
-        /** @var $configurationManager \TYPO3\CMS\Core\Configuration\ConfigurationManager */
-        $configurationManager = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Configuration\ConfigurationManager::class);
-        $configurationManager->setLocalConfigurationValuesByPathValuePairs($configurationValues);
-
-        /** @var \TYPO3\CMS\Install\Service\SessionService $session */
-        $session = GeneralUtility::makeInstance(\TYPO3\CMS\Install\Service\SessionService::class);
-        $session->destroySession();
-
-        /** @var $formProtection \TYPO3\CMS\Core\FormProtection\InstallToolFormProtection */
-        $formProtection = \TYPO3\CMS\Core\FormProtection\FormProtectionFactory::get(
-            \TYPO3\CMS\Core\FormProtection\InstallToolFormProtection::class
-        );
-        $formProtection->clean();
-
-        if (EnableFileService::installToolEnableFileExists() && !EnableFileService::isInstallToolEnableFilePermanent()) {
-            EnableFileService::removeInstallToolEnableFile();
-        }
-
-        \TYPO3\CMS\Core\Utility\HttpUtility::redirect(GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . 'index.php', \TYPO3\CMS\Core\Utility\HttpUtility::HTTP_STATUS_303);
-    }
-
-    /**
-     * Step needs to be executed if 'isInitialInstallationInProgress' is set to TRUE in LocalConfiguration
-     *
-     * @return bool
-     */
-    public function needsExecution()
-    {
-        $result = false;
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['isInitialInstallationInProgress'])
-            && $GLOBALS['TYPO3_CONF_VARS']['SYS']['isInitialInstallationInProgress'] === true
-        ) {
-            $result = true;
-        }
-        return $result;
-    }
-
-    /**
-     * Executes the step
-     *
-     * @return string Rendered content
-     */
-    protected function executeAction()
-    {
-        $this->assignSteps();
-        $this->view->assign('composerMode', Bootstrap::usesComposerClassLoading());
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Step/EnvironmentAndFolders.php b/typo3/sysext/install/Classes/Controller/Action/Step/EnvironmentAndFolders.php
deleted file mode 100644 (file)
index cb66042..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-<?php
-namespace TYPO3\CMS\Install\Controller\Action\Step;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Configuration\ConfigurationManager;
-use TYPO3\CMS\Core\Core\Bootstrap;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Core\Package\PackageInterface;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\FolderStructure\DefaultFactory;
-use TYPO3\CMS\Install\Service\EnableFileService;
-use TYPO3\CMS\Install\SystemEnvironment\Check;
-use TYPO3\CMS\Install\SystemEnvironment\SetupCheck;
-
-/**
- * Very first install step:
- * - Needs execution if typo3conf/LocalConfiguration.php does not exist
- * - Renders system environment output
- * - Creates folders like typo3temp, see FolderStructure/DefaultFactory for details
- * - Creates typo3conf/LocalConfiguration.php from factory
- */
-class EnvironmentAndFolders extends AbstractStepAction
-{
-    /**
-     * Execute environment and folder step:
-     * - Create main folder structure
-     * - Create typo3conf/LocalConfiguration.php
-     *
-     * @return FlashMessage[]
-     */
-    public function execute()
-    {
-        $folderStructureFactory = GeneralUtility::makeInstance(DefaultFactory::class);
-        $structureFacade = $folderStructureFactory->getStructure();
-        $structureFixMessageQueue = $structureFacade->fix();
-        $errorsFromStructure = $structureFixMessageQueue->getAllMessages(FlashMessage::ERROR);
-
-        if (@is_dir(PATH_typo3conf)) {
-            $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
-            $configurationManager->createLocalConfigurationFromFactoryConfiguration();
-
-            // Create a PackageStates.php with all packages activated marked as "part of factory default"
-            if (!file_exists(PATH_typo3conf . 'PackageStates.php')) {
-                /** @var \TYPO3\CMS\Core\Package\FailsafePackageManager $packageManager */
-                $packageManager = Bootstrap::getInstance()->getEarlyInstance(\TYPO3\CMS\Core\Package\PackageManager::class);
-                $packages = $packageManager->getAvailablePackages();
-                foreach ($packages as $package) {
-                    if ($package instanceof PackageInterface
-                        && $package->isPartOfFactoryDefault()
-                    ) {
-                        $packageManager->activatePackage($package->getPackageKey());
-                    }
-                }
-                $packageManager->forceSortAndSavePackageStates();
-            }
-
-            // Create enable install tool file after typo3conf & LocalConfiguration were created
-            $installToolService = GeneralUtility::makeInstance(EnableFileService::class);
-            $installToolService->removeFirstInstallFile();
-            $installToolService->createInstallToolEnableFile();
-        }
-
-        return $errorsFromStructure;
-    }
-
-    /**
-     * Step needs to be executed if LocalConfiguration file does not exist.
-     *
-     * @return bool
-     */
-    public function needsExecution()
-    {
-        if (@is_file(PATH_typo3conf . 'LocalConfiguration.php')) {
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * Executes the step
-     *
-     * @return string Rendered content
-     */
-    protected function executeAction()
-    {
-        $systemCheckMessageQueue = new FlashMessageQueue('install');
-        $checkMessages = (new Check())->getStatus();
-        foreach ($checkMessages as $message) {
-            $systemCheckMessageQueue->enqueue($message);
-        }
-        $setupCheckMessages = (new SetupCheck())->getStatus();
-        foreach ($setupCheckMessages as $message) {
-            $systemCheckMessageQueue->enqueue($message);
-        }
-        $environmentStatus = [
-            'error' => $systemCheckMessageQueue->getAllMessages(FlashMessage::ERROR),
-            'warning' => $systemCheckMessageQueue->getAllMessages(FlashMessage::WARNING),
-        ];
-
-        $folderStructureFactory = GeneralUtility::makeInstance(DefaultFactory::class);
-        $structureFacade = $folderStructureFactory->getStructure();
-        $structureMessageQueue = $structureFacade->getStatus();
-        $structureErrors = $structureMessageQueue->getAllMessages(FlashMessage::ERROR);
-
-        if (!empty($environmentStatus['error']) || !empty($environmentStatus['warning']) || !empty($structureErrors)) {
-            $this->view->assign('errorsOrWarningsFromStatus', true);
-        }
-
-        $this->view->assignMultiple([
-            'environmentStatus' => $environmentStatus,
-            'structureErrors' => $structureErrors,
-        ]);
-
-        $this->assignSteps();
-
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Step/StepInterface.php b/typo3/sysext/install/Classes/Controller/Action/Step/StepInterface.php
deleted file mode 100644 (file)
index ef3f1cd..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-namespace TYPO3\CMS\Install\Controller\Action\Step;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-
-/**
- * Interface implemented by single steps
- */
-interface StepInterface
-{
-    /**
-     * Execute a step
-     *
-     * @return FlashMessage[]
-     */
-    public function execute();
-
-    /**
-     * Whether this step must be executed
-     *
-     * @return bool TRUE if this step needs to be executed
-     */
-    public function needsExecution();
-
-    /**
-     * Tell the action which position it has in the list of actions
-     *
-     * @param int $current The current position
-     * @param int $total The total number of steps
-     */
-    public function setStepsCounter($current, $total);
-
-    /**
-     * Gets current position
-     *
-     * @return int
-     */
-    public function getCurrentStep();
-
-    /**
-     * Gets total steps
-     *
-     * @return int
-     */
-    public function getTotalSteps();
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Tool/Environment.php b/typo3/sysext/install/Classes/Controller/Action/Tool/Environment.php
deleted file mode 100644 (file)
index f740add..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Tool;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\FormProtection\FormProtectionFactory;
-use TYPO3\CMS\Core\FormProtection\InstallToolFormProtection;
-use TYPO3\CMS\Core\Utility\CommandUtility;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Controller\Action;
-use TYPO3\CMS\Install\FolderStructure\DefaultPermissionsCheck;
-
-/**
- * "Environment" main controller
- */
-class Environment extends Action\AbstractAction
-{
-    /**
-     * Executes the tool
-     *
-     * @return string Rendered content
-     */
-    protected function executeAction(): string
-    {
-        $formProtection = FormProtectionFactory::get(InstallToolFormProtection::class);
-        $permissionCheck = GeneralUtility::makeInstance(DefaultPermissionsCheck::class);
-        $this->view->assignMultiple([
-            'folderStructureFilePermissionStatus' => $permissionCheck->getMaskStatus('fileCreateMask'),
-            'folderStructureDirectoryPermissionStatus' => $permissionCheck->getMaskStatus('folderCreateMask'),
-
-            'imageProcessingToken' => $formProtection->generateToken('installTool', 'imageProcessing'),
-            'imageProcessingProcessor' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor'] === 'GraphicsMagick' ? 'GraphicsMagick' : 'ImageMagick',
-            'imageProcessingEnabled' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_enabled'],
-            'imageProcessingPath' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_path'],
-            'imageProcessingVersion' => $this->determineImageMagickVersion(),
-            'imageProcessingEffects' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_effects'],
-            'imageProcessingGdlibEnabled' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib'],
-            'imageProcessingGdlibPng' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png'],
-            'imageProcessingFileFormats' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],
-
-            'mailTestToken' => $formProtection->generateToken('installTool', 'mailTest'),
-            'mailTestSenderAddress' => $this->getSenderEmailAddress(),
-
-            'systemInformationCgiDetected', GeneralUtility::isRunningOnCgiServerApi(),
-            'systemInformationDatabaseConnections' => $this->getDatabaseConnectionInformation(),
-            'systemInformationOperatingSystem' => TYPO3_OS === 'WIN' ? 'Windows' : 'Unix',
-        ]);
-        return $this->view->render();
-    }
-
-    /**
-     * Determine ImageMagick / GraphicsMagick version
-     *
-     * @return string Version
-     */
-    protected function determineImageMagickVersion(): string
-    {
-        $command = CommandUtility::imageMagickCommand('identify', '-version');
-        CommandUtility::exec($command, $result);
-        $string = $result[0];
-        $version = '';
-        if (!empty($string)) {
-            list(, $version) = explode('Magick', $string);
-            list($version) = explode(' ', trim($version));
-            $version = trim($version);
-        }
-        return $version;
-    }
-
-    /**
-     * Get sender address from configuration
-     * ['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress']
-     * If this setting is empty fall back to 'no-reply@example.com'
-     *
-     * @return string Returns an email address
-     */
-    protected function getSenderEmailAddress(): string
-    {
-        return !empty($GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'])
-            ? $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress']
-            : 'no-reply@example.com';
-    }
-
-    /**
-     * Get details about all configured database connections
-     *
-     * @return array
-     */
-    protected function getDatabaseConnectionInformation(): array
-    {
-        $connectionInfos = [];
-        $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
-        foreach ($connectionPool->getConnectionNames() as $connectionName) {
-            $connection = $connectionPool->getConnectionByName($connectionName);
-            $connectionParameters = $connection->getParams();
-            $connectionInfo = [
-                'connectionName' => $connectionName,
-                'version' => $connection->getServerVersion(),
-                'databaseName' => $connection->getDatabase(),
-                'username' => $connection->getUsername(),
-                'host' => $connection->getHost(),
-                'port' => $connection->getPort(),
-                'socket' => $connectionParameters['unix_socket'] ?? '',
-                'numberOfTables' => count($connection->getSchemaManager()->listTableNames()),
-                'numberOfMappedTables' => 0,
-            ];
-            if (isset($GLOBALS['TYPO3_CONF_VARS']['DB']['TableMapping'])
-                && is_array($GLOBALS['TYPO3_CONF_VARS']['DB']['TableMapping'])
-            ) {
-                // Count number of array keys having $connectionName as value
-                $connectionInfo['numberOfMappedTables'] = count(array_intersect(
-                    $GLOBALS['TYPO3_CONF_VARS']['DB']['TableMapping'],
-                    [$connectionName]
-                ));
-            }
-            $connectionInfos[] = $connectionInfo;
-        }
-        return $connectionInfos;
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Tool/Maintenance.php b/typo3/sysext/install/Classes/Controller/Action/Tool/Maintenance.php
deleted file mode 100644 (file)
index 3b3520b..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Tool;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\FormProtection\FormProtectionFactory;
-use TYPO3\CMS\Core\FormProtection\InstallToolFormProtection;
-use TYPO3\CMS\Core\Service\OpcodeCacheService;
-use TYPO3\CMS\Install\Controller\Action\AbstractAction;
-use TYPO3\CMS\Install\Service\Typo3tempFileService;
-
-/**
- * Handle important actions
- */
-class Maintenance extends AbstractAction
-{
-    /**
-     * "Maintenance" main page
-     *
-     * @return string Rendered content
-     */
-    protected function executeAction(): string
-    {
-        $formProtection = FormProtectionFactory::get(InstallToolFormProtection::class);
-        $this->view->assignMultiple([
-            'clearAllCacheOpcodeCaches' => (new OpcodeCacheService())->getAllActive(),
-            'clearTablesClearToken' => $formProtection->generateToken('installTool', 'clearTablesClear'),
-            'clearTypo3tempFilesStats' => (new Typo3tempFileService())->getDirectoryStatistics(),
-            'clearTypo3tempFilesToken' => $formProtection->generateToken('installTool', 'clearTypo3tempFiles'),
-            'createAdminToken' => $formProtection->generateToken('installTool', 'createAdmin'),
-            'databaseAnalyzerExecuteToken' => $formProtection->generateToken('installTool', 'databaseAnalyzerExecute'),
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Tool/Settings.php b/typo3/sysext/install/Classes/Controller/Action/Tool/Settings.php
deleted file mode 100644 (file)
index 1520e26..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Tool;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\FormProtection\FormProtectionFactory;
-use TYPO3\CMS\Core\FormProtection\InstallToolFormProtection;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Configuration\FeatureManager;
-use TYPO3\CMS\Install\Controller\Action;
-use TYPO3\CMS\Install\Service\LocalConfigurationValueService;
-
-/**
- * About page
- */
-class Settings extends Action\AbstractAction
-{
-    /**
-     * @var FeatureManager
-     */
-    protected $featureManager;
-
-    /**
-     * @param FeatureManager $featureManager
-     */
-    public function __construct(FeatureManager $featureManager = null)
-    {
-        $this->featureManager = $featureManager ?: GeneralUtility::makeInstance(FeatureManager::class);
-    }
-
-    /**
-     * Executes the tool
-     *
-     * @return string Rendered content
-     */
-    protected function executeAction(): string
-    {
-        $presetFeatures = $this->featureManager->getInitializedFeatures($this->postValues['values'] ?? []);
-        $localConfigurationValueService = new LocalConfigurationValueService();
-        $formProtection = FormProtectionFactory::get(InstallToolFormProtection::class);
-
-        $this->view->assignMultiple([
-            'changeInstallToolPasswordToken' => $formProtection->generateToken('installTool', 'changeInstallToolPassword'),
-
-            'localConfigurationWriteToken' => $formProtection->generateToken('installTool', 'localConfigurationWrite'),
-            'localConfigurationSectionNames' => $localConfigurationValueService->getSpeakingSectionNames(),
-            'localConfigurationData' => $localConfigurationValueService->getCurrentConfigurationData(),
-
-            'presetActivateToken' => $formProtection->generateToken('installTool', 'presetActivate'),
-            'presetFeatures' => $presetFeatures,
-
-            'systemMaintainerWriteToken' => $formProtection->generateToken('installTool', 'systemMaintainerWrite'),
-            'systemMaintainerIsDevelopmentContext' => GeneralUtility::getApplicationContext()->isDevelopment(),
-        ]);
-        return $this->view->render();
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/Action/Tool/Upgrade.php b/typo3/sysext/install/Classes/Controller/Action/Tool/Upgrade.php
deleted file mode 100644 (file)
index 1fca724..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Install\Controller\Action\Tool;
-
-/*
- * 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!
- */
-
-use Symfony\Component\Finder\Finder;
-use TYPO3\CMS\Core\Core\Bootstrap;
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\FormProtection\FormProtectionFactory;
-use TYPO3\CMS\Core\FormProtection\InstallToolFormProtection;
-use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Install\Controller\Action\AbstractAction;
-use TYPO3\CMS\Install\Service\CoreUpdateService;
-use TYPO3\CMS\Install\Service\CoreVersionService;
-use TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile;
-
-/**
- * Render "Upgrade" section main card content
- */
-class Upgrade extends AbstractAction
-{
-    /**
-     * Executes the tool
-     *
-     * @return string Rendered content
-     */
-    protected function executeAction(): string
-    {
-        $extensionsInTypo3conf = (new Finder())->directories()->in(PATH_site . 'typo3conf/ext')->depth('== 0')->sortByName();
-        $coreUpdateService = GeneralUtility::makeInstance(CoreUpdateService::class);
-        $coreVersionService = GeneralUtility::makeInstance(CoreVersionService::class);
-        $formProtection = FormProtectionFactory::get(InstallToolFormProtection::class);
-        $documentationFiles = $this->getDocumentationFiles();
-        $this->view->assignMultiple([
-            'extensionCompatibilityTesterProtocolFile' => GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . 'typo3temp/assets/ExtensionCompatibilityTester.txt',
-            'extensionCompatibilityTesterErrorProtocolFile' => GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . 'typo3temp/assets/ExtensionCompatibilityTesterErrors.json',
-
-            'coreUpdateEnabled' => $coreUpdateService->isCoreUpdateEnabled(),
-            'coreUpdateComposerMode' => Bootstrap::usesComposerClassLoading(),
-            'coreUpdateIsReleasedVersion' => $coreVersionService->isInstalledVersionAReleasedVersion(),
-            'coreUpdateIsSymLinkedCore' => is_link(PATH_site . 'typo3_src'),
-
-            'extensionScannerExtensionList' => $extensionsInTypo3conf,
-            'extensionScannerFilesToken' => $formProtection->generateToken('installTool', 'extensionScannerFiles'),
-            'extensionScannerScanFileToken' => $formProtection->generateToken('installTool', 'extensionScannerScanFile'),
-            'extensionScannerMarkFullyScannedRestFilesToken' => $formProtection->generateToken('installTool', 'extensionScannerMarkFullyScannedRestFiles'),
-
-            'upgradeDocsMarkReadToken' => $formProtection->generateToken('installTool', 'upgradeDocsMarkRead'),
-            'upgradeDocsUnmarkReadToken' => $formProtection->generateToken('installTool', 'upgradeDocsUnmarkRead'),
-            'upgradeDocsFiles' => $documentationFiles['normalFiles'],
-            'upgradeDocsReadFiles' => $documentationFiles['readFiles'],
-            'upgradeDocsNotAffectedFiles' => $documentationFiles['notAffectedFiles'],
-
-            'upgradeWizardsMarkUndoneToken' => $formProtection->generateToken('installTool', 'upgradeWizardsMarkUndone'),
-            'upgradeWizardsInputToken' => $formProtection->generateToken('installTool', 'upgradeWizardsInput'),
-            'upgradeWizardsExecuteToken' => $formProtection->generateToken('installTool', 'upgradeWizardsExecute'),
-        ]);
-        return $this->view->render();
-    }
-
-    /**
-     * Get a list of '.rst' files and their details for "Upgrade documentation" view.
-     *
-     * @return array
-     */
-    protected function getDocumentationFiles(): array
-    {
-        $documentationFileService = new DocumentationFile();
-        $documentationFiles = $documentationFileService->findDocumentationFiles(
-            strtr(realpath(PATH_site . ExtensionManagementUtility::siteRelPath('core') . 'Documentation/Changelog'), '\\', '/')
-        );
-        $documentationFiles = array_reverse($documentationFiles);
-
-        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_registry');
-        $filesMarkedAsRead = $queryBuilder
-            ->select('*')
-            ->from('sys_registry')
-            ->where(
-                $queryBuilder->expr()->eq(
-                    'entry_namespace',
-                    $queryBuilder->createNamedParameter('upgradeAnalysisIgnoredFiles', \PDO::PARAM_STR)
-                )
-            )
-            ->execute()
-            ->fetchAll();
-        $hashesMarkedAsRead = [];
-        foreach ($filesMarkedAsRead as $file) {
-            $hashesMarkedAsRead[] = $file['entry_key'];
-        }
-
-        $fileMarkedAsNotAffected = $queryBuilder
-            ->select('*')
-            ->from('sys_registry')
-            ->where(
-                $queryBuilder->expr()->eq(
-                    'entry_namespace',
-                    $queryBuilder->createNamedParameter('extensionScannerNotAffected', \PDO::PARAM_STR)
-                )
-            )
-            ->execute()
-            ->fetchAll();
-        $hashesMarkedAsNotAffected = [];
-        foreach ($fileMarkedAsNotAffected as $file) {
-            $hashesMarkedAsNotAffected[] = $file['entry_key'];
-        }
-
-        $readFiles = [];
-        foreach ($documentationFiles as $section => &$files) {
-            foreach ($files as $fileId => $fileData) {
-                if (in_array($fileData['file_hash'], $hashesMarkedAsRead, true)) {
-                    $fileData['section'] = $section;
-                    $readFiles[$fileId] = $fileData;
-                    unset($files[$fileId]);
-                }
-            }
-        }
-
-        $notAffectedFiles = [];
-        foreach ($documentationFiles as $section => &$files) {
-            foreach ($files as $fileId => $fileData) {
-                if (in_array($fileData['file_hash'], $hashesMarkedAsNotAffected, true)) {
-                    $fileData['section'] = $section;
-                    $notAffectedFiles[$fileId] = $fileData;
-                    unset($files[$fileId]);
-                }
-            }
-        }
-
-        return [
-            'normalFiles' => $documentationFiles,
-            'readFiles' => $readFiles,
-            'notAffectedFiles' => $notAffectedFiles,
-        ];
-    }
-}
diff --git a/typo3/sysext/install/Classes/Controller/AjaxController.php b/typo3/sysext/install/Classes/Controller/AjaxController.php
deleted file mode 100644 (file)
index ceebd32..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-<?php
-namespace TYPO3\CMS\Install\Controller;
-
-/*
- * 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!
- */
-
-use Psr\Http\Message\ResponseInterface;
-use Psr\Http\Message\ServerRequestInterface;
-use TYPO3\CMS\Core\Http\Response;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Install tool ajax controller, handles ajax requests
- */
-class AjaxController extends AbstractController
-{
-    /**
-     * @var array List of valid action names that need authentication
-     */
-    protected $authenticationActions = [
-        'changeInstallToolPassword',
-        'clearAllCache',
-        'clearTablesClear',
-        'clearTablesStats',
-        'clearTypo3tempFiles',
-
-        'coreUpdateActivate',
-        'coreUpdateCheckPreConditions',
-        'coreUpdateDownload',
-        'coreUpdateIsUpdateAvailable',
-        'coreUpdateMove',
-        'coreUpdateUnpack',
-        'coreUpdateUpdateVersionMatrix',
-        'coreUpdateVerifyChecksum',
-
-        'createAdmin',
-        'databaseAnalyzerAnalyze',
-        'databaseAnalyzerExecute',
-        'dumpAutoload',
-        'environmentCheckGetStatus',
-        'extensionCompatibilityTester',
-        'extensionScannerFiles',
-        'extensionScannerScanFile',
-        'extensionScannerMarkFullyScannedRestFiles',
-
-        'folderStructureGetStatus',
-        'folderStructureFix',
-        'imageProcessing',
-        'localConfigurationWrite',
-        'mailTest',
-        'presetActivate',
-        'resetBackendUserUc',
-
-        'systemMaintainerGetList',
-        'systemMaintainerWrite',
-
-        'tcaExtTablesCheck',
-        'tcaMigrationsCheck',
-
-        'uninstallExtension',
-
-        'upgradeDocsMarkRead',
-        'upgradeDocsUnmarkRead',
-
-        'upgradeWizardsBlockingDatabaseAdds',
-        'upgradeWizardsBlockingDatabaseExecute',
-        'upgradeWizardsBlockingDatabaseCharsetTest',
-        'upgradeWizardsBlockingDatabaseCharsetFix',
-        'upgradeWizardsDoneUpgrades',
-        'upgradeWizardsExecute',
-        'upgradeWizardsInput',
-        'upgradeWizardsList',
-        'upgradeWizardsMarkUndone',
-        'upgradeWizardsSilentUpgrades',
-    ];
-
-    /**
-     * Main entry point
-     *
-     * @param $request ServerRequestInterface
-     * @return ResponseInterface
-     * @throws Exception
-     */
-    public function execute(ServerRequestInterface $request): ResponseInterface
-    {
-        $action = $this->sanitizeAction($request->getParsedBody()['install']['action'] ?? $request->getQueryParams()['install']['action'] ?? '');
-        if ($action === '') {
-            return $this->createResponse('noAction', 200);
-        }
-        $this->validateAuthenticationAction($action);
-        $actionClass = ucfirst($action);
-        /** @var \TYPO3\CMS\Install\Controller\Action\ActionInterface $toolAction */
-        $actionObject = GeneralUtility::makeInstance('TYPO3\\CMS\\Install\\Controller\\Action\\Ajax\\' . $actionClass);
-        if (!($actionObject instanceof Action\ActionInterface)) {
-            throw new Exception(
-                $action . ' does not implement ActionInterface',
-                1369474308
-            );
-        }
-        $actionObject->setController('ajax');
-        $actionObject->setAction($action);
-        $actionObject->setContext($request->getAttribute('context'));
-        $actionObject->setToken($this->generateTokenForAction($action));
-        $actionObject->setPostValues($request->getParsedBody()['install'] ?? []);
-        return $actionObject->handle();
-    }
-
-    /**
-     * Render "unauthorized"
-     *
-     * @param ServerRequestInterface $request
-     * @param FlashMessage $message
-     * @return ResponseInterface
-     */
-    public function unauthorizedAction(ServerRequestInterface $request, FlashMessage $message = null): ResponseInterface
-    {
-        ob_clean();
-        return $this->createResponse('unauthorized', 403);
-    }
-
-    /**
-     * Creates a PSR-7 response
-     *
-     * @param string $string
-     * @param int $responseCode
-     * @return ResponseInterface
-     */
-    protected function createResponse(string $string, int $responseCode): ResponseInterface
-    {
-        $response = new Response('php://temp', $responseCode, [
-            'Content-Type' => 'application/json; charset=utf-8',
-            'Cache-Control' => 'no-cache, must-revalidate',
-            'Pragma' => 'no-cache'
-        ]);
-        $response->getBody()->write($string);
-        return $response;
-    }
-}
index 326f5a6..942c5aa 100644 (file)
@@ -83,14 +83,14 @@ class BackendModuleController
      * Starts / updates the session and redirects to the install tool
      * with given action.
      *
-     * @param $action
+     * @param $controller
      * @return ResponseInterface
      */
-    protected function setAuthorizedAndRedirect(string $action): ResponseInterface
+    protected function setAuthorizedAndRedirect(string $controller): ResponseInterface
     {
         $sessionService = new SessionService();
         $sessionService->setAuthorizedBackendSession();
-        $redirectLocation = 'install.php?install[action]=' . $action . '&install[context]=backend';
+        $redirectLocation = 'install.php?install[controller]=' . $controller . '&install[context]=backend';
         return new RedirectResponse($redirectLocation, 303);
     }
 }
diff --git a/typo3/sysext/install/Classes/Controller/EnvironmentController.php b/typo3/sysext/install/Classes/Controller/EnvironmentController.php
new file mode 100644 (file)
index 0000000..7ac8874
--- /dev/null
@@ -0,0 +1,981 @@
+<?php
+declare(strict_types=1);
+namespace TYPO3\CMS\Install\Controller;
+
+/*
+ * 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!
+ */
+
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\ServerRequestInterface;
+use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\FormProtection\FormProtectionFactory;
+use TYPO3\CMS\Core\FormProtection\InstallToolFormProtection;
+use TYPO3\CMS\Core\Http\JsonResponse;
+use TYPO3\CMS\Core\Imaging\GraphicalFunctions;
+use TYPO3\CMS\Core\Mail\MailMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
+use TYPO3\CMS\Core\Utility\CommandUtility;
+use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\StringUtility;
+use TYPO3\CMS\Install\FolderStructure\DefaultFactory;
+use TYPO3\CMS\Install\FolderStructure\DefaultPermissionsCheck;
+use TYPO3\CMS\Install\SystemEnvironment\Check;
+use TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck;
+use TYPO3\CMS\Install\SystemEnvironment\SetupCheck;
+
+/**
+ * Environment controller
+ */
+class EnvironmentController extends AbstractController
+{
+    /**
+     * Main "show the cards" view
+     *
+     * @param ServerRequestInterface $request
+     * @return ResponseInterface
+     */
+    public function cardsAction(ServerRequestInterface $request): ResponseInterface
+    {
+        $view = $this->initializeStandaloneView($request, 'Environment/Cards.html');
+        $formProtection = FormProtectionFactory::get(InstallToolFormProtection::class);
+        $view->assignMultiple([
+            'imageProcessingProcessor' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor'] === 'GraphicsMagick' ? 'GraphicsMagick' : 'ImageMagick',
+            'imageProcessingEnabled' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_enabled'],
+            'imageProcessingPath' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_path'],
+            'imageProcessingVersion' => $this->determineImageMagickVersion(),
+            'imageProcessingEffects' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_effects'],
+            'imageProcessingGdlibEnabled' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib'],
+            'imageProcessingGdlibPng' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png'],
+            'imageProcessingFileFormats' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],
+
+            'mailTestToken' => $formProtection->generateToken('installTool', 'mailTest'),
+            'mailTestSenderAddress' => $this->getSenderEmailAddress(),
+
+            'systemInformationCgiDetected', GeneralUtility::isRunningOnCgiServerApi(),
+            'systemInformationDatabaseConnections' => $this->getDatabaseConnectionInformation(),
+            'systemInformationOperatingSystem' => TYPO3_OS === 'WIN' ? 'Windows' : 'Unix',
+        ]);
+        return new JsonResponse([
+            'success' => true,
+            'html' => $view->render(),
+        ]);
+    }
+
+    /**
+     * Get environment status
+     *
+     * @return ResponseInterface
+     */
+    public function environmentCheckGetStatusAction(): ResponseInterface
+    {
+        $messageQueue = new FlashMessageQueue('install');
+        $checkMessages = (new Check())->getStatus();
+        foreach ($checkMessages as $message) {
+            $messageQueue->enqueue($message);
+        }
+        $setupMessages = (new SetupCheck())->getStatus();
+        foreach ($setupMessages as $message) {
+            $messageQueue->enqueue($message);
+        }
+        $databaseMessages = (new DatabaseCheck())->getStatus();
+        foreach ($databaseMessages as $message) {
+            $messageQueue->enqueue($message);
+        }
+        return new JsonResponse([
+            'success' => true,
+            'status' => [
+                'error' => $messageQueue->getAllMessages(FlashMessage::ERROR),
+                'warning' => $messageQueue->getAllMessages(FlashMessage::WARNING),
+                'ok' => $messageQueue->getAllMessages(FlashMessage::OK),
+                'information' => $messageQueue->getAllMessages(FlashMessage::INFO),
+                'notice' => $messageQueue->getAllMessages(FlashMessage::NOTICE),
+            ],
+        ]);
+    }
+
+    /**
+     * Get folder structure status
+     *
+     * @return ResponseInterface
+     */
+    public function folderStructureGetStatusAction(): ResponseInterface
+    {
+        $folderStructureFactory = GeneralUtility::makeInstance(DefaultFactory::class);
+        $structureFacade = $folderStructureFactory->getStructure();
+
+        $structureMessages = $structureFacade->getStatus();
+        $errorQueue = new FlashMessageQueue('install');
+        $okQueue = new FlashMessageQueue('install');
+        foreach ($structureMessages as $message) {
+            if ($message->getSeverity() === FlashMessage::ERROR
+                || $message->getSeverity() === FlashMessage::WARNING
+            ) {
+                $errorQueue->enqueue($message);
+            } else {
+                $okQueue->enqueue($message);
+            }
+        }
+
+        $permissionCheck = GeneralUtility::makeInstance(DefaultPermissionsCheck::class);
+
+        return new JsonResponse([
+            'success' => true,
+            'errorStatus' => $errorQueue,
+            'okStatus' => $okQueue,
+            'folderStructureFilePermissionStatus' => $permissionCheck->getMaskStatus('fileCreateMask'),
+            'folderStructureDirectoryPermissionStatus' => $permissionCheck->getMaskStatus('folderCreateMask'),
+        ]);
+    }
+
+    /**
+     * Try to fix folder structure errors
+     *
+     * @return ResponseInterface
+     */
+    public function folderStructureFixAction(): ResponseInterface
+    {
+        $folderStructureFactory = GeneralUtility::makeInstance(DefaultFactory::class);
+        $structureFacade = $folderStructureFactory->getStructure();
+        $fixedStatusObjects = $structureFacade->fix();
+        return new JsonResponse([
+            'success' => true,
+            'fixedStatus' => $fixedStatusObjects,
+        ]);
+    }
+
+    /**
+     *  Send a test mail
+     *
+     * @return ResponseInterface
+     */
+    public function mailTestAction(ServerRequestInterface $request): ResponseInterface
+    {
+        $messages = new FlashMessageQueue('install');
+        $recipient = $request->getParsedBody()['install']['email'];
+        if (empty($recipient) || !GeneralUtility::validEmail($recipient)) {
+            $messages->enqueue(new FlashMessage(
+                'Given address is not a valid email address.',
+                'Mail not sent',
+                FlashMessage::ERROR
+            ));
+        } else {
+            $mailMessage = GeneralUtility::makeInstance(MailMessage::class);
+            $mailMessage
+                ->addTo($recipient)
+                ->addFrom($this->getSenderEmailAddress(), $this->getSenderEmailName())
+                ->setSubject($this->getEmailSubject())
+                ->setBody('<html><body>html test content</body></html>', 'text/html')
+                ->addPart('TEST CONTENT')
+                ->send();
+            $messages->enqueue(new FlashMessage(
+                'Recipient: ' . $recipient,
+                'Test mail sent'
+            ));
+        }
+        return new JsonResponse([
+            'success' => true,
+            'status' => $messages,
+        ]);
+    }
+
+    /**
+     * Create true type font test image
+     *
+     * @return ResponseInterface
+     */
+    public function imageProcessingTrueTypeAction(): ResponseInterface
+    {
+        $image = @imagecreate(200, 50);
+        imagecolorallocate($image, 255, 255, 55);
+        $textColor = imagecolorallocate($image, 233, 14, 91);
+        @imagettftext(
+            $image,
+            20 / 96.0 * 72, // As in  compensateFontSizeiBasedOnFreetypeDpi
+            0,
+            10,
+            20,
+            $textColor,
+            ExtensionManagementUtility::extPath('install') . 'Resources/Private/Font/vera.ttf',
+            'Testing true type'
+        );
+        $outputFile = PATH_site . 'typo3temp/assets/images/installTool-' . StringUtility::getUniqueId('createTrueTypeFontTestImage') . '.gif';
+        imagegif($image, $outputFile);
+        return $this->getImageTestResponse([
+            'fileExists' => file_exists($outputFile),
+            'outputFile' => $outputFile,
+            'referenceFile' => PATH_site . 'typo3/sysext/install/Resources/Public/Images/TestReference/Font.gif',
+        ]);
+    }
+
+    /**
+     * Convert to jpg from jpg
+     *
+     * @return ResponseInterface
+     */
+    public function imageProcessingReadJpgAction(): ResponseInterface
+    {
+        return $this->convertImageFormatsToJpg('jpg');
+    }
+
+    /**
+     * Convert to jpg from gif
+     *
+     * @return ResponseInterface
+     */
+    public function imageProcessingReadGifAction(): ResponseInterface
+    {
+        return $this->convertImageFormatsToJpg('gif');
+    }
+
+    /**
+     * Convert to jpg from png
+     *
+     * @return ResponseInterface
+     */
+    public function imageProcessingReadPngAction(): ResponseInterface
+    {
+        return $this->convertImageFormatsToJpg('png');
+    }
+
+    /**
+     * Convert to jpg from tif
+     *
+     * @return ResponseInterface
+     */
+    public function imageProcessingReadTifAction(): ResponseInterface
+    {
+        return $this->convertImageFormatsToJpg('tif');
+    }
+
+    /**
+     * Convert to jpg from pdf
+     *
+     * @return ResponseInterface
+     */
+    public function imageProcessingReadPdfAction(): ResponseInterface
+    {
+        return $this->convertImageFormatsToJpg('pdf');
+    }
+
+    /**
+     * Convert to jpg from ai
+     *
+     * @return ResponseInterface
+     */
+    public function imageProcessingReadAiAction(): ResponseInterface
+    {
+        return $this->conve