diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index 5a390eaf44..fb699e35a6 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 8e9749f268..40b9c6237f 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 722697f331..3e843e4f91 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 c99cf4a830..0000000000 --- a/lib/private/AppHelper.php +++ /dev/null @@ -1,48 +0,0 @@ - - * @author Lukas Reschke - * @author Morris Jobke - * - * @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 - * - */ - -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 e0bd21b035..af739c91b0 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); @@ -1458,13 +1455,6 @@ class Server extends ServerContainer implements IServerContainer { return $this->query('URLGenerator'); } - /** - * @return \OCP\IHelper - */ - public function getHelper() { - return $this->query('AppHelper'); - } - /** * @return AppFetcher */ diff --git a/lib/public/IHelper.php b/lib/public/IHelper.php deleted file mode 100644 index 707884b82f..0000000000 --- a/lib/public/IHelper.php +++ /dev/null @@ -1,50 +0,0 @@ - - * @author Lukas Reschke - * @author Morris Jobke - * - * @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 - * - */ - -/** - * 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 631611c3f1..a80fc262ee 100644 --- a/lib/public/IServerContainer.php +++ b/lib/public/IServerContainer.php @@ -250,14 +250,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 * diff --git a/tests/lib/ServerTest.php b/tests/lib/ServerTest.php index 9c375dd654..63642c997a 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'],