[!!!][TASK] Remove deprecated core authentication related code 45/59245/3
authorChristian Kuhn <lolli@schwarzbu.ch>
Thu, 20 Dec 2018 19:30:55 +0000 (20:30 +0100)
committerBenni Mack <benni@typo3.org>
Fri, 21 Dec 2018 14:01:34 +0000 (15:01 +0100)
Mostly removes code related to core authentication
classes.

Resolves: #87248
Releases: master
Change-Id: I711e1fae63fecabd1b1a51854698319112db2824
Reviewed-on: https://review.typo3.org/59245
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Alexander Schnitzler <typo3@alexanderschnitzler.de>
Tested-by: Alexander Schnitzler <typo3@alexanderschnitzler.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Classes/Authentication/AbstractAuthenticationService.php
typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
typo3/sysext/core/Classes/Database/PdoHelper.php [deleted file]
typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst
typo3/sysext/core/Tests/UnitDeprecated/Authentication/BackendUserAuthenticationTest.php [deleted file]
typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodArgumentDroppedMatcher.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyProtectedMatcher.php

index 90d8f72..68bc151 100644 (file)
@@ -95,21 +95,6 @@ class AbstractAuthenticationService extends AbstractService
     }
 
     /**
-     * Check the login data with the user record data for builtin login methods
-     *
-     * @param array $user User data array
-     * @param array $loginData Login data array
-     * @param string $passwordCompareStrategy Password compare strategy
-     * @return bool TRUE if login data matched
-     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
-     */
-    public function compareUident(array $user, array $loginData, $passwordCompareStrategy = '')
-    {
-        trigger_error('This method will be removed in TYPO3 v10.0.', E_USER_DEPRECATED);
-        return $this->pObj->compareUident($user, $loginData, $passwordCompareStrategy);
-    }
-
-    /**
      * Writes to log database table in pObj
      *
      * @param int $type denotes which module that has submitted the entry. This is the current list:  1=tce_db; 2=tce_file; 3=system (eg. sys_history save); 4=modules; 254=Personal settings changed; 255=login / out action: 1=login, 2=logout, 3=failed login (+ errorcode 3), 4=failure_warning_email sent
index 6adf0fb..ef481be 100644 (file)
@@ -20,7 +20,6 @@ use TYPO3\CMS\Core\Core\Environment;
 use TYPO3\CMS\Core\Crypto\Random;
 use TYPO3\CMS\Core\Database\Connection;
 use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Database\Query\QueryHelper;
 use TYPO3\CMS\Core\Database\Query\Restriction\DefaultRestrictionContainer;
 use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
 use TYPO3\CMS\Core\Database\Query\Restriction\EndTimeRestriction;
@@ -1391,21 +1390,6 @@ abstract class AbstractUserAuthentication implements LoggerAwareInterface
     }
 
     /**
-     * Check the login data with the user record data for builtin login methods
-     *
-     * @param array $user User data array
-     * @param array $loginData Login data array
-     * @param string $passwordCompareStrategy Alternative passwordCompareStrategy. Used when authentication services wants to override the default.
-     * @return bool TRUE if login data matched
-     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
-     */
-    public function compareUident($user, $loginData, $passwordCompareStrategy = '')
-    {
-        trigger_error('This method will be removed in TYPO3 v10.0.', E_USER_DEPRECATED);
-        return (string)$loginData['uident_text'] !== '' && (string)$loginData['uident_text'] === (string)$user[$this->userident_column];
-    }
-
-    /**
      * Garbage collector, removing old expired sessions.
      *
      * @internal
@@ -1510,50 +1494,6 @@ abstract class AbstractUserAuthentication implements LoggerAwareInterface
     }
 
     /**
-     * Get a user from DB by username
-     * provided for usage from services
-     *
-     * @param array $dbUser User db table definition: $this->db_user
-     * @param string $username user name
-     * @param string $extraWhere Additional WHERE clause: " AND ...
-     * @return mixed User array or FALSE
-     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0
-     */
-    public function fetchUserRecord($dbUser, $username, $extraWhere = '')
-    {
-        trigger_error('This method will be removed in TYPO3 v10.0.', E_USER_DEPRECATED);
-        $user = false;
-        if ($username || $extraWhere) {
-            $query = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($dbUser['table']);
-            $query->getRestrictions()->removeAll()
-                ->add(GeneralUtility::makeInstance(DeletedRestriction::class));
-
-            $constraints = array_filter([
-                QueryHelper::stripLogicalOperatorPrefix($dbUser['check_pid_clause']),
-                QueryHelper::stripLogicalOperatorPrefix($dbUser['enable_clause']),
-                QueryHelper::stripLogicalOperatorPrefix($extraWhere),
-            ]);
-
-            if (!empty($username)) {
-                array_unshift(
-                    $constraints,
-                    $query->expr()->eq(
-                        $dbUser['username_column'],
-                        $query->createNamedParameter($username, \PDO::PARAM_STR)
-                    )
-                );
-            }
-
-            $user = $query->select('*')
-                ->from($dbUser['table'])
-                ->where(...$constraints)
-                ->execute()
-                ->fetch();
-        }
-        return $user;
-    }
-
-    /**
      * @internal
      * @return string
      */
