]> source.dussan.org Git - nextcloud-server.git/commitdiff
Improve usage of IAppManager::getAppWebPath() 16859/head
authorDaniel Rudolf <github.com@daniel-rudolf.de>
Thu, 5 Sep 2019 16:35:40 +0000 (18:35 +0200)
committerDaniel Rudolf <github.com@daniel-rudolf.de>
Thu, 5 Sep 2019 16:35:40 +0000 (18:35 +0200)
Deprecate \OC_App::getAppWebPath() and \OC_App::getAppPath()

Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
lib/private/App/AppManager.php
lib/private/legacy/app.php
lib/public/App/IAppManager.php

index 6571386f5cfc4d82b6c022e1b1696a495407317a..192422456006ca95e67a8dc2cecf23bd76e24d97 100644 (file)
@@ -411,7 +411,7 @@ class AppManager implements IAppManager {
         * @return string
         * @throws AppPathNotFoundException if app path can't be found
         */
-       public function getAppWebPath($appId) {
+       public function getAppWebPath(string $appId): string {
                $appWebPath = \OC_App::getAppWebPath($appId);
                if($appWebPath === false) {
                        throw new AppPathNotFoundException('Could not find web path for ' . $appId);
index 58b617aae459dfe7dbbcc1c978b968a2a9868971..9e47f9064d97b053ef7df1f955b28ec9ecf3c70b 100644 (file)
@@ -485,6 +485,7 @@ class OC_App {
         *
         * @param string $appId
         * @return string|false
+        * @deprecated 11.0.0 use \OC::$server->getAppManager()->getAppPath()
         */
        public static function getAppPath(string $appId) {
                if ($appId === null || trim($appId) === '') {
@@ -503,6 +504,7 @@ class OC_App {
         *
         * @param string $appId
         * @return string|false
+        * @deprecated 18.0.0 use \OC::$server->getAppManager()->getAppWebPath()
         */
        public static function getAppWebPath(string $appId) {
                if (($dir = self::findAppInDirectories($appId)) != false) {
index c57b94382a7bda5f511c81af3580cf93356a90be..391e3f0dd641188a8eb3ad9ff8dc1a3c3abd28bd 100644 (file)
@@ -131,10 +131,10 @@ interface IAppManager {
         *
         * @param string $appId
         * @return string
-        * @since 17.0.0
+        * @since 18.0.0
         * @throws AppPathNotFoundException
         */
-       public function getAppWebPath($appId);
+       public function getAppWebPath(string $appId): string;
 
        /**
         * List all apps enabled for a user