[TASK] Optimize compatibilty class loader
authorHelmut Hummel <helmut.hummel@typo3.org>
Mon, 29 Oct 2012 18:24:01 +0000 (19:24 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 19 Nov 2012 19:08:50 +0000 (20:08 +0100)
Do not save rewritten code in compatibility class loader
if no replacements have been found but require the
original class instead.
Additionally do not touch classes that do not start
with 'tx_' or other known TYPO3 specific prefixes.

Resolves: #42497
Releases: 6.0

Change-Id: Ic3cdafbfec3814ef61046500c1ac4f916bade133
Reviewed-on: http://review.typo3.org/16018
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/core/Classes/Compatibility/CompatbilityClassLoaderPhpBelow50307.php
typo3/sysext/core/Classes/Core/ClassLoader.php
typo3/sysext/core/Tests/Unit/Compatibility/CompatbilityClassLoaderPhpBelow50307Test.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Core/ClassLoaderTest.php
typo3/sysext/core/Tests/Unit/Core/Fixtures/LegacyClassFixture.php [deleted file]

index 76f1808..2d670a2 100644 (file)
@@ -70,21 +70,42 @@ class CompatbilityClassLoaderPhpBelow50307 extends \TYPO3\CMS\Core\Core\ClassLoa
         *
         * @static
         * @param string $classPath
+        * @param string $className
+        * @return void
         */
-       static public function requireClassFileOnce($classPath) {
-               if (GeneralUtility::isFirstPartOfStr($classPath, PATH_typo3 . 'sysext/')) {
-                               // Do nothing for sysextensions. They are already using the proper type hints.
-                       GeneralUtility::requireOnce($classPath);
+       static public function requireClassFileOnce($classPath, $className) {
+               if (
+                       GeneralUtility::isFirstPartOfStr($className, 'tx_')
+                       || GeneralUtility::isFirstPartOfStr($className, 'Tx_')
+                       || GeneralUtility::isFirstPartOfStr($className, 'ux_')
+                       || GeneralUtility::isFirstPartOfStr($className, 'Ux_')
+                       || GeneralUtility::isFirstPartOfStr($className, 'user_')
+                       || GeneralUtility::isFirstPartOfStr($className, 'User_')
+               ) {
+                       // If class in question starts with one of the allowed old prefixes
+                       static::checkClassCacheEntryAndRequire($classPath);
                } else {
-                       $cacheIdentifier = static::getClassPathCacheIdentifier($classPath);
-                       /** @var $phpCodeCache \TYPO3\CMS\Core\Cache\Frontend\PhpFrontend */
-                       $phpCodeCache = $GLOBALS['typo3CacheManager']->getCache('cache_core');
-                       if (!$phpCodeCache->has($cacheIdentifier)) {
-                               $classCode = static::rewriteMethodTypeHintsFromClassPath($classPath);
-                               $phpCodeCache->set($cacheIdentifier, $classCode, array(), 0);
-                       }
-                       $phpCodeCache->requireOnce($cacheIdentifier);
+                       // Do nothing for system extensions or external libraries.
+                       // They are already using the proper type hints or do not use them at all.
+                       static::requireClassFile($classPath);
+               }
+       }
+
+       /**
+        * Require class file from cache and create if it doesn't exist yet
+        *
+        * @param $classPath
+        * @return void
+        */
+       static protected function checkClassCacheEntryAndRequire($classPath) {
+               $cacheIdentifier = static::getClassPathCacheIdentifier($classPath);
+               /** @var $phpCodeCache \TYPO3\CMS\Core\Cache\Frontend\PhpFrontend */
+               $phpCodeCache = $GLOBALS['typo3CacheManager']->getCache('cache_core');
+               if (!$phpCodeCache->has($cacheIdentifier)) {
+                       $classCode = static::rewriteMethodTypeHintsFromClassPath($classPath);
+                       $phpCodeCache->set($cacheIdentifier, $classCode, array(), 0);
                }
+               $phpCodeCache->requireOnce($cacheIdentifier);
        }
 
        /**
@@ -95,15 +116,15 @@ class CompatbilityClassLoaderPhpBelow50307 extends \TYPO3\CMS\Core\Core\ClassLoa
         * @return string
         */
        static protected function getClassPathCacheIdentifier($classPath) {
-                       // The relative class path is part of the cache identifier
+               // The relative class path is part of the cache identifier
                $relativeClassPath = (GeneralUtility::isFirstPartOfStr($classPath, PATH_site)) ? substr($classPath, strlen(PATH_site)) : $classPath;
                $fileExtension = strrchr($classPath, '.');
                $fileNameWithoutExtension = substr(basename($classPath), 0, strlen($fileExtension) * -1);
-                       // The class content has to be part of the identifier too
-                       // otherwise the old class files get loaded from cache
+               // The class content has to be part of the identifier too
+               // otherwise the old class files get loaded from cache
                $fileSha1 = sha1_file($classPath);
                $cacheIdentifier = 'ClassLoader_' . $fileNameWithoutExtension . '_' . substr(sha1($fileSha1 . '|' . $relativeClassPath), 0, 20);
-                       // Clean up identifier to be a valid cache entry identifier
+               // Clean up identifier to be a valid cache entry identifier
                $cacheIdentifier = preg_replace('/[^a-zA-Z0-9_%\-&]/i', '_', $cacheIdentifier);
                return $cacheIdentifier;
        }
@@ -118,23 +139,25 @@ class CompatbilityClassLoaderPhpBelow50307 extends \TYPO3\CMS\Core\Core\ClassLoa
        static protected function rewriteMethodTypeHintsFromClassPath($classPath) {
                $pcreBacktrackLimitOriginal = ini_get('pcre.backtrack_limit');
                $classAliasMap = static::$aliasToClassNameMapping;
-               $fileContent = file_get_contents($classPath);
+               $fileContent = static::getClassFileContent($classPath);
                $fileLength = strlen($fileContent);
+               $hasReplacements = FALSE;
                // when the class file is bigger than the original pcre backtrace limit increase the limit
                if ($pcreBacktrackLimitOriginal < $fileLength) {
                        ini_set('pcre.backtrack_limit', $fileLength);
                }
                $fileContent = preg_replace_callback(
-                       '/function\s+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)\s*\((.*?\$.*?)\)(\s*[{;])/ims',
-                       function($matches) use($classAliasMap) {
+                       '/function[ \t]+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)\s*\((.*?\$.*?)\)(\s*[{;])/ims',
+                       function($matches) use($classAliasMap, &$hasReplacements) {
                        if (isset($matches[1]) && isset($matches[2])) {
                                list($functionName, $argumentList) = array_slice($matches, 1, 2);
                                $arguments = explode(',', $argumentList);
                                $arguments = array_map('trim', $arguments);
-                               $arguments = preg_replace_callback('/([\\a-z0-9_]+\s+)?((\s*[&]*\s*\$[a-z0-9_]+)(\s*=\s*.+)?)/ims', function($argumentMatches) use($classAliasMap) {
+                               $arguments = preg_replace_callback('/([\\a-z0-9_]+\s+)?((\s*[&]*\s*\$[a-z0-9_]+)(\s*=\s*.+)?)/ims', function($argumentMatches) use($classAliasMap, &$hasReplacements)  {
                                        if (isset($argumentMatches[1]) && isset($argumentMatches[2])) {
                                                $typeHint = strtolower(ltrim(trim($argumentMatches[1]), '\\'));
                                                if (isset($classAliasMap[$typeHint])) {
+                                                       $hasReplacements = TRUE;
                                                        return '\\' . $classAliasMap[$typeHint] . ' ' . $argumentMatches[2];
                                                }
                                        }
@@ -151,9 +174,33 @@ class CompatbilityClassLoaderPhpBelow50307 extends \TYPO3\CMS\Core\Core\ClassLoa
                if ($pcreBacktrackLimitOriginal < $fileLength) {
                        ini_set('pcre.backtrack_limit', $pcreBacktrackLimitOriginal);
                }
+
+               if (!$hasReplacements) {
+                       $fileContent = 'require_once \'' . $classPath . '\';';
+               }
+
                return $fileContent;
        }
 
+       /**
+        * Wrapper method to be able to mock in unit tests
+        *
+        * @param string $classPath
+        */
+       protected static function requireClassFile($classPath) {
+               GeneralUtility::requireOnce($classPath);
+       }
+
+       /**
+        * Wrapper method to be able to mock in unit tests
+        *
+        * @param string $classPath
+        * @return string
+        */
+       protected static function getClassFileContent($classPath) {
+               return file_get_contents($classPath);
+       }
+
 }
 
 ?>
\ No newline at end of file
index e65f6fd..5213cc7 100644 (file)
@@ -150,7 +150,11 @@ class ClassLoader {
                $classPath = static::getClassPathByRegistryLookup($lookUpClassName);
                if ($classPath && !class_exists($realClassName, FALSE)) {
                        // Include the required file that holds the class
-                       static::requireClassFileOnce($classPath);
+                       // Handing over the class name here is only done for the
+                       // compatibility class loader so that it can skip class names
+                       // which do not require rewriting. We can remove this bad
+                       // code smell once we can get rid of the compatibility class loader.
+                       static::requireClassFileOnce($classPath, $className);
                        try {
                                // Regular expression for a valid classname taken from
                                // http://www.php.net/manual/en/language.oop5.basic.php
diff --git a/typo3/sysext/core/Tests/Unit/Compatibility/CompatbilityClassLoaderPhpBelow50307Test.php b/typo3/sysext/core/Tests/Unit/Compatibility/CompatbilityClassLoaderPhpBelow50307Test.php
new file mode 100644 (file)
index 0000000..7a17f1d
--- /dev/null
@@ -0,0 +1,284 @@
+<?php
+namespace TYPO3\CMS\Core\Tests\Unit\Compatibility;
+
+/***************************************************************
+ * Copyright notice
+ *
+ * (c) 2012 Helmut Hummel <helmut.hummel@typo3.org>
+ * All rights reserved
+ *
+ * This script is part of the TYPO3 project. The TYPO3 project is
+ * free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * The GNU General Public License can be found at
+ * http://www.gnu.org/copyleft/gpl.html.
+ *
+ * This script is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Testcase for TYPO3\CMS\Core\Compatibility\CompatbilityClassLoaderPhpBelow50307
+ *
+ */
+class CompatbilityClassLoaderPhpBelow50307Test extends \TYPO3\CMS\Core\Tests\UnitTestCase {
+
+       /**
+        * Class name of the fixture class
+        *
+        * @var string
+        */
+       protected $testClassName = 'Tx_Core_Tests_Unit_Core_Fixtures_LegacyClassFixture';
+
+       /**
+        * Fixture class template
+        *
+        * @var string
+        */
+       protected $classTemplate = 'abstract class Tx_Core_Tests_Unit_Core_Fixtures_LegacyClassFixture {
+               %s
+       }';
+
+       /**
+        * Fixture class code
+        *
+        * @var string
+        */
+       public static $classCode = '';
+
+       /**
+        * @var \TYPO3\CMS\Core\Compatibility\CompatbilityClassLoaderPhpBelow50307|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface|\PHPUnit_Framework_MockObject_MockObject
+        */
+       protected $fixture;
+
+       /**
+        * @return string
+        */
+       protected function getCompatibilityClassLoaderMockClass() {
+               $className = uniqid('CompatbilityClassLoaderPhpBelow50307Mock');
+               eval(
+                       'if (!class_exists(\'ClassPathHasBeenRequired\')) {' . LF .
+                               'class ClassPathHasBeenRequired extends Exception {}' . LF .
+                       '}' . LF .
+                       'class ' . $className . ' extends \\TYPO3\\CMS\\Core\\Compatibility\\CompatbilityClassLoaderPhpBelow50307 {' . LF .
+                               'protected static function requireClassFile($classPath) {' . LF .
+                                       'throw new ClassPathHasBeenRequired(\'Class path \' . $classPath);' . LF .
+                               '}' . LF .
+                               'static public function getClassFileContent() {' . LF .
+                               '       return TYPO3\\CMS\\Core\\Tests\Unit\Compatibility\\CompatbilityClassLoaderPhpBelow50307Test::$classCode;' . LF .
+                               '}' . LF .
+                               'static public function rewriteMethodTypeHintsFromClassPath($classPath) {' . LF .
+                               '       return parent::rewriteMethodTypeHintsFromClassPath($classPath);' . LF .
+                               '}' . LF .
+                       '}'
+               );
+               return $className;
+       }
+
+       public function requireClassFileOnceTriggersParserForClassesWithAllowedPrefixesDataProvider() {
+               return array(
+                       'tx_' => array('tx_Foo'),
+                       'Tx_' => array('Tx_bar'),
+                       'user_' => array('user_fooBar'),
+                       'User_' => array('User_Barfoo'),
+                       'ux_' => array('ux_Foo'),
+                       'Ux_' => array('Ux_bar'),
+               );
+       }
+
+       /**
+        * @test
+        * @dataProvider requireClassFileOnceTriggersParserForClassesWithAllowedPrefixesDataProvider
+        * @expectedException \checkClassCacheEntryAndRequireTestException
+        */
+       public function requireClassFileOnceTriggersParserForClassesWithAllowedPrefixes($className) {
+               $mockClassName = uniqid('CompatbilityClassLoaderPhpBelow50307Mock');
+               eval(
+                       'if (!class_exists(\'checkClassCacheEntryAndRequireTestException\')) {' . LF .
+                               'class checkClassCacheEntryAndRequireTestException extends Exception {}' . LF .
+                       '}' . LF .
+                       'class ' . $mockClassName . ' extends \\TYPO3\\CMS\\Core\\Compatibility\\CompatbilityClassLoaderPhpBelow50307 {' . LF .
+                               'protected static function checkClassCacheEntryAndRequire($classPath) {' . LF .
+                                       'throw new checkClassCacheEntryAndRequireTestException(\'Class path \' . $classPath);' . LF .
+                               '}' . LF .
+                       '}'
+               );
+               $mockClassName::requireClassFileOnce('/some/path', $className);
+       }
+
+       /**
+        * @test
+        * @expectedException \ClassPathHasBeenRequired
+        */
+       public function coreClassesAreRequiredImmediately() {
+               $classPath = '/dummy/path';
+               $className = 'TYPO3\\CMS\\Core\\Utility\\GeneralUtility';
+
+               $mockClassLoaderClass = $this->getCompatibilityClassLoaderMockClass();
+               $mockClassLoaderClass::requireClassFileOnce($classPath, $className);
+       }
+
+       /**
+        * @test
+        * @expectedException \ClassPathHasBeenRequired
+        */
+       public function thirdPartyClassesAreRequiredImmediately() {
+               $classPath = '/dummy/path';
+               $className = 'SwiftMailer';
+
+               $mockClassLoaderClass = $this->getCompatibilityClassLoaderMockClass();
+               $mockClassLoaderClass::requireClassFileOnce($classPath, $className);
+       }
+
+       /**
+        * @test
+        * @expectedException \ClassPathHasBeenRequired
+        */
+       public function nameSpacedExtensionClassesAreRequiredImmediately() {
+               $classPath = '/dummy/path';
+               $className = 'Vendor\\CoolExtension\\Service\\CoolService';
+
+               $mockClassLoaderClass = $this->getCompatibilityClassLoaderMockClass();
+               $mockClassLoaderClass::requireClassFileOnce($classPath, $className);
+       }
+
+       /**
+        * @test
+        */
+       public function classCacheOnlyContainsRequireOfOriginalClassIfNothingHasBeenRewritten() {
+               $classPath = '/dummy/path';
+               self::$classCode = sprintf($this->classTemplate,
+                       '/**' . LF .
+                       ' *' . LF .
+                       ' */' . LF .
+                       'public function nothing() {' . LF .
+                       '}'
+               );
+
+               $mockClassLoaderClass = $this->getCompatibilityClassLoaderMockClass();
+               $rewrittenContent = $mockClassLoaderClass::rewriteMethodTypeHintsFromClassPath($classPath);
+               $this->assertSame('require_once \'' . $classPath . '\';', $rewrittenContent);
+       }
+
+       /**
+        * @test
+        */
+       public function typeHintInOneLineAbstractFunctionIsCorrectlyRewritten() {
+               $classPath = '/dummy/path';
+               self::$classCode = sprintf($this->classTemplate,
+                       '/**' . LF .
+                       ' * @abstract' . LF .
+                       ' * @param t3lib_div $bar' . LF .
+                       ' * @return mixed' . LF .
+                       ' */' . LF .
+                       'abstract public function bar(t3lib_div $bar);'
+               );
+
+               $mockClassLoaderClass = $this->getCompatibilityClassLoaderMockClass();
+               $rewrittenContent = $mockClassLoaderClass::rewriteMethodTypeHintsFromClassPath($classPath);
+               $this->assertContains('abstract public function bar(\TYPO3\CMS\Core\Utility\GeneralUtility $bar);', $rewrittenContent);
+       }
+
+       /**
+        * @test
+        */
+       public function typeHintInOneLineFunctionWithOneParameterIsCorrectlyRewritten() {
+               $classPath = '/dummy/path';
+               self::$classCode = sprintf($this->classTemplate,
+                       '/**' . LF .
+                       ' * @param t3lib_div $foo' . LF .
+                       ' */' . LF .
+                       'public function foo(t3lib_div $foo) {' . LF .
+                               '// this is only a dummy function' . LF .
+                               'if ($foo instanceof t3lib_div) {' . LF .
+                                       'return FALSE;' . LF .
+                               '}' . LF .
+                       '}' . LF
+               );
+
+               $mockClassLoaderClass = $this->getCompatibilityClassLoaderMockClass();
+               $rewrittenContent = $mockClassLoaderClass::rewriteMethodTypeHintsFromClassPath($classPath);
+               $this->assertContains('// this is only a dummy function' . LF . 'if', $rewrittenContent, 'Comment not touched, newline after function ignored');
+               $this->assertContains('public function foo(\TYPO3\CMS\Core\Utility\GeneralUtility $foo) {', $rewrittenContent);
+       }
+
+       /**
+        * @test
+        */
+       public function typeHintInTwoLineFunctionWithTwoParametersIsCorrectlyRewritten() {
+               $classPath = '/dummy/path';
+               self::$classCode = sprintf($this->classTemplate,
+                       '/**' . LF .
+                       ' * @param t3lib_div $foo' . LF .
+                       ' * @param $baz' . LF .
+                       ' */' . LF .
+                       'public function         baz(t3lib_div $foo,' . LF .
+                       ' $baz) {' . LF .
+                       '}' . LF
+               );
+
+               $mockClassLoaderClass = $this->getCompatibilityClassLoaderMockClass();
+               $rewrittenContent = $mockClassLoaderClass::rewriteMethodTypeHintsFromClassPath($classPath);
+               $this->assertContains('public function baz(\TYPO3\CMS\Core\Utility\GeneralUtility $foo, $baz) {', $rewrittenContent);
+       }
+
+       /**
+        * @test
+        */
+       public function typeHintInTwoLineFunctionWithTwoParametersWhileOneHavingTypehintNotInAliasMapIsCorrectlyRewritten() {
+               $classPath = '/dummy/path';
+               self::$classCode = sprintf($this->classTemplate,
+                       '       /**
+        * @param Tx_Extbase_Persistence_QueryInterface $query
+        * @param Tx_News_Domain_Model_DemandInterface $demand
+        */
+       abstract protected function createConstraintsFromDemand(Tx_Extbase_Persistence_QueryInterface $query,
+                                                                                                  Tx_News_Domain_Model_DemandInterface $demand);
+');
+
+               $mockClassLoaderClass = $this->getCompatibilityClassLoaderMockClass();
+               $rewrittenContent = $mockClassLoaderClass::rewriteMethodTypeHintsFromClassPath($classPath);
+               $this->assertContains('protected function createConstraintsFromDemand(\TYPO3\CMS\Extbase\Persistence\QueryInterface $query, Tx_News_Domain_Model_DemandInterface $demand);', $rewrittenContent, 'Multi line abstract and second parameter with own typehint not in aliasmap');
+       }
+
+       /**
+        * @test
+        */
+       public function functionsWithoutParametersOrTypeHintsNotInAliasMapRemainUntouchedEvenWhenOtherTypeHintsAreRewritten() {
+               $classPath = '/dummy/path';
+               self::$classCode = sprintf($this->classTemplate,
+                       '       /**
+        * @param t3lib_div $foo
+        */
+       public function foo(t3lib_div $foo) {
+       }
+
+       /**
+        *
+        */
+       public function nothing() {
+       }
+
+       /**
+        * @param Tx_Core_Tests_Unit_Core_Fixtures_LegacyClassFixture $nothing
+        */
+       protected function stillNothing(Tx_Core_Tests_Unit_Core_Fixtures_LegacyClassFixture $nothing) {
+       }
+');
+
+               $mockClassLoaderClass = $this->getCompatibilityClassLoaderMockClass();
+               $rewrittenContent = $mockClassLoaderClass::rewriteMethodTypeHintsFromClassPath($classPath);
+               $this->assertContains('public function foo(\TYPO3\CMS\Core\Utility\GeneralUtility $foo) {', $rewrittenContent);
+               $this->assertContains('public function nothing() {', $rewrittenContent, 'One line one parameter');
+               $this->assertContains('protected function stillNothing(Tx_Core_Tests_Unit_Core_Fixtures_LegacyClassFixture $nothing) {', $rewrittenContent, 'One line on parameter with typehint not in aliasmap');
+       }
+}
+
+?>
\ No newline at end of file
index 5c6d604..10968a2 100644 (file)
@@ -428,23 +428,6 @@ class ClassLoaderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                \TYPO3\CMS\Core\Core\ClassLoader::registerAutoloader();
                \TYPO3\CMS\Core\Core\ClassLoader::unregisterAutoloader();
        }
-
-       /**
-        * @test
-        */
-       public function compatibilityClassLoaderRewritesClassFilesCorrectly() {
-               $classLoader = $this->getAccessibleMock('TYPO3\\CMS\\Core\\Compatibility\\CompatbilityClassLoaderPhpBelow50307', array('dummy'), array(), '', FALSE);
-               $classPathOfFileToRewrite = realpath(__DIR__ . '/Fixtures/LegacyClassFixture.php');
-               $rewrittenContent = $classLoader->_call('rewriteMethodTypeHintsFromClassPath', $classPathOfFileToRewrite);
-               $originalContent = file_get_contents($classPathOfFileToRewrite);
-               $this->assertNotEquals($originalContent, $rewrittenContent);
-               $this->assertContains('public function foo(\TYPO3\CMS\Core\Utility\GeneralUtility $foo) {', $rewrittenContent, 'One line and one parameter');
-               $this->assertContains('public function baz(\TYPO3\CMS\Core\Utility\GeneralUtility $foo, $baz) {', $rewrittenContent, 'Multi line and more parameters');
-               $this->assertContains('protected function createConstraintsFromDemand(\TYPO3\CMS\Extbase\Persistence\QueryInterface $query, Tx_News_Domain_Model_DemandInterface $demand);', $rewrittenContent, 'Multi line abstract and second parameter with own typehint not in aliasmap');
-               $this->assertContains('abstract public function bar(\TYPO3\CMS\Core\Utility\GeneralUtility $bar);', $rewrittenContent, 'One line abstract function');
-               $this->assertContains('public function nothing() {', $rewrittenContent, 'One line one parameter');
-               $this->assertContains('protected function stillNothing(Tx_Core_Tests_Unit_Core_Fixtures_LegacyClassFixture $nothing) {', $rewrittenContent, 'One line on parameter with typehint not in aliasmap');
-       }
 }
 
 ?>
\ No newline at end of file
diff --git a/typo3/sysext/core/Tests/Unit/Core/Fixtures/LegacyClassFixture.php b/typo3/sysext/core/Tests/Unit/Core/Fixtures/LegacyClassFixture.php
deleted file mode 100644 (file)
index df9d6e0..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-
-/***************************************************************
- * Copyright notice
- *
- * (c) 2012 Helmut Hummel <helmut.hummel@typo3.org>
- * All rights reserved
- *
- * This script is part of the TYPO3 project. The TYPO3 project is
- * free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * The GNU General Public License can be found at
- * http://www.gnu.org/copyleft/gpl.html.
- *
- * This script is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Test Fixture class for TYPO3\CMS\Core\Core\ClassLoader
- *
- * @author Helmut Hummel <helmut.hummel@typo3.org>
- */
-abstract class Tx_Core_Tests_Unit_Core_Fixtures_LegacyClassFixture {
-
-       /**
-        * @param t3lib_div $foo
-        */
-       public function foo(t3lib_div $foo) {
-       }
-
-       /**
-        * @param t3lib_div $foo
-        * @param $baz
-        */
-       public function baz(t3lib_div $foo,
-                                               $baz) {
-       }
-
-       /**
-        * @param Tx_Extbase_Persistence_QueryInterface $query
-        * @param Tx_News_Domain_Model_DemandInterface $demand
-        */
-       abstract protected function createConstraintsFromDemand(Tx_Extbase_Persistence_QueryInterface $query,
-                                                                                                  Tx_News_Domain_Model_DemandInterface $demand);
-
-       /**
-        * @abstract
-        * @param t3lib_div $bar
-        * @return mixed
-        */
-       abstract public function bar(t3lib_div $bar);
-
-       /**
-        *
-        */
-       public function nothing() {
-       }
-
-       /**
-        * @param Tx_Core_Tests_Unit_Core_Fixtures_LegacyClassFixture $nothing
-        */
-       protected function stillNothing(Tx_Core_Tests_Unit_Core_Fixtures_LegacyClassFixture $nothing) {
-       }
-}
-
-?>
\ No newline at end of file