diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-03-12 14:38:51 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-03-12 15:27:10 +0100 |
commit | f5c5c5181f66e15ff3ccc30fa32e84e20a863182 (patch) | |
tree | 4a8623b2b41c0d53248be6ab040d37e273322b30 | |
parent | af89db3407e599ea47d62a851759fa929cdd4713 (diff) | |
download | nextcloud-server-f5c5c5181f66e15ff3ccc30fa32e84e20a863182.tar.gz nextcloud-server-f5c5c5181f66e15ff3ccc30fa32e84e20a863182.zip |
Remove unused and deprecated class and interface AppHelper
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
-rw-r--r-- | lib/composer/composer/autoload_classmap.php | 2 | ||||
-rw-r--r-- | lib/composer/composer/autoload_static.php | 2 | ||||
-rw-r--r-- | lib/private/App/CodeChecker/DeprecationCheck.php | 1 | ||||
-rw-r--r-- | lib/private/AppHelper.php | 48 | ||||
-rw-r--r-- | lib/private/Server.php | 10 | ||||
-rw-r--r-- | lib/public/IHelper.php | 50 | ||||
-rw-r--r-- | lib/public/IServerContainer.php | 8 | ||||
-rw-r--r-- | tests/lib/ServerTest.php | 2 |
8 files changed, 0 insertions, 123 deletions
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index 5a390eaf443..fb699e35a61 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -203,7 +203,6 @@ return array( 'OCP\\IEventSource' => $baseDir . '/lib/public/IEventSource.php', 'OCP\\IGroup' => $baseDir . '/lib/public/IGroup.php', 'OCP\\IGroupManager' => $baseDir . '/lib/public/IGroupManager.php', - 'OCP\\IHelper' => $baseDir . '/lib/public/IHelper.php', 'OCP\\IImage' => $baseDir . '/lib/public/IImage.php', 'OCP\\IL10N' => $baseDir . '/lib/public/IL10N.php', 'OCP\\ILogger' => $baseDir . '/lib/public/ILogger.php', @@ -349,7 +348,6 @@ return array( 'OC\\AppFramework\\Utility\\ControllerMethodReflector' => $baseDir . '/lib/private/AppFramework/Utility/ControllerMethodReflector.php', 'OC\\AppFramework\\Utility\\SimpleContainer' => $baseDir . '/lib/private/AppFramework/Utility/SimpleContainer.php', 'OC\\AppFramework\\Utility\\TimeFactory' => $baseDir . '/lib/private/AppFramework/Utility/TimeFactory.php', - 'OC\\AppHelper' => $baseDir . '/lib/private/AppHelper.php', 'OC\\App\\AppManager' => $baseDir . '/lib/private/App/AppManager.php', 'OC\\App\\AppStore\\Bundles\\Bundle' => $baseDir . '/lib/private/App/AppStore/Bundles/Bundle.php', 'OC\\App\\AppStore\\Bundles\\BundleFetcher' => $baseDir . '/lib/private/App/AppStore/Bundles/BundleFetcher.php', diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index 8e9749f2683..40b9c6237f0 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -233,7 +233,6 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OCP\\IEventSource' => __DIR__ . '/../../..' . '/lib/public/IEventSource.php', 'OCP\\IGroup' => __DIR__ . '/../../..' . '/lib/public/IGroup.php', 'OCP\\IGroupManager' => __DIR__ . '/../../..' . '/lib/public/IGroupManager.php', - 'OCP\\IHelper' => __DIR__ . '/../../..' . '/lib/public/IHelper.php', 'OCP\\IImage' => __DIR__ . '/../../..' . '/lib/public/IImage.php', 'OCP\\IL10N' => __DIR__ . '/../../..' . '/lib/public/IL10N.php', 'OCP\\ILogger' => __DIR__ . '/../../..' . '/lib/public/ILogger.php', @@ -379,7 +378,6 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\AppFramework\\Utility\\ControllerMethodReflector' => __DIR__ . '/../../..' . '/lib/private/AppFramework/Utility/ControllerMethodReflector.php', 'OC\\AppFramework\\Utility\\SimpleContainer' => __DIR__ . '/../../..' . '/lib/private/AppFramework/Utility/SimpleContainer.php', 'OC\\AppFramework\\Utility\\TimeFactory' => __DIR__ . '/../../..' . '/lib/private/AppFramework/Utility/TimeFactory.php', - 'OC\\AppHelper' => __DIR__ . '/../../..' . '/lib/private/AppHelper.php', 'OC\\App\\AppManager' => __DIR__ . '/../../..' . '/lib/private/App/AppManager.php', 'OC\\App\\AppStore\\Bundles\\Bundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/Bundle.php', 'OC\\App\\AppStore\\Bundles\\BundleFetcher' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/BundleFetcher.php', diff --git a/lib/private/App/CodeChecker/DeprecationCheck.php b/lib/private/App/CodeChecker/DeprecationCheck.php index 722697f3313..3e843e4f91a 100644 --- a/lib/private/App/CodeChecker/DeprecationCheck.php +++ b/lib/private/App/CodeChecker/DeprecationCheck.php @@ -40,7 +40,6 @@ class DeprecationCheck extends AbstractCheck { 'OCP\Contacts' => '8.1.0', 'OCP\DB' => '8.1.0', - 'OCP\IHelper' => '8.1.0', 'OCP\JSON' => '8.1.0', 'OCP\Response' => '8.1.0', 'OCP\AppFramework\IApi' => '8.0.0', diff --git a/lib/private/AppHelper.php b/lib/private/AppHelper.php deleted file mode 100644 index c99cf4a8304..00000000000 --- a/lib/private/AppHelper.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php -/** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Bart Visscher <bartv@thisnet.nl> - * @author Lukas Reschke <lukas@statuscode.ch> - * @author Morris Jobke <hey@morrisjobke.de> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program 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 Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ - -namespace OC; - -/** - * Class AppHelper - * @deprecated 8.1.0 - */ -class AppHelper implements \OCP\IHelper { - /** - * Gets the content of an URL by using CURL or a fallback if it is not - * installed - * @param string $url the url that should be fetched - * @return string the content of the webpage - * @deprecated 8.1.0 Use \OCP\IServerContainer::getHTTPClientService - */ - public function getUrlContent($url) { - try { - $client = \OC::$server->getHTTPClientService()->newClient(); - $response = $client->get($url); - return $response->getBody(); - } catch (\Exception $e) { - return false; - } - } -} diff --git a/lib/private/Server.php b/lib/private/Server.php index e0bd21b0358..af739c91b02 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -470,9 +470,6 @@ class Server extends ServerContainer implements IServerContainer { }); $this->registerAlias('URLGenerator', \OCP\IURLGenerator::class); - $this->registerService('AppHelper', function ($c) { - return new \OC\AppHelper(); - }); $this->registerAlias('AppFetcher', AppFetcher::class); $this->registerAlias('CategoryFetcher', CategoryFetcher::class); @@ -1459,13 +1456,6 @@ class Server extends ServerContainer implements IServerContainer { } /** - * @return \OCP\IHelper - */ - public function getHelper() { - return $this->query('AppHelper'); - } - - /** * @return AppFetcher */ public function getAppFetcher() { diff --git a/lib/public/IHelper.php b/lib/public/IHelper.php deleted file mode 100644 index 707884b82f8..00000000000 --- a/lib/public/IHelper.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php -/** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Bart Visscher <bartv@thisnet.nl> - * @author Lukas Reschke <lukas@statuscode.ch> - * @author Morris Jobke <hey@morrisjobke.de> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program 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 Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ - -/** - * Public interface of ownCloud for apps to use. - * Helper interface - * - */ - -// use OCP namespace for all classes that are considered public. -// This means that they should be used by apps instead of the internal ownCloud classes -namespace OCP; - -/** - * Functions that don't have any specific interface to place - * @since 6.0.0 - * @deprecated 8.1.0 - */ -interface IHelper { - /** - * Gets the content of an URL by using CURL or a fallback if it is not - * installed - * @param string $url the url that should be fetched - * @return string the content of the webpage - * @since 6.0.0 - * @deprecated 8.1.0 Use \OCP\IServerContainer::getHTTPClientService - */ - public function getUrlContent($url); -} diff --git a/lib/public/IServerContainer.php b/lib/public/IServerContainer.php index 851a3c7e2bb..316db8f4a22 100644 --- a/lib/public/IServerContainer.php +++ b/lib/public/IServerContainer.php @@ -251,14 +251,6 @@ interface IServerContainer extends IContainer { public function getURLGenerator(); /** - * Returns the Helper - * - * @return \OCP\IHelper - * @since 6.0.0 - */ - public function getHelper(); - - /** * Returns an ICache instance * * @return \OCP\ICache diff --git a/tests/lib/ServerTest.php b/tests/lib/ServerTest.php index 9c375dd654e..63642c997ab 100644 --- a/tests/lib/ServerTest.php +++ b/tests/lib/ServerTest.php @@ -53,8 +53,6 @@ class ServerTest extends \Test\TestCase { ['AppConfig', '\OC\AppConfig'], ['AppConfig', '\OCP\IAppConfig'], ['AppFetcher', AppFetcher::class], - ['AppHelper', '\OC\AppHelper'], - ['AppHelper', '\OCP\IHelper'], ['AppManager', '\OC\App\AppManager'], ['AppManager', '\OCP\App\IAppManager'], ['AsyncCommandBus', '\OC\Command\AsyncBus'], |