[TASK] Update t3lib mentions
authorChristian Kuhn <lolli@schwarzbu.ch>
Thu, 11 Apr 2013 17:57:14 +0000 (19:57 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Thu, 11 Apr 2013 18:35:45 +0000 (20:35 +0200)
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
typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php
typo3/sysext/extbase/Classes/Mvc/Controller/FlashMessageContainer.php
typo3/sysext/extbase/Classes/Utility/ArrayUtility.php
typo3/sysext/extbase/Classes/Utility/ExtensionUtility.php
typo3/sysext/extbase/Classes/Validation/Validator/StringLengthValidator.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbBackendTest.php
typo3/sysext/extbase/ext_localconf.php

index fe07dce..8d7607b 100644 (file)
@@ -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;
 
index bdc3bdf..28d4958 100644 (file)
@@ -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
+?>
index c1dcef2..cd7fdf6 100644 (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
  */
index e29b40b..236a53b 100644 (file)
@@ -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)
index e8d3ee2..821b64b 100644 (file)
@@ -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']) {
index 085d589..527b0fd 100644 (file)
@@ -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);
index 24c18cf..479aff9 100644 (file)
@@ -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();
 }