[!!!][TASK] Remove several deprecated PHP classes 16/59216/4
authorChristian Kuhn <lolli@schwarzbu.ch>
Wed, 19 Dec 2018 15:49:07 +0000 (16:49 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Wed, 19 Dec 2018 16:36:06 +0000 (17:36 +0100)
Various classes that have no huge dependencies to
other deprecated code are removed.

Resolves: #87219
Releases: master
Change-Id: I2eb6c56b379b50028fe166c20995ad61f16469fd
Reviewed-on: https://review.typo3.org/59216
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/backend/Classes/Controller/LoginFramesetController.php [deleted file]
typo3/sysext/backend/Configuration/Backend/Routes.php
typo3/sysext/core/Classes/Cache/Frontend/StringFrontend.php [deleted file]
typo3/sysext/core/Classes/Integrity/DatabaseIntegrityCheck.php [deleted file]
typo3/sysext/core/Classes/Log/Writer/RuntimeCacheWriter.php [deleted file]
typo3/sysext/core/Classes/Resource/Service/UserStorageCapabilityService.php [deleted file]
typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst
typo3/sysext/core/Tests/UnitDeprecated/Cache/Frontend/StringFrontendTest.php [deleted file]
typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php
typo3/sysext/recordlist/Classes/Controller/ElementBrowserFramesetController.php [deleted file]

diff --git a/typo3/sysext/backend/Classes/Controller/LoginFramesetController.php b/typo3/sysext/backend/Classes/Controller/LoginFramesetController.php
deleted file mode 100644 (file)
index 06edd8f..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-<?php
-declare(strict_types = 1);
-namespace TYPO3\CMS\Backend\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\Backend\Routing\UriBuilder;
-use TYPO3\CMS\Backend\Template\DocumentTemplate;
-use TYPO3\CMS\Core\Http\HtmlResponse;
-use TYPO3\CMS\Core\Page\PageRenderer;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Script Class, putting the frameset together.
- * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. All logic is moved into LoginController.
- */
-class LoginFramesetController
-{
-    /**
-     * @var string
-     */
-    protected $content;
-
-    /**
-     * Constructor
-     */
-    public function __construct()
-    {
-        trigger_error(__CLASS__ . ' will be removed in TYPO3 v10.0. Request "index.php?loginRefresh=1" directly to work without the frameset.', E_USER_DEPRECATED);
-        $GLOBALS['SOBE'] = $this;
-    }
-
-    /**
-     * Injects the request object for the current request or subrequest
-     * As this controller goes only through the main() method, it is rather simple for now
-     *
-     * @param ServerRequestInterface $request
-     * @return ResponseInterface
-     */
-    public function mainAction(ServerRequestInterface $request): ResponseInterface
-    {
-        $this->createFrameset();
-        return new HtmlResponse($this->content);
-    }
-
-    /**
-     * Main function.
-     * Creates the header code and the frameset for the two frames.
-     */
-    public function main()
-    {
-        $this->createFrameset();
-    }
-    /**
-     * Main function.
-     * Creates the header code and the frameset for the two frames.
-     */
-    protected function createFrameset(): void
-    {
-        $title = 'TYPO3 Re-Login (' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . ')';
-        $this->getDocumentTemplate()->startPage($title);
-        /** @var UriBuilder $uriBuilder */
-        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
-        // Create the frameset for the window
-        $this->content = $this->getPageRenderer()->render(PageRenderer::PART_HEADER) . '
-                       <frameset rows="*,1">
-                               <frame name="login" src="index.php?loginRefresh=1" marginwidth="0" marginheight="0" scrolling="no" noresize="noresize" />
-                               <frame name="dummy" src="' . htmlspecialchars((string)$uriBuilder->buildUriFromRoute('dummy')) . '" marginwidth="0" marginheight="0" scrolling="auto" noresize="noresize" />
-                       </frameset>
-               </html>';
-    }
-
-    /**
-     * Returns an instance of DocumentTemplate
-     *
-     * @return DocumentTemplate
-     */
-    protected function getDocumentTemplate(): DocumentTemplate
-    {
-        return $GLOBALS['TBE_TEMPLATE'];
-    }
-
-    /**
-     * @return PageRenderer
-     */
-    protected function getPageRenderer(): PageRenderer
-    {
-        return GeneralUtility::makeInstance(PageRenderer::class);
-    }
-}
index f755587..84d8330 100644 (file)
@@ -163,13 +163,6 @@ return [
         'target' => Controller\ContentElement\ElementInformationController::class . '::mainAction'
     ],
 
-    // Register browser
-    // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
-    'browser' => [
-        'path' => '/record/browse',
-        'target' => \TYPO3\CMS\Recordlist\Controller\ElementBrowserFramesetController::class . '::mainAction'
-    ],
-
     // Dummy document - displays nothing but background color.
     'dummy' => [
         'path' => '/empty',
diff --git a/typo3/sysext/core/Classes/Cache/Frontend/StringFrontend.php b/typo3/sysext/core/Classes/Cache/Frontend/StringFrontend.php
deleted file mode 100644 (file)
index 9ec3bec..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-<?php
-namespace TYPO3\CMS\Core\Cache\Frontend;
-
-/*
- * 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\Cache\Backend\BackendInterface;
-use TYPO3\CMS\Core\Cache\Exception\InvalidDataException;
-
-/**
- * A cache frontend for strings. Nothing else.
- *
- * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0 - use VariableFrontend instead.
- */
-class StringFrontend extends AbstractFrontend
-{
-    /**
-     * @param string $identifier
-     * @param BackendInterface $backend
-     */
-    public function __construct($identifier, BackendInterface $backend)
-    {
-        trigger_error(
-            sprintf(
-                'Usage of class %s will be removed in TYPO3 v10.0, use %s instead',
-                static::class,
-                VariableFrontend::class
-            ),
-            E_USER_DEPRECATED
-        );
-        parent::__construct($identifier, $backend);
-    }
-
-    /**
-     * Saves the value of a PHP variable in the cache.
-     *
-     * @param string $entryIdentifier An identifier used for this cache entry
-     * @param string $string The variable to cache
-     * @param array $tags Tags to associate with this cache entry
-     * @param int $lifetime Lifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited lifetime.
-     * @throws \InvalidArgumentException if the identifier or tag is not valid
-     * @throws InvalidDataException if the variable to cache is not of type string
-     */
-    public function set($entryIdentifier, $string, array $tags = [], $lifetime = null)
-    {
-        if (!$this->isValidEntryIdentifier($entryIdentifier)) {
-            throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233057566);
-        }
-        if (!is_string($string)) {
-            throw new InvalidDataException('Given data is of type "' . gettype($string) . '", but a string is expected for string cache.', 1222808333);
-        }
-        foreach ($tags as $tag) {
-            if (!$this->isValidTag($tag)) {
-                throw new \InvalidArgumentException('"' . $tag . '" is not a valid tag for a cache entry.', 1233057512);
-            }
-        }
-        $this->backend->set($entryIdentifier, $string, $tags, $lifetime);
-    }
-
-    /**
-     * Finds and returns a variable value from the cache.
-     *
-     * @param string $entryIdentifier Identifier of the cache entry to fetch
-     * @return string The value
-     * @throws \InvalidArgumentException if the cache identifier is not valid
-     */
-    public function get($entryIdentifier)
-    {
-        if (!$this->isValidEntryIdentifier($entryIdentifier)) {
-            throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233057752);
-        }
-        return $this->backend->get($entryIdentifier);
-    }
-
-    /**
-     * Finds and returns all cache entries which are tagged by the specified tag.
-     *
-     * @param string $tag The tag to search for
-     * @return array An array with the content of all matching entries. An empty array if no entries matched
-     * @throws \InvalidArgumentException if the tag is not valid
-     * @deprecated since TYPO3 v9, Avoid using this method since it is not compliant to PSR-6
-     */
-    public function getByTag($tag)
-    {
-        trigger_error('StringFrontend->getByTag() will be removed in TYPO3 v10.0. Avoid using this method since it is not compliant to PSR-6.', E_USER_DEPRECATED);
-        if (!$this->isValidTag($tag)) {
-            throw new \InvalidArgumentException('"' . $tag . '" is not a valid tag for a cache entry.', 1233057772);
-        }
-        $entries = [];
-        $identifiers = $this->backend->findIdentifiersByTag($tag);
-        foreach ($identifiers as $identifier) {
-            $entries[] = $this->backend->get($identifier);
-        }
-        return $entries;
-    }
-}
diff --git a/typo3/sysext/core/Classes/Integrity/DatabaseIntegrityCheck.php b/typo3/sysext/core/Classes/Integrity/DatabaseIntegrityCheck.php
deleted file mode 100644 (file)
index 85fc5ef..0000000
+++ /dev/null
@@ -1,798 +0,0 @@
-<?php
-namespace TYPO3\CMS\Core\Integrity;
-
-/*
- * 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\Types\Type;
-use TYPO3\CMS\Backend\Utility\BackendUtility;
-use TYPO3\CMS\Core\Core\Environment;
-use TYPO3\CMS\Core\Database\Connection;
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder;
-use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
-use TYPO3\CMS\Core\Database\RelationHandler;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Core\Utility\PathUtility;
-
-/**
- * This class holds functions used by the TYPO3 backend to check the integrity of the database (The DBint module, 'lowlevel' extension)
- *
- * Depends on \TYPO3\CMS\Core\Database\RelationHandler
- *
- * @todo Need to really extend this class when the DataHandler library has been updated and the whole API is better defined. There are some known bugs in this library. Further it would be nice with a facility to not only analyze but also clean up!
- * @see \TYPO3\CMS\Lowlevel\Controller\DatabaseIntegrityController::func_relations(), \TYPO3\CMS\Lowlevel\Controller\DatabaseIntegrityController::func_records()
- */
-class DatabaseIntegrityCheck
-{
-    /**
-     * @var bool If set, genTree() includes deleted pages. This is default.
-     */
-    public $genTree_includeDeleted = true;
-
-    /**
-     * @var bool If set, genTree() includes versionized pages/records. This is default.
-     */
-    public $genTree_includeVersions = true;
-
-    /**
-     * @var bool If set, genTree() includes records from pages.
-     */
-    public $genTree_includeRecords = false;
-
-    /**
-     * @var array Will hold id/rec pairs from genTree()
-     */
-    public $page_idArray = [];
-
-    /**
-     * @var array Will hold id/rec pairs from genTree() that are not default language
-     */
-    protected $page_translatedPageIDArray = [];
-
-    /**
-     * @var array
-     */
-    public $rec_idArray = [];
-
-    /**
-     * @var array
-     */
-    public $checkFileRefs = [];
-
-    /**
-     * @var array From the select-fields
-     */
-    public $checkSelectDBRefs = [];
-
-    /**
-     * @var array From the group-fields
-     */
-    public $checkGroupDBRefs = [];
-
-    /**
-     * @var array Statistics
-     */
-    public $recStats = [
-        'allValid' => [],
-        'published_versions' => [],
-        'deleted' => []
-    ];
-
-    /**
-     * @var array
-     */
-    public $lRecords = [];
-
-    /**
-     * @var string
-     */
-    public $lostPagesList = '';
-
-    /**
-     * DatabaseIntegrityCheck constructor.
-     */
-    public function __construct()
-    {
-        trigger_error('TYPO3\CMS\Core\Integrity\DatabaseIntegrityCheck will be removed in TYPO3 v10.0, use TYPO3\CMS\Lowlevel\Integrity\DatabaseIntegrityCheck instead.', E_USER_DEPRECATED);
-    }
-
-    /**
-     * @return array
-     */
-    public function getPageTranslatedPageIDArray(): array
-    {
-        return $this->page_translatedPageIDArray;
-    }
-
-    /**
-     * Generates a list of Page-uid's that corresponds to the tables in the tree.
-     * This list should ideally include all records in the pages-table.
-     *
-     * @param int $theID a pid (page-record id) from which to start making the tree
-     * @param string $depthData HTML-code (image-tags) used when this function calls itself recursively.
-     * @param bool $versions Internal variable, don't set from outside!
-     */
-    public function genTree($theID, $depthData = '', $versions = false)
-    {
-        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
-        $queryBuilder->getRestrictions()->removeAll();
-        if (!$this->genTree_includeDeleted) {
-            $queryBuilder->getRestrictions()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
-        }
-        $queryBuilder->select('uid', 'title', 'doktype', 'deleted', 'hidden', 'sys_language_uid')
-            ->from('pages')
-            ->orderBy('sorting');
-        if ($versions) {
-            $queryBuilder->addSelect('t3ver_wsid', 't3ver_id', 't3ver_count');
-            $queryBuilder->where(
-                $queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter(-1, \PDO::PARAM_INT)),
-                $queryBuilder->expr()->eq('t3ver_oid', $queryBuilder->createNamedParameter($theID, \PDO::PARAM_INT))
-            );
-        } else {
-            $queryBuilder->where(
-                $queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($theID, \PDO::PARAM_INT))
-            );
-        }
-        $result = $queryBuilder->execute();
-        // Traverse the records selected
-        while ($row = $result->fetch()) {
-            $newID = $row['uid'];
-            // Register various data for this item:
-            if ($row['sys_language_uid'] === 0) {
-                $this->page_idArray[$newID] = $row;
-            } else {
-                $this->page_translatedPageIDArray[$newID] = $row;
-            }
-            $this->recStats['all_valid']['pages'][$newID] = $newID;
-            if ($row['deleted']) {
-                $this->recStats['deleted']['pages'][$newID] = $newID;
-            }
-            if ($versions && $row['t3ver_count'] >= 1) {
-                $this->recStats['published_versions']['pages'][$newID] = $newID;
-            }
-            if ($row['deleted']) {
-                $this->recStats['deleted']++;
-            }
-            if ($row['hidden']) {
-                $this->recStats['hidden']++;
-            }
-            $this->recStats['doktype'][$row['doktype']]++;
-            // If all records should be shown, do so:
-            if ($this->genTree_includeRecords) {
-                foreach ($GLOBALS['TCA'] as $tableName => $cfg) {
-                    if ($tableName !== 'pages') {
-                        $this->genTree_records($newID, '', $tableName);
-                    }
-                }
-            }
-            // Add sub pages:
-            $this->genTree($newID);
-            // If versions are included in the tree, add those now:
-            if ($this->genTree_includeVersions) {
-                $this->genTree($newID, '', true);
-            }
-        }
-    }
-
-    /**
-     * @param int $theID a pid (page-record id) from which to start making the tree
-     * @param string $_ Unused parameter
-     * @param string $table Table to get the records from
-     * @param bool $versions Internal variable, don't set from outside!
-     */
-    public function genTree_records($theID, $_ = '', $table = '', $versions = false)
-    {
-        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);
-        $queryBuilder->getRestrictions()->removeAll();
-        if (!$this->genTree_includeDeleted) {
-            $queryBuilder->getRestrictions()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
-        }
-        $queryBuilder
-            ->select(...explode(',', BackendUtility::getCommonSelectFields($table)))
-            ->from($table);
-
-        // Select all records from table pointing to this page
-        if ($versions) {
-            $queryBuilder->where(
-                $queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter(-1, \PDO::PARAM_INT)),
-                $queryBuilder->expr()->eq('t3ver_oid', $queryBuilder->createNamedParameter($theID, \PDO::PARAM_INT))
-            );
-        } else {
-            $queryBuilder->where(
-                $queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($theID, \PDO::PARAM_INT))
-            );
-        }
-        $queryResult = $queryBuilder->execute();
-        // Traverse selected
-        while ($row = $queryResult->fetch()) {
-            $newID = $row['uid'];
-            // Register various data for this item:
-            $this->rec_idArray[$table][$newID] = $row;
-            $this->recStats['all_valid'][$table][$newID] = $newID;
-            if ($row['deleted']) {
-                $this->recStats['deleted'][$table][$newID] = $newID;
-            }
-            if ($versions && $row['t3ver_count'] >= 1 && $row['t3ver_wsid'] == 0) {
-                $this->recStats['published_versions'][$table][$newID] = $newID;
-            }
-            // Select all versions of this record:
-            if ($this->genTree_includeVersions && $GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
-                $this->genTree_records($newID, '', $table, true);
-            }
-        }
-    }
-
-    /**
-     * Fills $this->lRecords with the records from all tc-tables that are not attached to a PID in the pid-list.
-     *
-     * @param string $pid_list list of pid's (page-record uid's). This list is probably made by genTree()
-     */
-    public function lostRecords($pid_list)
-    {
-        $this->lostPagesList = '';
-        $pageIds = GeneralUtility::intExplode(',', $pid_list);
-        if (is_array($pageIds)) {
-            foreach ($GLOBALS['TCA'] as $table => $tableConf) {
-                $pageIdsForTable = $pageIds;
-                // Remove preceding "-1," for non-versioned tables
-                if (!BackendUtility::isTableWorkspaceEnabled($table)) {
-                    $pageIdsForTable = array_combine($pageIdsForTable, $pageIdsForTable);
-                    unset($pageIdsForTable[-1]);
-                }
-                $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);
-                $queryBuilder->getRestrictions()->removeAll();
-                $selectFields = ['uid', 'pid'];
-                if (!empty($GLOBALS['TCA'][$table]['ctrl']['label'])) {
-                    $selectFields[] = $GLOBALS['TCA'][$table]['ctrl']['label'];
-                }
-                $queryResult = $queryBuilder->select(...$selectFields)
-                    ->from($table)
-                    ->where(
-                        $queryBuilder->expr()->notIn(
-                            'pid',
-                            $queryBuilder->createNamedParameter($pageIdsForTable, Connection::PARAM_INT_ARRAY)
-                        )
-                    )
-                    ->execute();
-                $lostIdList = [];
-                while ($row = $queryResult->fetch()) {
-                    $this->lRecords[$table][$row['uid']] = [
-                        'uid' => $row['uid'],
-                        'pid' => $row['pid'],
-                        'title' => strip_tags(BackendUtility::getRecordTitle($table, $row))
-                    ];
-                    $lostIdList[] = $row['uid'];
-                }
-                if ($table === 'pages') {
-                    $this->lostPagesList = implode(',', $lostIdList);
-                }
-            }
-        }
-    }
-
-    /**
-     * Fixes lost record from $table with uid $uid by setting the PID to zero.
-     * If there is a disabled column for the record that will be set as well.
-     *
-     * @param string $table Database tablename
-     * @param int $uid The uid of the record which will have the PID value set to 0 (zero)
-     * @return bool TRUE if done.
-     */
-    public function fixLostRecord($table, $uid)
-    {
-        if ($table && $GLOBALS['TCA'][$table] && $uid && is_array($this->lRecords[$table][$uid]) && $GLOBALS['BE_USER']->isAdmin()) {
-            $updateFields = [
-                'pid' => 0
-            ];
-            // If possible a lost record restored is hidden as default
-            if ($GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled']) {
-                $updateFields[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled']] = 1;
-            }
-            GeneralUtility::makeInstance(ConnectionPool::class)
-                ->getConnectionForTable($table)
-                ->update($table, $updateFields, ['uid' => (int)$uid]);
-            return true;
-        }
-        return false;
-    }
-
-    /**
-     * Counts records from $GLOBALS['TCA']-tables that ARE attached to an existing page.
-     *
-     * @param string $pid_list list of pid's (page-record uid's). This list is probably made by genTree()
-     * @return array an array with the number of records from all $GLOBALS['TCA']-tables that are attached to a PID in the pid-list.
-     */
-    public function countRecords($pid_list)
-    {
-        $list = [];
-        $list_n = [];
-        $pageIds = GeneralUtility::intExplode(',', $pid_list);
-        if (!empty($pageIds)) {
-            foreach ($GLOBALS['TCA'] as $table => $tableConf) {
-                $pageIdsForTable = $pageIds;
-                // Remove preceding "-1," for non-versioned tables
-                if (!BackendUtility::isTableWorkspaceEnabled($table)) {
-                    $pageIdsForTable = array_combine($pageIdsForTable, $pageIdsForTable);
-                    unset($pageIdsForTable[-1]);
-                }
-                $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);
-                $queryBuilder->getRestrictions()->removeAll();
-                $count = $queryBuilder->count('uid')
-                    ->from($table)
-                    ->where(
-                        $queryBuilder->expr()->in(
-                            'pid',
-                            $queryBuilder->createNamedParameter($pageIds, Connection::PARAM_INT_ARRAY)
-                        )
-                    )
-                    ->execute()
-                    ->fetchColumn(0);
-                if ($count) {
-                    $list[$table] = $count;
-                }
-
-                // same query excluding all deleted records
-                $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);
-                $queryBuilder->getRestrictions()
-                    ->removeAll()
-                    ->add(GeneralUtility::makeInstance(DeletedRestriction::class));
-                $count = $queryBuilder->count('uid')
-                    ->from($table)
-                    ->where(
-                        $queryBuilder->expr()->in(
-                            'pid',
-                            $queryBuilder->createNamedParameter($pageIdsForTable, Connection::PARAM_INT_ARRAY)
-                        )
-                    )
-                    ->execute()
-                    ->fetchColumn(0);
-                if ($count) {
-                    $list_n[$table] = $count;
-                }
-            }
-        }
-        return ['all' => $list, 'non_deleted' => $list_n];
-    }
-
-    /**
-     * Finding relations in database based on type 'group' (files or database-uid's in a list)
-     *
-     * @param string $mode $mode = file, $mode = db, $mode = '' (all...)
-     * @return array An array with all fields listed that somehow are references to other records (foreign-keys) or files
-     */
-    public function getGroupFields($mode)
-    {
-        $result = [];
-        foreach ($GLOBALS['TCA'] as $table => $tableConf) {
-            $cols = $GLOBALS['TCA'][$table]['columns'];
-            foreach ($cols as $field => $config) {
-                if ($config['config']['type'] === 'group') {
-                    if ((!$mode || $mode === 'file') && $config['config']['internal_type'] === 'file' || (!$mode || $mode === 'db') && $config['config']['internal_type'] === 'db') {
-                        // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. Deprecation logged by TcaMigration class. Remove the type=file specific code.
-                        $result[$table][] = $field;
-                    }
-                }
-                if ((!$mode || $mode === 'db') && $config['config']['type'] === 'select' && $config['config']['foreign_table']) {
-                    $result[$table][] = $field;
-                }
-            }
-            if ($result[$table]) {
-                $result[$table] = implode(',', $result[$table]);
-            }
-        }
-        return $result;
-    }
-
-    /**
-     * Finds all fields that hold filenames from uploadfolder
-     *
-     * @param string $uploadfolder Path to uploadfolder
-     * @return array An array with all fields listed that have references to files in the $uploadfolder
-     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. Deprecation logged by TcaMigration class.
-     */
-    public function getFileFields($uploadfolder)
-    {
-        $result = [];
-        foreach ($GLOBALS['TCA'] as $table => $tableConf) {
-            $cols = $GLOBALS['TCA'][$table]['columns'];
-            foreach ($cols as $field => $config) {
-                if ($config['config']['type'] === 'group' && $config['config']['internal_type'] === 'file' && $config['config']['uploadfolder'] == $uploadfolder) {
-                    $result[] = [$table, $field];
-                }
-            }
-        }
-        return $result;
-    }
-
-    /**
-     * Returns an array with arrays of table/field pairs which are allowed to hold references to the input table name - according to $GLOBALS['TCA']
-     *
-     * @param string $theSearchTable Table name
-     * @return array
-     */
-    public function getDBFields($theSearchTable)
-    {
-        $result = [];
-        foreach ($GLOBALS['TCA'] as $table => $tableConf) {
-            $cols = $GLOBALS['TCA'][$table]['columns'];
-            foreach ($cols as $field => $config) {
-                if ($config['config']['type'] === 'group' && $config['config']['internal_type'] === 'db') {
-                    if (trim($config['config']['allowed']) === '*' || strstr($config['config']['allowed'], $theSearchTable)) {
-                        $result[] = [$table, $field];
-                    }
-                } elseif ($config['config']['type'] === 'select' && $config['config']['foreign_table'] == $theSearchTable) {
-                    $result[] = [$table, $field];
-                }
-            }
-        }
-        return $result;
-    }
-
-    /**
-     * This selects non-empty-records from the tables/fields in the fkey_array generated by getGroupFields()
-     *
-     * @param array $fkey_arrays Array with tables/fields generated by getGroupFields()
-     * @see getGroupFields()
-     */
-    public function selectNonEmptyRecordsWithFkeys($fkey_arrays)
-    {
-        if (is_array($fkey_arrays)) {
-            $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
-            foreach ($fkey_arrays as $table => $field_list) {
-                if ($GLOBALS['TCA'][$table] && trim($field_list)) {
-                    $connection = $connectionPool->getConnectionForTable($table);
-                    $schemaManager = $connection->getSchemaManager();
-                    $tableColumns = $schemaManager->listTableColumns($table);
-
-                    $queryBuilder = $connectionPool->getQueryBuilderForTable($table);
-                    $queryBuilder->getRestrictions()->removeAll();
-
-                    $fields = GeneralUtility::trimExplode(',', $field_list, true);
-
-                    $queryBuilder->select('uid')
-                        ->from($table);
-                    $whereClause = [];
-
-                    foreach ($fields as $fieldName) {
-                        // The array index of $tableColumns is the lowercased column name!
-                        // It is quoted for keywords
-                        $column = $tableColumns[strtolower($fieldName)]
-                            ?? $tableColumns[$connection->quoteIdentifier(strtolower($fieldName))];
-                        if (!$column) {
-                            // Throw meaningful exception if field does not exist in DB - 'none' is not filtered here since the
-                            // method is only called with type=group fields
-                            throw new \RuntimeException(
-                                'Field ' . $fieldName . ' for table ' . $table . ' has been defined in TCA, but does not exist in DB',
-                                1536248936
-                            );
-                        }
-                        $fieldType = $column->getType()->getName();
-                        if (in_array(
-                            $fieldType,
-                            [Type::BIGINT, Type::INTEGER, Type::SMALLINT, Type::DECIMAL, Type::FLOAT],
-                            true
-                        )) {
-                            $whereClause[] = $queryBuilder->expr()->andX(
-                                $queryBuilder->expr()->isNotNull($fieldName),
-                                $queryBuilder->expr()->neq(
-                                    $fieldName,
-                                    $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)
-                                )
-                            );
-                        } elseif (in_array($fieldType, [Type::STRING, Type::TEXT], true)) {
-                            $whereClause[] = $queryBuilder->expr()->andX(
-                                $queryBuilder->expr()->isNotNull($fieldName),
-                                $queryBuilder->expr()->neq(
-                                    $fieldName,
-                                    $queryBuilder->createNamedParameter('', \PDO::PARAM_STR)
-                                )
-                            );
-                        } elseif ($fieldType === Type::BLOB) {
-                            $whereClause[] = $queryBuilder->expr()->andX(
-                                $queryBuilder->expr()->isNotNull($fieldName),
-                                $queryBuilder->expr()
-                                    ->comparison(
-                                        $queryBuilder->expr()->length($fieldName),
-                                        ExpressionBuilder::GT,
-                                        $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)
-                                    )
-                            );
-                        }
-                    }
-                    $queryResult = $queryBuilder->orWhere(...$whereClause)->execute();
-
-                    while ($row = $queryResult->fetch()) {
-                        foreach ($fields as $field) {
-                            if (trim($row[$field])) {
-                                $fieldConf = $GLOBALS['TCA'][$table]['columns'][$field]['config'];
-                                if ($fieldConf['type'] === 'group') {
-                                    if ($fieldConf['internal_type'] === 'file') {
-                                        // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. Deprecation logged by TcaMigration class.
-                                        // Files...
-                                        if ($fieldConf['MM']) {
-                                            $tempArr = [];
-                                            $dbAnalysis = GeneralUtility::makeInstance(RelationHandler::class);
-                                            $dbAnalysis->start('', 'files', $fieldConf['MM'], $row['uid']);
-                                            foreach ($dbAnalysis->itemArray as $somekey => $someval) {
-                                                if ($someval['id']) {
-                                                    $tempArr[] = $someval['id'];
-                                                }
-                                            }
-                                        } else {
-                                            $tempArr = explode(',', trim($row[$field]));
-                                        }
-                                        foreach ($tempArr as $file) {
-                                            $file = trim($file);
-                                            if ($file) {
-                                                $this->checkFileRefs[$fieldConf['uploadfolder']][$file] += 1;
-                                            }
-                                        }
-                                    }
-                                    if ($fieldConf['internal_type'] === 'db') {
-                                        $dbAnalysis = GeneralUtility::makeInstance(RelationHandler::class);
-                                        $dbAnalysis->start(
-                                            $row[$field],
-                                            $fieldConf['allowed'],
-                                            $fieldConf['MM'],
-                                            $row['uid'],
-                                            $table,
-                                            $fieldConf
-                                        );
-                                        foreach ($dbAnalysis->itemArray as $tempArr) {
-                                            $this->checkGroupDBRefs[$tempArr['table']][$tempArr['id']] += 1;
-                                        }
-                                    }
-                                }
-                                if ($fieldConf['type'] === 'select' && $fieldConf['foreign_table']) {
-                                    $dbAnalysis = GeneralUtility::makeInstance(RelationHandler::class);
-                                    $dbAnalysis->start(
-                                        $row[$field],
-                                        $fieldConf['foreign_table'],
-                                        $fieldConf['MM'],
-                                        $row['uid'],
-                                        $table,
-                                        $fieldConf
-                                    );
-                                    foreach ($dbAnalysis->itemArray as $tempArr) {
-                                        if ($tempArr['id'] > 0) {
-                                            $this->checkGroupDBRefs[$fieldConf['foreign_table']][$tempArr['id']] += 1;
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * Depends on selectNonEmpty.... to be executed first!!
-     *
-     * @return array Report over files; keys are "moreReferences", "noReferences", "noFile", "error
-     */
-    public function testFileRefs()
-    {
-        $output = [];
-        // Handle direct references with upload folder setting (workaround)
-        $newCheckFileRefs = [];
-        foreach ($this->checkFileRefs as $folder => $files) {
-            // Only direct references without a folder setting
-            if ($folder !== '') {
-                $newCheckFileRefs[$folder] = $files;
-                continue;
-            }
-            foreach ($files as $file => $references) {
-                // Direct file references have often many references (removes occurrences in the moreReferences section of the result array)
-                if ($references > 1) {
-                    $references = 1;
-                }
-                // The directory must be empty (prevents checking of the root directory)
-                $directory = PathUtility::dirname($file);
-                if ($directory !== '') {
-                    $newCheckFileRefs[$directory][PathUtility::basename($file)] = $references;
-                }
-            }
-        }
-        $this->checkFileRefs = $newCheckFileRefs;
-        foreach ($this->checkFileRefs as $folder => $fileArr) {
-            $path = Environment::getPublicPath() . '/' . $folder;
-            if (@is_dir($path) && @is_readable($path)) {
-                $d = dir($path);
-                while ($entry = $d->read()) {
-                    if (@is_file($path . '/' . $entry)) {
-                        if (isset($fileArr[$entry])) {
-                            if ($fileArr[$entry] > 1) {
-                                $temp = $this->whereIsFileReferenced($folder, $entry);
-                                $tempList = '';
-                                foreach ($temp as $inf) {
-                                    $tempList .= '[' . $inf['table'] . '][' . $inf['uid'] . '][' . $inf['field'] . '] (pid:' . $inf['pid'] . ') - ';
-                                }
-                                $output['moreReferences'][] = [$path, $entry, $fileArr[$entry], $tempList];
-                            }
-                            unset($fileArr[$entry]);
-                        } else {
-                            // Contains workaround for direct references
-                            if (!strstr($entry, 'index.htm') && !preg_match('/^' . preg_quote($GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'], '/') . '/', $folder)) {
-                                $output['noReferences'][] = [$path, $entry];
-                            }
-                        }
-                    }
-                }
-                $d->close();
-                $tempCounter = 0;
-                foreach ($fileArr as $file => $value) {
-                    // Workaround for direct file references
-                    if (preg_match('/^' . preg_quote($GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'], '/') . '/', $folder)) {
-                        $file = $folder . '/' . $file;
-                        $folder = '';
-                        $path = Environment::getPublicPath();
-                    }
-                    $temp = $this->whereIsFileReferenced($folder, $file);
-                    $tempList = '';
-                    foreach ($temp as $inf) {
-                        $tempList .= '[' . $inf['table'] . '][' . $inf['uid'] . '][' . $inf['field'] . '] (pid:' . $inf['pid'] . ') - ';
-                    }
-                    $tempCounter++;
-                    $output['noFile'][substr($path, -3) . '_' . substr($file, 0, 3) . '_' . $tempCounter] = [$path, $file, $tempList];
-                }
-            } else {
-                $output['error'][] = [$path];
-            }
-        }
-        return $output;
-    }
-
-    /**
-     * Depends on selectNonEmpty.... to be executed first!!
-     *
-     * @param array $theArray Table with key/value pairs being table names and arrays with uid numbers
-     * @return string HTML Error message
-     */
-    public function testDBRefs($theArray)
-    {
-        $result = '';
-        foreach ($theArray as $table => $dbArr) {
-            if ($GLOBALS['TCA'][$table]) {
-                $ids = array_keys($dbArr);
-                if (!empty($ids)) {
-                    $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
-                        ->getQueryBuilderForTable($table);
-                    $queryBuilder->getRestrictions()
-                        ->removeAll()
-                        ->add(GeneralUtility::makeInstance(DeletedRestriction::class));
-                    $queryResult = $queryBuilder
-                        ->select('uid')
-                        ->from($table)
-                        ->where(
-                            $queryBuilder->expr()->in(
-                                'uid',
-                                $queryBuilder->createNamedParameter($ids, Connection::PARAM_INT_ARRAY)
-                            )
-                        )
-                        ->execute();
-                    while ($row = $queryResult->fetch()) {
-                        if (isset($dbArr[$row['uid']])) {
-                            unset($dbArr[$row['uid']]);
-                        } else {
-                            $result .= 'Strange Error. ...<br />';
-                        }
-                    }
-                    foreach ($dbArr as $theId => $theC) {
-                        $result .= 'There are ' . $theC . ' records pointing to this missing or deleted record; [' . $table . '][' . $theId . ']<br />';
-                    }
-                }
-            } else {
-                $result .= 'Codeerror. Table is not a table...<br />';
-            }
-        }
-        return $result;
-    }
-
-    /**
-     * Finding all references to record based on table/uid
-     *
-     * @param string $searchTable Table name
-     * @param int $id Uid of database record
-     * @return array Array with other arrays containing information about where references was found
-     */
-    public function whereIsRecordReferenced($searchTable, $id)
-    {
-        // Gets tables / Fields that reference to files
-        $fileFields = $this->getDBFields($searchTable);
-        $theRecordList = [];
-        foreach ($fileFields as $info) {
-            list($table, $field) = $info;
-            $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);
-            $queryBuilder->getRestrictions()->removeAll();
-            $queryResult = $queryBuilder
-                ->select('uid', 'pid', $GLOBALS['TCA'][$table]['ctrl']['label'], $field)
-                ->from($table)
-                ->where(
-                    $queryBuilder->expr()->like(
-                        $field,
-                        $queryBuilder->createNamedParameter('%' . $queryBuilder->escapeLikeWildcards($id) . '%')
-                    )
-                )
-                ->execute();
-
-            while ($row = $queryResult->fetch()) {
-                // Now this is the field, where the reference COULD come from.
-                // But we're not guaranteed, so we must carefully examine the data.
-                $fieldConf = $GLOBALS['TCA'][$table]['columns'][$field]['config'];
-                $allowedTables = $fieldConf['type'] === 'group' ? $fieldConf['allowed'] : $fieldConf['foreign_table'];
-                $dbAnalysis = GeneralUtility::makeInstance(RelationHandler::class);
-                $dbAnalysis->start($row[$field], $allowedTables, $fieldConf['MM'], $row['uid'], $table, $fieldConf);
-                foreach ($dbAnalysis->itemArray as $tempArr) {
-                    if ($tempArr['table'] == $searchTable && $tempArr['id'] == $id) {
-                        $theRecordList[] = [
-                            'table' => $table,
-                            'uid' => $row['uid'],
-                            'field' => $field,
-                            'pid' => $row['pid']
-                        ];
-                    }
-                }
-            }
-        }
-        return $theRecordList;
-    }
-
-    /**
-     * Finding all references to file based on uploadfolder / filename
-     *
-     * @param string $uploadFolder Upload folder where file is found
-     * @param string $filename Filename to search for
-     * @return array Array with other arrays containing information about where references was found
-     */
-    public function whereIsFileReferenced($uploadFolder, $filename)
-    {
-        // Gets tables / Fields that reference to files
-        $fileFields = $this->getFileFields($uploadFolder);
-        $theRecordList = [];
-        foreach ($fileFields as $info) {
-            list($table, $field) = $info;
-            $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);
-            $queryBuilder->getRestrictions()->removeAll();
-            $queryResult = $queryBuilder
-                ->select('uid', 'pid', $GLOBALS['TCA'][$table]['ctrl']['label'], $field)
-                ->from($table)
-                ->where(
-                    $queryBuilder->expr()->like(
-                        $field,
-                        $queryBuilder->createNamedParameter('%' . $queryBuilder->escapeLikeWildcards($filename) . '%')
-                    )
-                )
-                ->execute();
-            while ($row = $queryResult->fetch()) {
-                // Now this is the field, where the reference COULD come from.
-                // But we're not guaranteed, so we must carefully examine the data.
-                $tempArr = explode(',', trim($row[$field]));
-                foreach ($tempArr as $file) {
-                    $file = trim($file);
-                    if ($file == $filename) {
-                        $theRecordList[] = [
-                            'table' => $table,
-                            'uid' => $row['uid'],
-                            'field' => $field,
-                            'pid' => $row['pid']
-                        ];
-                    }
-                }
-            }
-        }
-        return $theRecordList;
-    }
-}
diff --git a/typo3/sysext/core/Classes/Log/Writer/RuntimeCacheWriter.php b/typo3/sysext/core/Classes/Log/Writer/RuntimeCacheWriter.php
deleted file mode 100644 (file)
index 5f89c1d..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-declare(strict_types = 1);
-
-namespace TYPO3\CMS\Core\Log\Writer;
-
-/*
- * 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\Cache\CacheManager;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Log writer that writes log entries into TYPO3 runtime cache
- * @deprecated Deprecated since TYPO3 9, will be removed in TYPO3 v10.0
- */
-class RuntimeCacheWriter implements WriterInterface
-{
-    public function __construct()
-    {
-        trigger_error(
-            'RuntimeCacheWriter is deprecated, write your own custom InMemoryLogger instead.',
-            E_USER_DEPRECATED
-        );
-    }
-
-    /**
-     * Writes the log record to TYPO3s runtime cache
-     *
-     * @param \TYPO3\CMS\Core\Log\LogRecord $record Log record
-     * @return \TYPO3\CMS\Core\Log\Writer\WriterInterface $this
-     * @throws \Exception
-     */
-    public function writeLog(\TYPO3\CMS\Core\Log\LogRecord $record)
-    {
-        $cacheManager = GeneralUtility::makeInstance(CacheManager::class);
-        $runtimeCache = $cacheManager->getCache('cache_runtime');
-        $component = str_replace('.', '_', $record->getComponent());
-        $runtimeCache->set(sha1(json_encode($record->getData())), $record, [$component]);
-        return $this;
-    }
-}
diff --git a/typo3/sysext/core/Classes/Resource/Service/UserStorageCapabilityService.php b/typo3/sysext/core/Classes/Resource/Service/UserStorageCapabilityService.php
deleted file mode 100644 (file)
index 91fcb3e..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-<?php
-namespace TYPO3\CMS\Core\Resource\Service;
-
-/*
- * 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\Localization\LanguageService;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
-use TYPO3\CMS\Core\Messaging\FlashMessageService;
-use TYPO3\CMS\Core\Resource\Exception\InvalidPathException;
-use TYPO3\CMS\Core\Resource\ResourceFactory;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Utility class to render capabilities of the storage.
- *
- * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
- */
-class UserStorageCapabilityService
-{
-    /**
-     * Constructor logs deprecation
-     */
-    public function __construct()
-    {
-        trigger_error('This class will be removed in TYPO3 v10.0.', E_USER_DEPRECATED);
-    }
-
-    /**
-     * UserFunc function for rendering field "is_public".
-     * There are some edge cases where "is_public" can never be marked as true in the BE,
-     * for instance for storage located outside the document root or
-     * for storages driven by special driver such as Flickr, ...
-     *
-     * @param array $propertyArray the array with additional configuration options.
-     * @return string
-     */
-    public function renderIsPublic(array $propertyArray)
-    {
-        $isPublic = $GLOBALS['TCA']['sys_file_storage']['columns']['is_public']['config']['default'];
-        $fileRecord = $propertyArray['row'];
-
-        // Makes sure the storage object can be retrieved which is not the case when new storage.
-        if ((int)$propertyArray['row']['uid'] > 0) {
-            /** @var LanguageService $lang */
-            $lang = $GLOBALS['LANG'];
-            /** @var FlashMessageService $flashMessageService */
-            $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
-            /** @var FlashMessageQueue $defaultFlashMessageQueue */
-            $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
-            try {
-                $storage = ResourceFactory::getInstance()->getStorageObject($fileRecord['uid']);
-                $storageRecord = $storage->getStorageRecord();
-                $isPublic = $storage->isPublic() && $storageRecord['is_public'];
-            } catch (InvalidPathException $e) {
-                $message = GeneralUtility::makeInstance(
-                    FlashMessage::class,
-                    $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:filestorage.invalidpathexception.message'),
-                    $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:filestorage.invalidpathexception.title'),
-                    FlashMessage::ERROR
-                );
-                $defaultFlashMessageQueue->enqueue($message);
-            }
-
-            // Display a warning to the BE User in case settings is not inline with storage capability.
-            if ($storageRecord['is_public'] && !$storage->isPublic()) {
-                $message = GeneralUtility::makeInstance(
-                    FlashMessage::class,
-                    $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:warning.message.storage_is_no_public'),
-                    $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:warning.header.storage_is_no_public'),
-                    FlashMessage::WARNING
-                );
-                $defaultFlashMessageQueue->enqueue($message);
-            }
-        }
-
-        return $this->renderFileInformationContent($fileRecord, $isPublic);
-    }
-
-    /**
-     * Renders a HTML block containing the checkbox for field "is_public".
-     *
-     * @param array $fileRecord
-     * @param bool $isPublic
-     * @return string
-     */
-    protected function renderFileInformationContent(array $fileRecord, $isPublic)
-    {
-        $template = '
-        <div class="checkbox checkbox-type-toggle">
-                <input type="checkbox" id="filestorage-ispublic" onclick="document.editform[\'data[sys_file_storage][{uid}][is_public]\'].value=this.checked?(document.editform[\'data[sys_file_storage][{uid}][is_public]\'].value|1):(document.editform[\'data[sys_file_storage][{uid}][is_public]\'].value&0);TBE_EDITOR.fieldChanged(\'sys_file_storage\',\'{uid}\',\'is_public\',\'data[sys_file_storage][{uid}][is_public]\');" class="checkbox-input" value="1" name="data[sys_file_storage][{uid}][is_public]_0" %s />
-                <label class="checkbox-label" for="filestorage-ispublic">
-                    <span class="checkbox-label-text">&nbsp;</span>
-                </label>
-                <input type="hidden" name="data[sys_file_storage][{uid}][is_public]" value="1">
-            </div>
-        ';
-
-        $content = sprintf(
-            $template,
-            $isPublic ? 'checked="checked"' : ''
-        );
-
-        return str_replace('{uid}', $fileRecord['uid'], $content);
-    }
-}
index c3bf232..5f90860 100644 (file)
@@ -11,19 +11,25 @@ Description
 
 The following PHP classes that have been previously deprecated for v9 have been removed:
 
+* :php:`TYPO3\CMS\Backend\Controller\LoginFramesetController`
 * :php:`TYPO3\CMS\Backend\Module\AbstractFunctionModule`
 * :php:`TYPO3\CMS\Backend\Module\AbstractModule`
 * :php:`TYPO3\CMS\Backend\Module\BaseScriptClass`
 * :php:`TYPO3\CMS\Backend\RecordList\AbstractRecordList`
+* :php:`TYPO3\CMS\Core\Cache\Frontend\StringFrontend`
 * :php:`TYPO3\CMS\Core\Crypto\PasswordHashing\AbstractComposedSalt`
 * :php:`TYPO3\CMS\Core\Crypto\PasswordHashing\ExtensionManagerConfigurationUtility`
 * :php:`TYPO3\CMS\Core\Crypto\PasswordHashing\SaltedPasswordService`
 * :php:`TYPO3\CMS\Core\Crypto\PasswordHashing\SaltedPasswordsUtility`
 * :php:`TYPO3\CMS\Core\Encoder\JavaScriptEncoder`
+* :php:`TYPO3\CMS\Core\Integrity\DatabaseIntegrityCheck`
+* :php:`TYPO3\CMS\Core\Log\Writer\RuntimeCacheWriter`
 * :php:`TYPO3\CMS\Core\Package\DependencyResolver`
+* :php:`TYPO3\CMS\Core\Resource\Service\UserStorageCapabilityService`
 * :php:`TYPO3\CMS\Core\Resource\Utility\BackendUtility`
 * :php:`TYPO3\CMS\Core\Utility\ClientUtility`
 * :php:`TYPO3\CMS\Core\Utility\PhpOptionsUtility`
+* :php:`TYPO3\CMS\Recordlist\Controller\ElementBrowserFramesetController`
 * :php:`TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRecordList`
 * :php:`TYPO3\CMS\Workspaces\Service\AutoPublishService`
 * :php:`TYPO3\CMS\Workspaces\Task\AutoPublishTask`
diff --git a/typo3/sysext/core/Tests/UnitDeprecated/Cache/Frontend/StringFrontendTest.php b/typo3/sysext/core/Tests/UnitDeprecated/Cache/Frontend/StringFrontendTest.php
deleted file mode 100644 (file)
index 31ad111..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-<?php
-namespace TYPO3\CMS\Core\Tests\UnitDeprecated\Cache\Frontend;
-
-/*
- * 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\Cache\Exception\InvalidDataException;
-use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
-
-/**
- * Testcase for the string cache frontend
- */
-class StringFrontendTest extends UnitTestCase
-{
-    /**
-     * @test
-     */
-    public function setChecksIfTheIdentifierIsValid()
-    {
-        $this->expectException(\InvalidArgumentException::class);
-        $this->expectExceptionCode(1233057566);
-
-        $cache = $this->getMockBuilder(\TYPO3\CMS\Core\Cache\Frontend\StringFrontend::class)
-            ->setMethods(['isValidEntryIdentifier'])
-            ->disableOriginalConstructor()
-            ->getMock();
-        $cache->expects($this->once())->method('isValidEntryIdentifier')->with('foo')->will($this->returnValue(false));
-        $cache->set('foo', 'bar');
-    }
-
-    /**
-     * @test
-     */
-    public function setPassesStringToBackend()
-    {
-        $theString = 'Just some value';
-        $backend = $this->getMockBuilder(\TYPO3\CMS\Core\Cache\Backend\AbstractBackend::class)
-            ->setMethods(['get', 'set', 'has', 'remove', 'findIdentifiersByTag', 'flush', 'flushByTag', 'collectGarbage'])
-            ->disableOriginalConstructor()
-            ->getMock();
-        $backend->expects($this->once())->method('set')->with($this->equalTo('StringCacheTest'), $this->equalTo($theString));
-        $cache = new \TYPO3\CMS\Core\Cache\Frontend\StringFrontend('StringFrontend', $backend);
-        $cache->set('StringCacheTest', $theString);
-    }
-
-    /**
-     * @test
-     */
-    public function setPassesLifetimeToBackend()
-    {
-        $theString = 'Just some value';
-        $theLifetime = 1234;
-        $backend = $this->getMockBuilder(\TYPO3\CMS\Core\Cache\Backend\AbstractBackend::class)
-            ->setMethods(['get', 'set', 'has', 'remove', 'findIdentifiersByTag', 'flush', 'flushByTag', 'collectGarbage'])
-            ->disableOriginalConstructor()
-            ->getMock();
-        $backend->expects($this->once())->method('set')->with($this->equalTo('StringCacheTest'), $this->equalTo($theString), $this->equalTo([]), $this->equalTo($theLifetime));
-        $cache = new \TYPO3\CMS\Core\Cache\Frontend\StringFrontend('StringFrontend', $backend);
-        $cache->set('StringCacheTest', $theString, [], $theLifetime);
-    }
-
-    /**
-     * @test
-     */
-    public function setThrowsInvalidDataExceptionOnNonStringValues()
-    {
-        $this->expectException(InvalidDataException::class);
-        $this->expectExceptionCode(1222808333);
-
-        $backend = $this->getMockBuilder(\TYPO3\CMS\Core\Cache\Backend\AbstractBackend::class)
-            ->setMethods(['get', 'set', 'has', 'remove', 'findIdentifiersByTag', 'flush', 'flushByTag', 'collectGarbage'])
-            ->disableOriginalConstructor()
-            ->getMock();
-        $cache = new \TYPO3\CMS\Core\Cache\Frontend\StringFrontend('StringFrontend', $backend);
-        $cache->set('StringCacheTest', []);
-    }
-
-    /**
-     * @test
-     */
-    public function getFetchesStringValueFromBackend()
-    {
-        $backend = $this->getMockBuilder(\TYPO3\CMS\Core\Cache\Backend\AbstractBackend::class)
-            ->setMethods(['get', 'set', 'has', 'remove', 'findIdentifiersByTag', 'flush', 'flushByTag', 'collectGarbage'])
-            ->disableOriginalConstructor()
-            ->getMock();
-        $backend->expects($this->once())->method('get')->will($this->returnValue('Just some value'));
-        $cache = new \TYPO3\CMS\Core\Cache\Frontend\StringFrontend('StringFrontend', $backend);
-        $this->assertEquals('Just some value', $cache->get('StringCacheTest'), 'The returned value was not the expected string.');
-    }
-
-    /**
-     * @test
-     */
-    public function hasReturnsResultFromBackend()
-    {
-        $backend = $this->getMockBuilder(\TYPO3\CMS\Core\Cache\Backend\AbstractBackend::class)
-            ->setMethods(['get', 'set', 'has', 'remove', 'findIdentifiersByTag', 'flush', 'flushByTag', 'collectGarbage'])
-            ->disableOriginalConstructor()
-            ->getMock();
-        $backend->expects($this->once())->method('has')->with($this->equalTo('StringCacheTest'))->will($this->returnValue(true));
-        $cache = new \TYPO3\CMS\Core\Cache\Frontend\StringFrontend('StringFrontend', $backend);
-        $this->assertTrue($cache->has('StringCacheTest'), 'has() did not return TRUE.');
-    }
-
-    /**
-     * @test
-     */
-    public function removeCallsBackend()
-    {
-        $cacheIdentifier = 'someCacheIdentifier';
-        $backend = $this->getMockBuilder(\TYPO3\CMS\Core\Cache\Backend\AbstractBackend::class)
-            ->setMethods(['get', 'set', 'has', 'remove', 'findIdentifiersByTag', 'flush', 'flushByTag', 'collectGarbage'])
-            ->disableOriginalConstructor()
-            ->getMock();
-        $backend->expects($this->once())->method('remove')->with($this->equalTo($cacheIdentifier))->will($this->returnValue(true));
-        $cache = new \TYPO3\CMS\Core\Cache\Frontend\StringFrontend('StringFrontend', $backend);
-        $this->assertTrue($cache->remove($cacheIdentifier), 'remove() did not return TRUE');
-    }
-}
index ceb91f7..498c946 100644 (file)
@@ -717,16 +717,19 @@ return [
     'TYPO3\CMS\Core\Log\Writer\RuntimeCacheWriter' => [
         'restFiles' => [
             'Deprecation-85687-DeprecateRuntimeCacheWriter.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     'TYPO3\CMS\Backend\Controller\LoginFramesetController' => [
         'restFiles' => [
             'Deprecation-85707-LoginFramesetController.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     'TYPO3\CMS\Core\Integrity\DatabaseIntegrityCheck' => [
         'restFiles' => [
             'Deprecation-85727-DatabaseIntegrityCheckMovedToEXTlowlevel.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     'TYPO3\CMS\Saltedpasswords\SaltedPasswordService' => [
@@ -969,6 +972,13 @@ return [
     'TYPO3\CMS\Core\Resource\Service\UserStorageCapabilityService' => [
         'restFiles' => [
             'Deprecation-86109-ClassUserStorageCapabilityService.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
+        ],
+    ],
+    'TYPO3\CMS\Core\Cache\Frontend\StringFrontend' => [
+        'restFiles' => [
+            'Deprecation-81434-StringCacheFrontendDeprecated.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     'TYPO3\CMS\Backend\Module\BaseScriptClass' => [
diff --git a/typo3/sysext/recordlist/Classes/Controller/ElementBrowserFramesetController.php b/typo3/sysext/recordlist/Classes/Controller/ElementBrowserFramesetController.php
deleted file mode 100644 (file)
index 1cd477a..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-<?php
-namespace TYPO3\CMS\Recordlist\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\Backend\Template\DocumentTemplate;
-use TYPO3\CMS\Core\Http\HtmlResponse;
-use TYPO3\CMS\Core\Localization\LanguageService;
-use TYPO3\CMS\Core\Page\PageRenderer;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Script Class, putting the frameset together.
- *
- * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
- */
-class ElementBrowserFramesetController
-{
-    /**
-     * Internal, dynamic
-     *
-     * @var string
-     */
-    public $content;
-
-    /**
-     * @var PageRenderer
-     */
-    protected $pageRenderer;
-
-    /**
-     * Constructor
-     */
-    public function __construct()
-    {
-        trigger_error(
-            self::class . ' will be removed in TYPO3 v10.0. Use route wizard_element_browser instead.',
-            E_USER_DEPRECATED
-        );
-        $GLOBALS['SOBE'] = $this;
-    }
-
-    /**
-     * Injects the request object for the current request or subrequest
-     * As this controller goes only through the main() method, it is rather simple for now
-     *
-     * @param ServerRequestInterface $request the current request
-     * @return ResponseInterface the response with the content
-     */
-    public function mainAction(ServerRequestInterface $request): ResponseInterface
-    {
-        $this->main();
-        return new HtmlResponse($this->content);
-    }
-
-    /**
-     * Main function.
-     * Creates the header code in XHTML, the JavaScript, then the frameset for the two frames.
-     */
-    public function main()
-    {
-        // Setting GPvars:
-        $mode = GeneralUtility::_GP('mode');
-        $bparams = GeneralUtility::_GP('bparams');
-        /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
-        $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
-        $moduleUrl = (string)$uriBuilder->buildUriFromRoute('wizard_element_browser') . '&mode=';
-        $documentTemplate = $this->getDocumentTemplate();
-        $documentTemplate->JScode = GeneralUtility::wrapJS('
-                               function closing() {    //
-                                       close();
-                               }
-                               function setParams(mode,params) {       //
-                                       parent.content.location.href = ' . GeneralUtility::quoteJSvalue($moduleUrl) . '+mode+"&bparams="+params;
-                               }
-                               if (!window.opener) {
-                                       alert("ERROR: Sorry, no link to main window... Closing");
-                                       close();
-                               }
-               ');
-
-        // build the header part
-        $documentTemplate->startPage($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:TYPO3_Element_Browser'));
-
-        // URL for the inner main frame:
-        $url = $moduleUrl . rawurlencode($mode) . '&bparams=' . rawurlencode($bparams);
-
-        // Create the frameset for the window
-        // Formerly there were a ' onunload="closing();"' in the <frameset> tag - but it failed on Safari browser on Mac unless the handler was "onUnload"
-        $this->content = $this->getPageRenderer()->render(PageRenderer::PART_HEADER) .
-            '<frameset rows="*,1" framespacing="0" frameborder="0" border="0">
-                               <frame name="content" src="' . htmlspecialchars($url) . '" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" noresize="noresize" />
-                               <frame name="menu" src="' . htmlspecialchars((string)$uriBuilder->buildUriFromRoute('dummy')) . '" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" noresize="noresize" />
-                       </frameset>
-               </html>
-               ';
-    }
-
-    /**
-     * @return DocumentTemplate
-     */
-    protected function getDocumentTemplate()
-    {
-        return $GLOBALS['TBE_TEMPLATE'];
-    }
-
-    /**
-     * @return LanguageService
-     */
-    protected function getLanguageService()
-    {
-        return $GLOBALS['LANG'];
-    }
-
-    /**
-     * @return PageRenderer
-     */
-    protected function getPageRenderer()
-    {
-        if ($this->pageRenderer === null) {
-            $this->pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
-        }
-
-        return $this->pageRenderer;
-    }
-}