[TASK] Remove deprecated functions from GeneralUtility 23/28323/2
authorWouter Wolters <typo3@wouterwolters.nl>
Wed, 12 Mar 2014 19:48:37 +0000 (20:48 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Thu, 13 Mar 2014 05:42:02 +0000 (06:42 +0100)
getValidClassPrefixes
hasValidClassPrefix

Resolves: #56845
Releases: 6.2
Change-Id: I14ffedbe603a5b5117abfd38b4d25fa12e0cb422
Reviewed-on: https://review.typo3.org/28323
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php

index 090461b..539b362 100644 (file)
@@ -4215,31 +4215,6 @@ Connection: close
        }
 
        /**
-        * Checks if a class or function has a valid prefix: tx_, Tx_ or custom, e.g. user_
-        *
-        * @param string $classRef The class or function to check
-        * @param array $additionalPrefixes Additional allowed prefixes, mostly this will be user_
-        * @return boolean TRUE if name is allowed
-        * @deprecated since 6.0, will be removed two versions later
-        */
-       static public function hasValidClassPrefix($classRef, array $additionalPrefixes = array()) {
-               self::logDeprecatedFunction();
-               return TRUE;
-       }
-
-       /**
-        * Returns all valid class prefixes.
-        *
-        * @return array Array of valid prefixed of class names
-        * @deprecated since 6.0, will be removed two versions later
-        */
-       static public function getValidClassPrefixes() {
-               self::logDeprecatedFunction();
-               $validPrefixes = array('tx_', 'Tx_', 'user_', 'User_', 't3lib_', '');
-               return $validPrefixes;
-       }
-
-       /**
         * Creates an instance of a class taking into account the class-extensions
         * API of TYPO3. USE THIS method instead of the PHP "new" keyword.
         * Eg. "$obj = new myclass;" should be "$obj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance("myclass")" instead!
index 49d7839..a3b35d1 100644 (file)
@@ -4346,31 +4346,6 @@ class GeneralUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        }
 
        ///////////////////////////////////////////////////
-       // Tests concerning hasValidClassPrefix
-       ///////////////////////////////////////////////////
-       /**
-        * @return array
-        */
-       public function validClassPrefixDataProvider() {
-               return array(
-                       'normal prefix' => array('tx_foo'),
-                       'normal long prefix' => array('tx_foo_bar'),
-                       'extbase named prefix' => array('Tx_foo'),
-                       'user func named prefix' => array('user_foo'),
-                       'empty string' => array('')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider validClassPrefixDataProvider
-        * @param string $className Class name to test
-        */
-       public function hasValidClassPrefixAcceptsValidPrefixes($className) {
-               $this->assertTrue(Utility\GeneralUtility::hasValidClassPrefix($className));
-       }
-
-       ///////////////////////////////////////////////////
        // Tests concerning generateRandomBytes
        ///////////////////////////////////////////////////
        /**