index 40970d7..17db690 100644 (file)
@@ -16,7 +16,6 @@ namespace TYPO3\CMS\Core\Authentication;
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Cache\CacheManager;
-use TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait;
 use TYPO3\CMS\Core\Database\Connection;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder;
@@ -43,25 +42,9 @@ use TYPO3\CMS\Install\Service\SessionService;
  */
 class BackendUserAuthentication extends AbstractUserAuthentication
 {
-    use PublicPropertyDeprecationTrait;
-
     public const ROLE_SYSTEMMAINTAINER = 'systemMaintainer';
 
     /**
-     * Properties which have been moved to protected status from public
-     *
-     * @var array
-     */
-    protected $deprecatedPublicProperties = [
-        'TSdataArray' => 'Using $TSdataArray of class BackendUserAuthentication from the outside is discouraged. This property is for class internal use only.',
-        'userTS' => 'Using $userTS of class BackendUserAuthentication from the outside is discouraged. Use getTSConfig() instead.',
-        'userTSUpdated' => 'Using $userTSUpdated of class BackendUserAuthentication from the outside is discouraged. This property is for class internal use only.',
-        'userTS_text' => 'Using $userTS_text of class BackendUserAuthentication from the outside is discouraged. This property is for class internal use only.',
-        'userTS_dontGetCached' => 'Using $userTS_dontGetCached of class BackendUserAuthentication is deprecated. The property will be removed in TYPO3 v10.0.',
-        'checkWorkspaceCurrent_cache' => 'Using $checkWorkspaceCurrent_cache of class BackendUserAuthentication is marked as internal, as its sole purpose is a runtime cache for internal calls.',
-    ];
-
-    /**
      * Should be set to the usergroup-column (id-list) in the user-record
      * @var string
      */
@@ -164,12 +147,6 @@ class BackendUserAuthentication extends AbstractUserAuthentication
     protected $userTSUpdated = false;
 
     /**
-     * @var bool
-     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. If true, parsed TSconfig will not be cached
-     */
-    protected $userTS_dontGetCached = false;
-
-    /**
      * Contains last error message
      * @var string
      */
@@ -419,23 +396,13 @@ class BackendUserAuthentication extends AbstractUserAuthentication
      * Checks access to a backend module with the $MCONF passed as first argument
      *
      * @param array $conf $MCONF array of a backend module!
-     * @param bool $exitOnError If set, an array will issue an error message and exit. @deprecated will be removed in TYPO3 v10.0. and exceptions will always be caught. In TYPO3 v10.0. Custom permission-based Exceptions should be thrown.
      * @throws \RuntimeException
      * @return bool Will return TRUE if $MCONF['access'] is not set at all, if the BE_USER is admin or if the module is enabled in the be_users/be_groups records of the user (specifically enabled). Will return FALSE if the module name is not even found in $TBE_MODULES
      */
-    public function modAccess($conf, $exitOnError = null)
+    public function modAccess($conf)
     {
-        if ($exitOnError !== null) {
-            trigger_error('Calling BackendUserAuthentication->modAccess() with a second argument is deprecated, as the default behaviour is throwing exceptions, which might get customized in TYPO3 v10.0. Remove the second argument within modAccess() to avoid the deprecation, and ensure to catch the Exception in the callers code.', E_USER_DEPRECATED);
-        } else {
-            // new default behaviour (true by default when no second parameter given)
-            $exitOnError = true;
-        }
         if (!BackendUtility::isModuleSetInTBE_MODULES($conf['name'])) {
-            if ($exitOnError) {
-                throw new \RuntimeException('Fatal Error: This module "' . $conf['name'] . '" is not enabled in TBE_MODULES', 1294586446);
-            }
-            return false;
+            throw new \RuntimeException('Fatal Error: This module "' . $conf['name'] . '" is not enabled in TBE_MODULES', 1294586446);
         }
         // Workspaces check:
         if (
@@ -445,17 +412,11 @@ class BackendUserAuthentication extends AbstractUserAuthentication
             && ($this->workspace !== -1 || !GeneralUtility::inList($conf['workspaces'], 'offline'))
             && ($this->workspace <= 0 || !GeneralUtility::inList($conf['workspaces'], 'custom'))
         ) {
-            if ($exitOnError) {
-                throw new \RuntimeException('Workspace Error: This module "' . $conf['name'] . '" is not available under the current workspace', 1294586447);
-            }
-            return false;
+            throw new \RuntimeException('Workspace Error: This module "' . $conf['name'] . '" is not available under the current workspace', 1294586447);
         }
         // Returns false if conf[access] is set to system maintainers and the user is system maintainer
         if (strpos($conf['access'], self::ROLE_SYSTEMMAINTAINER) !== false && !$this->isSystemMaintainer()) {
-            if ($exitOnError) {
-                throw new \RuntimeException('This module "' . $conf['name'] . '" is only available as system maintainer', 1504804727);
-            }
-            return false;
+            throw new \RuntimeException('This module "' . $conf['name'] . '" is only available as system maintainer', 1504804727);
         }
         // Returns TRUE if conf[access] is not set at all or if the user is admin
         if (!$conf['access'] || $this->isAdmin()) {
@@ -466,7 +427,7 @@ class BackendUserAuthentication extends AbstractUserAuthentication
         if (!strstr($conf['access'], 'admin') && $conf['name']) {
             $acs = $this->check('modules', $conf['name']);
         }
-        if (!$acs && $exitOnError) {
+        if (!$acs) {
             throw new \RuntimeException('Access Error: You don\'t have access to this module.', 1294586448);
         }
         return $acs;
@@ -896,45 +857,6 @@ class BackendUserAuthentication extends AbstractUserAuthentication
     }
 
     /**
-     * Checks a type of permission against the compiled permission integer,
-     * $compiledPermissions, and in relation to table, $tableName
-     *
-     * @param int $compiledPermissions Could typically be the "compiled permissions" integer returned by ->calcPerms
-     * @param string $tableName Is the tablename to check: If "pages" table then edit,new,delete and editcontent permissions can be checked. Other tables will be checked for "editcontent" only (and $type will be ignored)
-     * @param string $actionType For $tableName='pages' this can be 'edit' (2), 'new' (8 or 16), 'delete' (4), 'editcontent' (16). For all other tables this is ignored. (16 is used)
-     * @return bool
-     * @deprecated since TYPO3 v9.5, will be removed in TYPO3 v10.0.
-     */
-    public function isPSet($compiledPermissions, $tableName, $actionType = '')
-    {
-        trigger_error('BackendUserAuthentication->isPSet() will be removed in TYPO3 v10.0. Use doesUserHaveAccess() and calcPerms().', E_USER_DEPRECATED);
-        if ($this->isAdmin()) {
-            $result = true;
-        } elseif ($tableName === 'pages') {
-            switch ($actionType) {
-                case 'edit':
-                    $result = ($compiledPermissions & Permission::PAGE_EDIT) !== 0;
-                    break;
-                case 'new':
-                    // Create new page OR page content
-                    $result = ($compiledPermissions & Permission::PAGE_NEW + Permission::CONTENT_EDIT) !== 0;
-                    break;
-                case 'delete':
-                    $result = ($compiledPermissions & Permission::PAGE_DELETE) !== 0;
-                    break;
-                case 'editcontent':
-                    $result = ($compiledPermissions & Permission::CONTENT_EDIT) !== 0;
-                    break;
-                default:
-                    $result = false;
-            }
-        } else {
-            $result = ($compiledPermissions & Permission::CONTENT_EDIT) !== 0;
-        }
-        return $result;
-    }
-
-    /**
      * Returns TRUE if the BE_USER is allowed to *create* shortcuts in the backend modules
      *
      * @return bool
@@ -1228,67 +1150,11 @@ class BackendUserAuthentication extends AbstractUserAuthentication
      *     ],
      * ]
      *
-     * @param string $objectString @deprecated
-     * @param array|string $config @deprecated
      * @return array Parsed and merged user TSconfig array
      */
-    public function getTSConfig($objectString = null, $config = null)
+    public function getTSConfig()
     {
-        if ($objectString === null && $config === null) {
-            return $this->userTS;
-        }
-
-        trigger_error('Handing over arguments to BackendUserAuthentication->getTSConfig() will be removed in TYPO3 v10.0.', E_USER_DEPRECATED);
-
-        if (!is_array($config)) {
-            // Getting Root-ts if not sent
-            $config = $this->userTS;
-        }
-        $TSConf = ['value' => null, 'properties' => null];
-        $parts = GeneralUtility::trimExplode('.', $objectString, true, 2);
-        $key = $parts[0];
-        if ($key !== '') {
-            if (count($parts) > 1 && $parts[1] !== '') {
-                // Go on, get the next level
-                if (is_array($config[$key . '.'] ?? false)) {
-                    $TSConf = $this->getTSConfig($parts[1], $config[$key . '.']);
-                }
-            } else {
-                $TSConf['value'] = $config[$key] ?? null;
-                $TSConf['properties'] = $config[$key . '.'] ?? null;
-            }
-        }
-        return $TSConf;
-    }
-
-    /**
-     * Returns the "value" of the $objectString from the BE_USERS "User TSconfig" array
-     *
-     * @param string $objectString Object string, eg. "somestring.someproperty.somesubproperty
-     * @return string The value for that object string (object path)
-     * @see getTSConfig()
-     * @deprecated since TYPO3 v9, will be removed with TYPO3 v10.0
-     */
-    public function getTSConfigVal($objectString)
-    {
-        trigger_error('BackendUserAuthentication->getTSConfigVal() will be removed in TYPO3 v10.0. Use getTSConfig() instead.', E_USER_DEPRECATED);
-        $TSConf = $this->getTSConfig($objectString);
-        return $TSConf['value'];
-    }
-
-    /**
-     * Returns the "properties" of the $objectString from the BE_USERS "User TSconfig" array
-     *
-     * @param string $objectString Object string, eg. "somestring.someproperty.somesubproperty
-     * @return array The properties for that object string (object path) - if any
-     * @see getTSConfig()
-     * @deprecated since TYPO3 v9, will be removed with TYPO3 v10.0
-     */
-    public function getTSConfigProp($objectString)
-    {
-        trigger_error('BackendUserAuthentication->getTSConfigProp() will be removed in TYPO3 v10.0. Use getTSConfig() instead.', E_USER_DEPRECATED);
-        $TSConf = $this->getTSConfig($objectString);
-        return $TSConf['properties'];
+        return $this->userTS;
     }
 
     /**
@@ -1430,32 +1296,16 @@ class BackendUserAuthentication extends AbstractUserAuthentication
             $this->TSdataArray = \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::checkIncludeLines_array($this->TSdataArray);
             // Imploding with "[global]" will make sure that non-ended confinements with braces are ignored.
             $this->userTS_text = implode(LF . '[GLOBAL]' . LF, $this->TSdataArray);
-            if (!$this->userTS_dontGetCached) {
-                // @deprecated: Property userTS_dontGetCached is deprecated since TYPO3 v9 and will be removed in TYPO3 v10.0
-                // Perform TS-Config parsing with condition matching
-                $parseObj = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Configuration\TsConfigParser::class);
-                $res = $parseObj->parseTSconfig($this->userTS_text, 'userTS');
-                if ($res) {
-                    $this->userTS = $res['TSconfig'];
-                    $this->userTSUpdated = (bool)$res['cached'];
-                }
-            } else {
-                // Parsing the user TSconfig (or getting from cache)
-                $hash = md5('userTS:' . $this->userTS_text);
-                $cache = GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_hash');
-                $cachedContent = $cache->get($hash);
-                if (is_array($cachedContent) && !$this->userTS_dontGetCached) {
-                    // @deprecated: Property userTS_dontGetCached is deprecated since TYPO3 v9 and will be removed in TYPO3 v10.0
-                    $this->userTS = $cachedContent;
-                } else {
-                    $parseObj = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::class);
-                    $parseObj->parse($this->userTS_text);
-                    $this->userTS = $parseObj->setup;
-                    $cache->set($hash, $this->userTS, ['ident_BE_USER_TSconfig'], 0);
-                    // Update UC:
-                    $this->userTSUpdated = true;
-                }
-            }
+            // Parsing the user TSconfig (or getting from cache)
+            $hash = md5('userTS:' . $this->userTS_text);
+            $cache = GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_hash');
+            $cachedContent = $cache->get($hash);
+            $parseObj = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::class);
+            $parseObj->parse($this->userTS_text);
+            $this->userTS = $parseObj->setup;
+            $cache->set($hash, $this->userTS, ['ident_BE_USER_TSconfig'], 0);
+            // Update UC:
+            $this->userTSUpdated = true;
             // Processing webmounts
             // Admin's always have the root mounted
             if ($this->isAdmin() && !($this->getTSConfig()['options.']['dontMountAdminMounts'] ?? false)) {
@@ -2086,26 +1936,6 @@ class BackendUserAuthentication extends AbstractUserAuthentication
     }
 
     /**
-     * Creates a TypoScript comment with the string text inside.
-     *
-     * @param string $str The text to wrap in comment prefixes and delimiters.
-     * @return string TypoScript comment with the string text inside.
-     * @deprecated since TYPO3 v9, will be removed with TYPO3 v10.0
-     */
-    public function addTScomment($str)
-    {
-        trigger_error('BackendUserAuthentication->addTScomment() will be removed in TYPO3 v10.0.', E_USER_DEPRECATED);
-        $delimiter = '# ***********************************************';
-        $out = $delimiter . LF;
-        $lines = GeneralUtility::trimExplode(LF, $str);
-        foreach ($lines as $v) {
-            $out .= '# ' . $v . LF;
-        }
-        $out .= $delimiter . LF;
-        return $out;
-    }
-
-    /**
      * Initializing workspace.
      * Called from within this function, see fetchGroupData()
      *
@@ -2408,21 +2238,6 @@ class BackendUserAuthentication extends AbstractUserAuthentication
     }
 
     /**
-     * Simple logging function
-     *
-     * @param string $message Log message
-     * @param string $extKey Option extension key / module name
-     * @param int $error Error level. 0 = message, 1 = error (user problem), 2 = System Error (which should not happen), 3 = security notice (admin)
-     * @return int Log entry UID
-     * @deprecated since TYPO3 v9, will be removed with TYPO3 v10.0
-     */
-    public function simplelog($message, $extKey = '', $error = 0)
-    {
-        trigger_error('BackendUserAuthentication->simplelog() will be removed in TYPO3 v10.0. Use writelog, or better, PSR-3 based logging instead.', E_USER_DEPRECATED);
-        return $this->writelog(4, 0, $error, 0, ($extKey ? '[' . $extKey . '] ' : '') . $message, []);
-    }
-
-    /**
      * Sends a warning to $email if there has been a certain amount of failed logins during a period.
      * If a login fails, this function is called. It will look up the sys_log to see if there
      * have been more than $max failed logins the last $secondsBack seconds (default 3600).
diff --git a/typo3/sysext/core/Classes/Database/PdoHelper.php b/typo3/sysext/core/Classes/Database/PdoHelper.php
deleted file mode 100644 (file)
index 5f97dd4..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-namespace TYPO3\CMS\Core\Database;
-
-/*
- * 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!
- */
-
-/**
- * A helper class for handling PDO databases
- *
- * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0
- */
-class PdoHelper
-{
-    /**
-     * Pumps the SQL into the database. Use for DDL only.
-     *
-     * Important: key definitions with length specifiers (needed for MySQL) must
-     * be given as "field"(xyz) - no space between double quote and parenthesis -
-     * so they can be removed automatically.
-     *
-     * @param \PDO $databaseHandle
-     * @param string $pdoDriver
-     * @param string $pathAndFilename
-     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0
-     */
-    public static function importSql(\PDO $databaseHandle, $pdoDriver, $pathAndFilename)
-    {
-        trigger_error('PdoHelper will be removed in TYPO3 v10.0.', E_USER_DEPRECATED);
-        $sql = file($pathAndFilename, FILE_IGNORE_NEW_LINES & FILE_SKIP_EMPTY_LINES);
-        // Remove MySQL style key length delimiters (yuck!) if we are not setting up a MySQL db
-        if (strpos($pdoDriver, 'mysql') !== 0) {
-            $sql = preg_replace('/"\\([0-9]+\\)/', '"', $sql);
-        }
-        $statement = '';
-        foreach ($sql as $line) {
-            $statement .= ' ' . trim($line);
-            if (substr($statement, -1) === ';') {
-                $databaseHandle->exec($statement);
-                $statement = '';
-            }
-        }
-    }
-}
index c74aacc..8936f35 100644 (file)
@@ -76,9 +76,10 @@ The following PHP class aliases that have been previously deprecated for v9 have
 
 * :php:`TYPO3\CMS\Backend\AjaxLoginHandler`
 * :php:`TYPO3\CMS\Backend\Form\Wizard\ImageManipulationWizard`
-* :php:`TYPO3\CMS\Core\History\RecordHistory`
+* :php:`TYPO3\CMS\Core\Database\PdoHelper`
 * :php:`TYPO3\CMS\Core\IO\PharStreamWrapper`
 * :php:`TYPO3\CMS\Core\IO\PharStreamWrapperException`
+* :php:`TYPO3\CMS\Core\History\RecordHistory`
 * :php:`TYPO3\CMS\Core\Tree\TableConfiguration\ExtJsArrayTreeRenderer`
 * :php:`TYPO3\CMS\ContextHelp\Controller\ContextHelpAjaxController`
 * :php:`TYPO3\CMS\Cshmanual\Domain\Repository\TableManualRepository`
@@ -199,6 +200,14 @@ The following PHP class methods that have been previously deprecated for v9 have
 * :php:`TYPO3\CMS\Backend\FrontendBackendUserAuthentication->extPageReadAccess()`
 * :php:`TYPO3\CMS\Backend\FrontendBackendUserAuthentication->extGetTreeList()`
 * :php:`TYPO3\CMS\Backend\FrontendBackendUserAuthentication->extGetLL()`
+* :php:`TYPO3\CMS\Core\Authentication\AbstractAuthenticationService->compareUident()`
+* :php:`TYPO3\CMS\Core\Authentication\AbstractUserAuthentication->compareUident()`
+* :php:`TYPO3\CMS\Core\Authentication\AbstractUserAuthentication->fetchUserRecord()`
+* :php:`TYPO3\CMS\Core\Authentication\BackendUserAuthentication->addTScomment()`
+* :php:`TYPO3\CMS\Core\Authentication\BackendUserAuthentication->getTSConfigProp()`
+* :php:`TYPO3\CMS\Core\Authentication\BackendUserAuthentication->getTSConfigVal()`
+* :php:`TYPO3\CMS\Core\Authentication\BackendUserAuthentication->isPSet()`
+* :php:`TYPO3\CMS\Core\Authentication\BackendUserAuthentication->simplelog()`
 * :php:`TYPO3\CMS\Core\Charset\CharsetConverter->convArray()`
 * :php:`TYPO3\CMS\Core\Charset\CharsetConverter->convCaseFirst()`
 * :php:`TYPO3\CMS\Core\Charset\CharsetConverter->crop()`
@@ -367,6 +376,8 @@ The following methods changed signature according to previous deprecations in v9
 
 * :php:`TYPO3\CMS\Backend\Http\RouteDispatcher->dispatch()` - Second argument dropped
 * :php:`TYPO3\CMS\Backend\Utility\BackendUtility::getPagesTSconfig()` - Second and third argument dropped
+* :php:`TYPO3\CMS\Core\Authentication\BackendUserAuthentication->modAccess() - Second argument dropped
+* :php:`TYPO3\CMS\Core\Authentication\BackendUserAuthentication->getTSConfig() - First and second argument dropped
 * :php:`TYPO3\CMS\Core\Charset\CharsetConverter->conv()` - Fourth argument dropped
 * :php:`TYPO3\CMS\Core\Core\Bootstrap->checkIfEssentialConfigurationExists()` - First argument mandatory
 * :php:`TYPO3\CMS\Core\Core\Bootstrap->populateLocalConfiguration()` - First argument mandatory
@@ -399,6 +410,7 @@ The following public class properties have been dropped:
 * :php:`TYPO3\CMS\Backend\FrontendBackendUserAuthentication->adminPanel`
 * :php:`TYPO3\CMS\Backend\FrontendBackendUserAuthentication->frontendEdit`
 * :php:`TYPO3\CMS\Backend\FrontendBackendUserAuthentication->extAdminConfig`
+* :php:`TYPO3\CMS\Core\Authentication\BackendUserAuthentication->userTS_dontGetCached`
 * :php:`TYPO3\CMS\Core\Charset\CharsetConverter->synonyms`
 * :php:`TYPO3\CMS\Core\TypoScript\TemplateService->allowedPaths`
 * :php:`TYPO3\CMS\Core\TypoScript\TemplateService->debug`
@@ -579,6 +591,11 @@ The following class properties have changed visibility:
 * :php:`TYPO3\CMS\Backend\Controller\EditDocumentController->viewId` changed from public to protected
 * :php:`TYPO3\CMS\Backend\Controller\EditDocumentController->viewId_addParams` changed from public to protected
 * :php:`TYPO3\CMS\Backend\Controller\EditDocumentController->viewUrl` changed from public to protected
+* :php:`TYPO3\CMS\Core\Authentication\BackendUserAuthentication->checkWorkspaceCurrent_cache` changed from public to protected
+* :php:`TYPO3\CMS\Core\Authentication\BackendUserAuthentication->TSdataArray` changed from public to protected
+* :php:`TYPO3\CMS\Core\Authentication\BackendUserAuthentication->userTS` changed from public to protected
+* :php:`TYPO3\CMS\Core\Authentication\BackendUserAuthentication->userTSUpdated` changed from public to protected
+* :php:`TYPO3\CMS\Core\Authentication\BackendUserAuthentication->userTS_text` changed from public to protected
 * :php:`TYPO3\CMS\Core\Charset\CharsetConverter->eucBasedSets` changed from public to protected
 * :php:`TYPO3\CMS\Core\Charset\CharsetConverter->noCharByteVal` changed from public to protected
 * :php:`TYPO3\CMS\Core\Charset\CharsetConverter->parsedCharsets` changed from public to protected
diff --git a/typo3/sysext/core/Tests/UnitDeprecated/Authentication/BackendUserAuthenticationTest.php b/typo3/sysext/core/Tests/UnitDeprecated/Authentication/BackendUserAuthenticationTest.php
deleted file mode 100644 (file)
index e285c15..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-<?php
-declare(strict_types = 1);
-namespace TYPO3\CMS\Core\Tests\UnitDeprecated\Authentication;
-
-/*
- * 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\Log\NullLogger;
-use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
-use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
-
-/**
- * Test case
- */
-class BackendUserAuthenticationTest extends UnitTestCase
-{
-    /**
-     * @return array
-     */
-    public function getTSConfigDataProvider(): array
-    {
-        $completeConfiguration = [
-            'value' => 'oneValue',
-            'value.' => ['oneProperty' => 'oneValue'],
-            'permissions.' => [
-                'file.' => [
-                    'default.' => ['readAction' => '1'],
-                    '1.' => ['writeAction' => '1'],
-                    '0.' => ['readAction' => '0'],
-                ],
-            ]
-        ];
-
-        return [
-            'single level string' => [
-                $completeConfiguration,
-                'permissions',
-                [
-                    'value' => null,
-                    'properties' =>
-                    [
-                        'file.' => [
-                            'default.' => ['readAction' => '1'],
-                            '1.' => ['writeAction' => '1'],
-                            '0.' => ['readAction' => '0'],
-                        ],
-                    ],
-                ],
-            ],
-            'two levels string' => [
-                $completeConfiguration,
-                'permissions.file',
-                [
-                    'value' => null,
-                    'properties' =>
-                    [
-                        'default.' => ['readAction' => '1'],
-                        '1.' => ['writeAction' => '1'],
-                        '0.' => ['readAction' => '0'],
-                    ],
-                ],
-            ],
-            'three levels string' => [
-                $completeConfiguration,
-                'permissions.file.default',
-                [
-                    'value' => null,
-                    'properties' =>
-                    ['readAction' => '1'],
-                ],
-            ],
-            'three levels string with integer property' => [
-                $completeConfiguration,
-                'permissions.file.1',
-                [
-                    'value' => null,
-                    'properties' => ['writeAction' => '1'],
-                ],
-            ],
-            'three levels string with integer zero property' => [
-                $completeConfiguration,
-                'permissions.file.0',
-                [
-                    'value' => null,
-                    'properties' => ['readAction' => '0'],
-                ],
-            ],
-            'four levels string with integer zero property, value, no properties' => [
-                $completeConfiguration,
-                'permissions.file.0.readAction',
-                [
-                    'value' => '0',
-                    'properties' => null,
-                ],
-            ],
-            'four levels string with integer property, value, no properties' => [
-                $completeConfiguration,
-                'permissions.file.1.writeAction',
-                [
-                    'value' => '1',
-                    'properties' => null,
-                ],
-            ],
-            'one level, not existent string' => [
-                $completeConfiguration,
-                'foo',
-                [
-                    'value' => null,
-                    'properties' => null,
-                ],
-            ],
-            'two level, not existent string' => [
-                $completeConfiguration,
-                'foo.bar',
-                [
-                    'value' => null,
-                    'properties' => null,
-                ],
-            ],
-            'two level, where second level does not exist' => [
-                $completeConfiguration,
-                'permissions.bar',
-                [
-                    'value' => null,
-                    'properties' => null,
-                ],
-            ],
-            'three level, where third level does not exist' => [
-                $completeConfiguration,
-                'permissions.file.foo',
-                [
-                    'value' => null,
-                    'properties' => null,
-                ],
-            ],
-            'three level, where second and third level does not exist' => [
-                $completeConfiguration,
-                'permissions.foo.bar',
-                [
-                    'value' => null,
-                    'properties' => null,
-                ],
-            ],
-            'value and properties' => [
-                $completeConfiguration,
-                'value',
-                [
-                    'value' => 'oneValue',
-                    'properties' => ['oneProperty' => 'oneValue'],
-                ],
-            ],
-        ];
-    }
-
-    /**
-     * @param array $completeConfiguration
-     * @param string $objectString
-     * @param array $expectedConfiguration
-     * @dataProvider getTSConfigDataProvider
-     * @test
-     */
-    public function getTSConfigReturnsCorrectArrayForGivenObjectString(array $completeConfiguration, $objectString, array $expectedConfiguration): void
-    {
-        /** @var BackendUserAuthentication|\PHPUnit_Framework_MockObject_MockObject $subject */
-        $subject = $this->getAccessibleMock(BackendUserAuthentication::class, ['dummy'], [], '', false);
-        $subject->setLogger(new NullLogger());
-        $subject->_set('userTS', $completeConfiguration);
-
-        $actualConfiguration = $subject->getTSConfig($objectString);
-        $this->assertSame($expectedConfiguration, $actualConfiguration);
-    }
-}
index 526abd4..c4e11c9 100644 (file)
@@ -153,7 +153,8 @@ return [
     'TYPO3\CMS\core\Authentication\BackendUserAuthentication->getTSConfig' => [
         'maximumNumberOfArguments' => 0,
         'restFiles' => [
-            'Deprecation-84993-DeprecateSomeTSconfigRelatedMethods.rst'
+            'Deprecation-84993-DeprecateSomeTSconfigRelatedMethods.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     'TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository->fetchOriginLanguage' => [
@@ -217,7 +218,8 @@ return [
     'TYPO3\CMS\Core\Authentication\BackendUserAuthentication->modAccess' => [
         'maximumNumberOfArguments' => 2,
         'restFiles' => [
-            'Deprecation-86441-VariousMethodsAndPropertiesInsideBackendUserAuthentication.rst'
+            'Deprecation-86441-VariousMethodsAndPropertiesInsideBackendUserAuthentication.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
 ];
index a40a9bf..f9534b5 100644 (file)
@@ -2449,6 +2449,7 @@ return [
         'maximumNumberOfArguments' => 1,
         'restFiles' => [
             'Deprecation-84980-BackendUserAuthentication-addTScommentDeprecated.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     'TYPO3\CMS\Core\Authentication\BackendUserAuthentication->simplelog' => [
@@ -2456,6 +2457,7 @@ return [
         'maximumNumberOfArguments' => 3,
         'restFiles' => [
             'Deprecation-84981-BackendUserAuthentication-simplelogDeprecated.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     'TYPO3\CMS\Core\Authentication\BackendUserAuthentication->getTSConfigVal' => [
@@ -2463,6 +2465,7 @@ return [
         'maximumNumberOfArguments' => 1,
         'restFiles' => [
             'Deprecation-84993-DeprecateSomeTSconfigRelatedMethods.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     'TYPO3\CMS\Core\Authentication\BackendUserAuthentication->getTSConfigProp' => [
@@ -2470,6 +2473,7 @@ return [
         'maximumNumberOfArguments' => 1,
         'restFiles' => [
             'Deprecation-84993-DeprecateSomeTSconfigRelatedMethods.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     'TYPO3\CMS\backend\Tree\View\PagePositionMap->getModConfig' => [
@@ -3356,14 +3360,16 @@ return [
         'numberOfMandatoryArguments' => 2,
         'maximumNumberOfArguments' => 3,
         'restFiles' => [
-            'Deprecation-85960-CompareUidentDeprecated.rst'
+            'Deprecation-85960-CompareUidentDeprecated.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     'TYPO3\CMS\Core\Authentication\AbstractAuthenticationService->compareUident' => [
         'numberOfMandatoryArguments' => 2,
         'maximumNumberOfArguments' => 3,
         'restFiles' => [
-            'Deprecation-85960-CompareUidentDeprecated.rst'
+            'Deprecation-85960-CompareUidentDeprecated.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     'TYPO3\CMS\Frontend\Page\PageRepository->getFirstWebPage' => [
@@ -3840,7 +3846,8 @@ return [
         'numberOfMandatoryArguments' => 2,
         'maximumNumberOfArguments' => 3,
         'restFiles' => [
-            'Deprecation-86441-VariousMethodsAndPropertiesInsideBackendUserAuthentication.rst'
+            'Deprecation-86441-VariousMethodsAndPropertiesInsideBackendUserAuthentication.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     'TYPO3\CMS\Core\Html\RteHtmlParser->TS_images_db' => [
@@ -3931,7 +3938,8 @@ return [
         'numberOfMandatoryArguments' => 2,
         'maximumNumberOfArguments' => 3,
         'restFiles' => [
-            'Deprecation-86466-AbstractUserAuthentication-fetchUserRecord.rst'
+            'Deprecation-86466-AbstractUserAuthentication-fetchUserRecord.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->nextDivider' => [
index 2a861a6..43f9a2e 100644 (file)
@@ -586,27 +586,32 @@ return [
     ],
     'TYPO3\CMS\Core\Authentication\BackendUserAuthentication->TSdataArray' => [
         'restFiles' => [
-            'Deprecation-84984-ProtectedUserTSconfigPropertiesInBackendUserAuthentication.rst'
+            'Deprecation-84984-ProtectedUserTSconfigPropertiesInBackendUserAuthentication.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     'TYPO3\CMS\Core\Authentication\BackendUserAuthentication->userTS' => [
         'restFiles' => [
-            'Deprecation-84984-ProtectedUserTSconfigPropertiesInBackendUserAuthentication.rst'
+            'Deprecation-84984-ProtectedUserTSconfigPropertiesInBackendUserAuthentication.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     'TYPO3\CMS\Core\Authentication\BackendUserAuthentication->userTSUpdated' => [
         'restFiles' => [
-            'Deprecation-84984-ProtectedUserTSconfigPropertiesInBackendUserAuthentication.rst'
+            'Deprecation-84984-ProtectedUserTSconfigPropertiesInBackendUserAuthentication.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     'TYPO3\CMS\Core\Authentication\BackendUserAuthentication->userTS_text' => [
         'restFiles' => [
-            'Deprecation-84984-ProtectedUserTSconfigPropertiesInBackendUserAuthentication.rst'
+            'Deprecation-84984-ProtectedUserTSconfigPropertiesInBackendUserAuthentication.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     'TYPO3\CMS\Core\Authentication\BackendUserAuthentication->userTS_dontGetCached' => [
         'restFiles' => [
-            'Deprecation-84984-ProtectedUserTSconfigPropertiesInBackendUserAuthentication.rst'
+            'Deprecation-84984-ProtectedUserTSconfigPropertiesInBackendUserAuthentication.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     'TYPO3\CMS\Backend\Tree\View\PagePositionMap->getModConfigCache' => [
@@ -1037,7 +1042,8 @@ return [
     ],
     'TYPO3\CMS\Core\Authentication\BackendUserAuthentication->checkWorkspaceCurrent_cache' => [
         'restFiles' => [
-            'Deprecation-86441-VariousMethodsAndPropertiesInsideBackendUserAuthentication.rst'
+            'Deprecation-86441-VariousMethodsAndPropertiesInsideBackendUserAuthentication.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->raw' => [