diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-01 20:44:29 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-07 08:48:00 +0200 |
commit | 1e086064f5b7ebf2d00d024874a1ecf4cf9d13b5 (patch) | |
tree | d723c19000a7971215e6fee12a468ffc9cf3c04f | |
parent | 9895aff4d92a738ea3248a1c03442e83fab02643 (diff) | |
download | nextcloud-server-1e086064f5b7ebf2d00d024874a1ecf4cf9d13b5.tar.gz nextcloud-server-1e086064f5b7ebf2d00d024874a1ecf4cf9d13b5.zip |
Move legacy classes from PSR0 to PSR4
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r-- | composer.json | 6 | ||||
-rw-r--r-- | lib/composer/composer/autoload_classmap.php | 32 | ||||
-rw-r--r-- | lib/composer/composer/autoload_namespaces.php | 1 | ||||
-rw-r--r-- | lib/composer/composer/autoload_psr4.php | 1 | ||||
-rw-r--r-- | lib/composer/composer/autoload_static.php | 36 | ||||
-rw-r--r-- | lib/private/legacy/OC_API.php (renamed from lib/private/legacy/api.php) | 0 | ||||
-rw-r--r-- | lib/private/legacy/OC_App.php (renamed from lib/private/legacy/app.php) | 0 | ||||
-rw-r--r-- | lib/private/legacy/OC_DB.php (renamed from lib/private/legacy/db.php) | 0 | ||||
-rw-r--r-- | lib/private/legacy/OC_DB_StatementWrapper.php (renamed from lib/private/legacy/db/statementwrapper.php) | 0 | ||||
-rw-r--r-- | lib/private/legacy/OC_Defaults.php (renamed from lib/private/legacy/defaults.php) | 0 | ||||
-rw-r--r-- | lib/private/legacy/OC_EventSource.php (renamed from lib/private/legacy/eventsource.php) | 0 | ||||
-rw-r--r-- | lib/private/legacy/OC_FileChunking.php (renamed from lib/private/legacy/filechunking.php) | 0 | ||||
-rw-r--r-- | lib/private/legacy/OC_Files.php (renamed from lib/private/legacy/files.php) | 0 | ||||
-rw-r--r-- | lib/private/legacy/OC_Helper.php (renamed from lib/private/legacy/helper.php) | 0 | ||||
-rw-r--r-- | lib/private/legacy/OC_Hook.php (renamed from lib/private/legacy/hook.php) | 0 | ||||
-rw-r--r-- | lib/private/legacy/OC_Image.php (renamed from lib/private/legacy/image.php) | 0 | ||||
-rw-r--r-- | lib/private/legacy/OC_JSON.php (renamed from lib/private/legacy/json.php) | 0 | ||||
-rw-r--r-- | lib/private/legacy/OC_Response.php (renamed from lib/private/legacy/response.php) | 0 | ||||
-rw-r--r-- | lib/private/legacy/OC_Template.php (renamed from lib/private/legacy/template.php) | 0 | ||||
-rw-r--r-- | lib/private/legacy/OC_User.php (renamed from lib/private/legacy/user.php) | 0 | ||||
-rw-r--r-- | lib/private/legacy/OC_Util.php (renamed from lib/private/legacy/util.php) | 0 | ||||
-rw-r--r-- | tests/lib/TemplateFunctionsTest.php | 3 |
22 files changed, 38 insertions, 41 deletions
diff --git a/composer.json b/composer.json index ea99a098557..fae1c7a221d 100644 --- a/composer.json +++ b/composer.json @@ -4,10 +4,8 @@ "optimize-autoloader": true }, "autoload" : { - "psr-0": { - "": "lib/private/legacy" - }, - "psr-4": { + "psr-4": { + "": "lib/private/legacy", "OC\\": "lib/private", "OC\\Core\\": "core/", "OCP\\": "lib/public" diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index 8954b883e3b..e4306ca0369 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -1292,20 +1292,20 @@ return array( 'OC\\User\\NoUserException' => $baseDir . '/lib/private/User/NoUserException.php', 'OC\\User\\Session' => $baseDir . '/lib/private/User/Session.php', 'OC\\User\\User' => $baseDir . '/lib/private/User/User.php', - 'OC_API' => $baseDir . '/lib/private/legacy/api.php', - 'OC_App' => $baseDir . '/lib/private/legacy/app.php', - 'OC_DB' => $baseDir . '/lib/private/legacy/db.php', - 'OC_DB_StatementWrapper' => $baseDir . '/lib/private/legacy/db/statementwrapper.php', - 'OC_Defaults' => $baseDir . '/lib/private/legacy/defaults.php', - 'OC_EventSource' => $baseDir . '/lib/private/legacy/eventsource.php', - 'OC_FileChunking' => $baseDir . '/lib/private/legacy/filechunking.php', - 'OC_Files' => $baseDir . '/lib/private/legacy/files.php', - 'OC_Helper' => $baseDir . '/lib/private/legacy/helper.php', - 'OC_Hook' => $baseDir . '/lib/private/legacy/hook.php', - 'OC_Image' => $baseDir . '/lib/private/legacy/image.php', - 'OC_JSON' => $baseDir . '/lib/private/legacy/json.php', - 'OC_Response' => $baseDir . '/lib/private/legacy/response.php', - 'OC_Template' => $baseDir . '/lib/private/legacy/template.php', - 'OC_User' => $baseDir . '/lib/private/legacy/user.php', - 'OC_Util' => $baseDir . '/lib/private/legacy/util.php', + 'OC_API' => $baseDir . '/lib/private/legacy/OC_API.php', + 'OC_App' => $baseDir . '/lib/private/legacy/OC_App.php', + 'OC_DB' => $baseDir . '/lib/private/legacy/OC_DB.php', + 'OC_DB_StatementWrapper' => $baseDir . '/lib/private/legacy/OC_DB_StatementWrapper.php', + 'OC_Defaults' => $baseDir . '/lib/private/legacy/OC_Defaults.php', + 'OC_EventSource' => $baseDir . '/lib/private/legacy/OC_EventSource.php', + 'OC_FileChunking' => $baseDir . '/lib/private/legacy/OC_FileChunking.php', + 'OC_Files' => $baseDir . '/lib/private/legacy/OC_Files.php', + 'OC_Helper' => $baseDir . '/lib/private/legacy/OC_Helper.php', + 'OC_Hook' => $baseDir . '/lib/private/legacy/OC_Hook.php', + 'OC_Image' => $baseDir . '/lib/private/legacy/OC_Image.php', + 'OC_JSON' => $baseDir . '/lib/private/legacy/OC_JSON.php', + 'OC_Response' => $baseDir . '/lib/private/legacy/OC_Response.php', + 'OC_Template' => $baseDir . '/lib/private/legacy/OC_Template.php', + 'OC_User' => $baseDir . '/lib/private/legacy/OC_User.php', + 'OC_Util' => $baseDir . '/lib/private/legacy/OC_Util.php', ); diff --git a/lib/composer/composer/autoload_namespaces.php b/lib/composer/composer/autoload_namespaces.php index ca3a13a84f6..4a9c20beed0 100644 --- a/lib/composer/composer/autoload_namespaces.php +++ b/lib/composer/composer/autoload_namespaces.php @@ -6,5 +6,4 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname(dirname($vendorDir)); return array( - '' => array($baseDir . '/lib/private/legacy'), ); diff --git a/lib/composer/composer/autoload_psr4.php b/lib/composer/composer/autoload_psr4.php index 31c762759e3..b641d9c6a03 100644 --- a/lib/composer/composer/autoload_psr4.php +++ b/lib/composer/composer/autoload_psr4.php @@ -9,4 +9,5 @@ return array( 'OC\\Core\\' => array($baseDir . '/core'), 'OC\\' => array($baseDir . '/lib/private'), 'OCP\\' => array($baseDir . '/lib/public'), + '' => array($baseDir . '/lib/private/legacy'), ); diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index 136562ff75c..abc4a40fd75 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -30,7 +30,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c ), ); - public static $fallbackDirsPsr0 = array ( + public static $fallbackDirsPsr4 = array ( 0 => __DIR__ . '/../../..' . '/lib/private/legacy', ); @@ -1321,22 +1321,22 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\User\\NoUserException' => __DIR__ . '/../../..' . '/lib/private/User/NoUserException.php', 'OC\\User\\Session' => __DIR__ . '/../../..' . '/lib/private/User/Session.php', 'OC\\User\\User' => __DIR__ . '/../../..' . '/lib/private/User/User.php', - 'OC_API' => __DIR__ . '/../../..' . '/lib/private/legacy/api.php', - 'OC_App' => __DIR__ . '/../../..' . '/lib/private/legacy/app.php', - 'OC_DB' => __DIR__ . '/../../..' . '/lib/private/legacy/db.php', - 'OC_DB_StatementWrapper' => __DIR__ . '/../../..' . '/lib/private/legacy/db/statementwrapper.php', - 'OC_Defaults' => __DIR__ . '/../../..' . '/lib/private/legacy/defaults.php', - 'OC_EventSource' => __DIR__ . '/../../..' . '/lib/private/legacy/eventsource.php', - 'OC_FileChunking' => __DIR__ . '/../../..' . '/lib/private/legacy/filechunking.php', - 'OC_Files' => __DIR__ . '/../../..' . '/lib/private/legacy/files.php', - 'OC_Helper' => __DIR__ . '/../../..' . '/lib/private/legacy/helper.php', - 'OC_Hook' => __DIR__ . '/../../..' . '/lib/private/legacy/hook.php', - 'OC_Image' => __DIR__ . '/../../..' . '/lib/private/legacy/image.php', - 'OC_JSON' => __DIR__ . '/../../..' . '/lib/private/legacy/json.php', - 'OC_Response' => __DIR__ . '/../../..' . '/lib/private/legacy/response.php', - 'OC_Template' => __DIR__ . '/../../..' . '/lib/private/legacy/template.php', - 'OC_User' => __DIR__ . '/../../..' . '/lib/private/legacy/user.php', - 'OC_Util' => __DIR__ . '/../../..' . '/lib/private/legacy/util.php', + 'OC_API' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_API.php', + 'OC_App' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_App.php', + 'OC_DB' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_DB.php', + 'OC_DB_StatementWrapper' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_DB_StatementWrapper.php', + 'OC_Defaults' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_Defaults.php', + 'OC_EventSource' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_EventSource.php', + 'OC_FileChunking' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_FileChunking.php', + 'OC_Files' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_Files.php', + 'OC_Helper' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_Helper.php', + 'OC_Hook' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_Hook.php', + 'OC_Image' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_Image.php', + 'OC_JSON' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_JSON.php', + 'OC_Response' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_Response.php', + 'OC_Template' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_Template.php', + 'OC_User' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_User.php', + 'OC_Util' => __DIR__ . '/../../..' . '/lib/private/legacy/OC_Util.php', ); public static function getInitializer(ClassLoader $loader) @@ -1344,7 +1344,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c return \Closure::bind(function () use ($loader) { $loader->prefixLengthsPsr4 = ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c::$prefixLengthsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c::$prefixDirsPsr4; - $loader->fallbackDirsPsr0 = ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c::$fallbackDirsPsr0; + $loader->fallbackDirsPsr4 = ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c::$fallbackDirsPsr4; $loader->classMap = ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c::$classMap; }, null, ClassLoader::class); diff --git a/lib/private/legacy/api.php b/lib/private/legacy/OC_API.php index 47590a00910..47590a00910 100644 --- a/lib/private/legacy/api.php +++ b/lib/private/legacy/OC_API.php diff --git a/lib/private/legacy/app.php b/lib/private/legacy/OC_App.php index 996b7a885c6..996b7a885c6 100644 --- a/lib/private/legacy/app.php +++ b/lib/private/legacy/OC_App.php diff --git a/lib/private/legacy/db.php b/lib/private/legacy/OC_DB.php index 34cc39f26aa..34cc39f26aa 100644 --- a/lib/private/legacy/db.php +++ b/lib/private/legacy/OC_DB.php diff --git a/lib/private/legacy/db/statementwrapper.php b/lib/private/legacy/OC_DB_StatementWrapper.php index 872e8f64e79..872e8f64e79 100644 --- a/lib/private/legacy/db/statementwrapper.php +++ b/lib/private/legacy/OC_DB_StatementWrapper.php diff --git a/lib/private/legacy/defaults.php b/lib/private/legacy/OC_Defaults.php index 73443adb031..73443adb031 100644 --- a/lib/private/legacy/defaults.php +++ b/lib/private/legacy/OC_Defaults.php diff --git a/lib/private/legacy/eventsource.php b/lib/private/legacy/OC_EventSource.php index 7191028295a..7191028295a 100644 --- a/lib/private/legacy/eventsource.php +++ b/lib/private/legacy/OC_EventSource.php diff --git a/lib/private/legacy/filechunking.php b/lib/private/legacy/OC_FileChunking.php index 048bd085bb5..048bd085bb5 100644 --- a/lib/private/legacy/filechunking.php +++ b/lib/private/legacy/OC_FileChunking.php diff --git a/lib/private/legacy/files.php b/lib/private/legacy/OC_Files.php index 249d3e5154f..249d3e5154f 100644 --- a/lib/private/legacy/files.php +++ b/lib/private/legacy/OC_Files.php diff --git a/lib/private/legacy/helper.php b/lib/private/legacy/OC_Helper.php index 626295af5a9..626295af5a9 100644 --- a/lib/private/legacy/helper.php +++ b/lib/private/legacy/OC_Helper.php diff --git a/lib/private/legacy/hook.php b/lib/private/legacy/OC_Hook.php index 2918dd4282f..2918dd4282f 100644 --- a/lib/private/legacy/hook.php +++ b/lib/private/legacy/OC_Hook.php diff --git a/lib/private/legacy/image.php b/lib/private/legacy/OC_Image.php index 7d23ece7ffa..7d23ece7ffa 100644 --- a/lib/private/legacy/image.php +++ b/lib/private/legacy/OC_Image.php diff --git a/lib/private/legacy/json.php b/lib/private/legacy/OC_JSON.php index f83fca0a433..f83fca0a433 100644 --- a/lib/private/legacy/json.php +++ b/lib/private/legacy/OC_JSON.php diff --git a/lib/private/legacy/response.php b/lib/private/legacy/OC_Response.php index 4eb454d3181..4eb454d3181 100644 --- a/lib/private/legacy/response.php +++ b/lib/private/legacy/OC_Response.php diff --git a/lib/private/legacy/template.php b/lib/private/legacy/OC_Template.php index 279ceb8de0f..279ceb8de0f 100644 --- a/lib/private/legacy/template.php +++ b/lib/private/legacy/OC_Template.php diff --git a/lib/private/legacy/user.php b/lib/private/legacy/OC_User.php index d96400ad1d4..d96400ad1d4 100644 --- a/lib/private/legacy/user.php +++ b/lib/private/legacy/OC_User.php diff --git a/lib/private/legacy/util.php b/lib/private/legacy/OC_Util.php index f14095675dc..f14095675dc 100644 --- a/lib/private/legacy/util.php +++ b/lib/private/legacy/OC_Util.php diff --git a/tests/lib/TemplateFunctionsTest.php b/tests/lib/TemplateFunctionsTest.php index ac73873ce37..a6385670487 100644 --- a/tests/lib/TemplateFunctionsTest.php +++ b/tests/lib/TemplateFunctionsTest.php @@ -27,8 +27,7 @@ class TemplateFunctionsTest extends \Test\TestCase { protected function setUp(): void { parent::setUp(); - $loader = new \OC\Autoloader([\OC::$SERVERROOT . '/lib']); - $loader->load('OC_Template'); + require_once \OC::$SERVERROOT . '/lib/private/legacy/OC_Template.php'; } public function testPJavaScript() { |