Commit 50153478 authored by Christian Kuhn's avatar Christian Kuhn Committed by Anja Leichsenring
Browse files

[TASK] Update t3lib mentions

Some core parts still mention t3lib classes after namespaces,
mostly in comments.

Related: #47138
Releases: 6.1

Change-Id: Ic3cb7119503e69b0914ef51b80360266ff3c2df8
Reviewed-on: https://review.typo3.org/19808
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
parent 36264ca7
......@@ -33,9 +33,7 @@ namespace TYPO3\CMS\Extbase\Configuration;
class BackendConfigurationManager extends \TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager {
/**
* t3lib_queryGenerator is needed to recursively fetch a page tree
*
* @var \TYPO3\CMS\Core\Database\QueryGenerator
* @var \TYPO3\CMS\Core\Database\QueryGenerator Needed to recursively fetch a page tree
*/
protected $queryGenerator;
......
......@@ -56,15 +56,15 @@ class FlashMessageContainer implements \TYPO3\CMS\Core\SingletonInterface {
/**
* Add another flash message.
* Severity can be specified and must be one of
* t3lib_FlashMessage::NOTICE,
* t3lib_FlashMessage::INFO,
* t3lib_FlashMessage::OK,
* t3lib_FlashMessage::WARNING,
* t3lib_FlashMessage::ERROR
* \TYPO3\CMS\Core\Messaging\FlashMessage::NOTICE,
* \TYPO3\CMS\Core\Messaging\FlashMessage::INFO,
* \TYPO3\CMS\Core\Messaging\FlashMessage::OK,
* \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING,
* \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
*
* @param string $message
* @param string $title optional message title
* @param integer $severity optional severity code. One of the t3lib_FlashMessage constants
* @param integer $severity optional severity code. One of the \TYPO3\CMS\Core\Messaging\FlashMessage constants
* @throws \InvalidArgumentException
* @return void
* @api
......@@ -72,7 +72,8 @@ class FlashMessageContainer implements \TYPO3\CMS\Core\SingletonInterface {
public function add($message, $title = '', $severity = \TYPO3\CMS\Core\Messaging\FlashMessage::OK) {
if (!is_string($message)) {
throw new \InvalidArgumentException(
'The flash message must be string, ' . gettype($message) . ' given.', 1243258395
'The flash message must be string, ' . gettype($message) . ' given.',
1243258395
);
}
/** @var $flashMessage \TYPO3\CMS\Core\Messaging\FlashMessage */
......@@ -85,7 +86,7 @@ class FlashMessageContainer implements \TYPO3\CMS\Core\SingletonInterface {
/**
* Get all flash messages currently available.
*
* @return array<t3lib_FlashMessage> An array of flash messages
* @return array<\TYPO3\CMS\Core\Messaging\FlashMessage> An array of flash messages
* @api
*/
public function getAllMessages() {
......@@ -105,8 +106,7 @@ class FlashMessageContainer implements \TYPO3\CMS\Core\SingletonInterface {
/**
* Get all flash messages currently available. And removes them from the session.
*
* @return array<t3lib_FlashMessage> An array of flash messages
* @see t3lib_FlashMessage
* @return array<\TYPO3\CMS\Core\Messaging\FlashMessage> An array of flash messages
* @api
*/
public function getAllMessagesAndFlush() {
......@@ -114,4 +114,4 @@ class FlashMessageContainer implements \TYPO3\CMS\Core\SingletonInterface {
}
}
?>
\ No newline at end of file
?>
......@@ -27,8 +27,9 @@ namespace TYPO3\CMS\Extbase\Utility;
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* The array functions from the good old t3lib_div plus new code.
* The array functions from good old GeneralUtility plus new code.
*
* @api
*/
......
......@@ -160,7 +160,8 @@ tt_content.' . $pluginSignature . ' {
}
/**
* This method is called from t3lib_loadModules::checkMod and it replaces old conf.php.
* This method is called from \TYPO3\CMS\Backend\Module\ModuleLoader::checkMod
* and it replaces old conf.php.
*
* @param string $moduleSignature The module name
* @param string $modulePath Absolute path to module (not used by Extbase currently)
......
......@@ -52,7 +52,7 @@ class StringLengthValidator extends \TYPO3\CMS\Extbase\Validation\Validator\Abst
if (is_object($value) && !method_exists($value, '__toString')) {
throw new \TYPO3\CMS\Extbase\Validation\Exception\InvalidSubjectException('The given object could not be converted to a string.', 1238110957);
}
// TODO Use t3lib_cs::strlen() instead; How do we get the charset?
// TODO Use \TYPO3\CMS\Core\Charset\CharsetConverter::strlen() instead; How do we get the charset?
$stringLength = strlen($value);
$isValid = TRUE;
if (isset($this->options['minimum']) && $stringLength < $this->options['minimum']) {
......
......@@ -430,7 +430,7 @@ class Typo3DbBackendTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
$expectedStatement = 'SELECT * FROM tx_foo_table WHERE column_name=?';
$expectedParameters = array('plainPropertyValue');
$expectedUid = 52;
$mockDataBaseHandle = $this->getMock('t3lib_db', array('sql_query', 'sql_fetch_assoc'), array(), '', FALSE);
$mockDataBaseHandle = $this->getMock('TYPO3\CMS\Core\Database\DatabaseConnection', array('sql_query', 'sql_fetch_assoc'), array(), '', FALSE);
$mockDataBaseHandle->expects($this->once())->method('sql_query')->will($this->returnValue('resource'));
$mockDataBaseHandle->expects($this->any())->method('sql_fetch_assoc')->with('resource')->will($this->returnValue(array('uid' => $expectedUid)));
$mockTypo3DbBackend = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Storage\\Typo3DbBackend', array('getPlainValue', 'checkSqlErrors', 'replacePlaceholders', 'addVisibilityConstraintStatement'), array(), '', FALSE);
......
......@@ -2,12 +2,11 @@
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('extbase') . 'Classes/Mvc/Dispatcher.php';
require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('extbase') . 'Classes/Utility/ExtensionUtility.php';
// Register caches if not already done in localconf.php or a previously loaded extension.
// We do not set frontend and backend: The cache manager uses t3lib_Cache\Frontend\VariableFrontend
// and t3lib_cache_backend_DbBackend by default if not set otherwise.
// This default is perfectly fine for our reflection and object cache.
if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_reflection'])) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_reflection'] = array();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment