diff options
author | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-05-11 13:53:16 +0200 |
---|---|---|
committer | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-05-11 13:53:16 +0200 |
commit | 8729415880181275c9d4a05707273e13c9cf7e1b (patch) | |
tree | f06d28d412639b6fdafb265341319448b7c2b50a /lib | |
parent | efa545f8f0697896a538587bee644fc7c3699185 (diff) | |
parent | db16dc66447f15429561213d9825673f047a5202 (diff) | |
download | nextcloud-server-8729415880181275c9d4a05707273e13c9cf7e1b.tar.gz nextcloud-server-8729415880181275c9d4a05707273e13c9cf7e1b.zip |
Merge pull request #24531 from owncloud/psr4-loading-for-install-and-commands
Correctly register PSR-4 autoloading before install.php and loading commands
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Console/Application.php | 2 | ||||
-rw-r--r-- | lib/private/Installer.php | 2 | ||||
-rw-r--r-- | lib/private/legacy/app.php | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/Console/Application.php b/lib/private/Console/Application.php index 7f12db4eca6..dd5111743f1 100644 --- a/lib/private/Console/Application.php +++ b/lib/private/Console/Application.php @@ -98,7 +98,7 @@ class Application { if($appPath === false) { continue; } - \OC::$loader->addValidRoot($appPath); + \OC_App::registerAutoloading($app, $appPath); $file = $appPath . '/appinfo/register_command.php'; if (file_exists($file)) { require $file; diff --git a/lib/private/Installer.php b/lib/private/Installer.php index edc6306b8f1..336fa0acef8 100644 --- a/lib/private/Installer.php +++ b/lib/private/Installer.php @@ -564,7 +564,7 @@ class Installer { } //run appinfo/install.php - \OC::$loader->addValidRoot($appPath); + \OC_App::registerAutoloading($app, $appPath); self::includeAppScript("$appPath/appinfo/install.php"); $info = OC_App::getAppInfo($app); diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php index dab4c1a70c7..f558c873556 100644 --- a/lib/private/legacy/app.php +++ b/lib/private/legacy/app.php @@ -159,10 +159,11 @@ class OC_App { } /** + * @internal * @param string $app * @param string $path */ - protected static function registerAutoloading($app, $path) { + public static function registerAutoloading($app, $path) { // Register on PSR-4 composer autoloader $appNamespace = \OC\AppFramework\App::buildAppNamespace($app); \OC::$composerAutoloader->addPsr4($appNamespace . '\\', $path . '/lib/', true); |