Merge pull request #8784 from nextcloud/remove-unused-deprecated-apphelper
Remove unused and deprecated class and interface AppHelper
This commit is contained in:
commit
432e529827
|
@ -203,7 +203,6 @@ return array(
|
||||||
'OCP\\IEventSource' => $baseDir . '/lib/public/IEventSource.php',
|
'OCP\\IEventSource' => $baseDir . '/lib/public/IEventSource.php',
|
||||||
'OCP\\IGroup' => $baseDir . '/lib/public/IGroup.php',
|
'OCP\\IGroup' => $baseDir . '/lib/public/IGroup.php',
|
||||||
'OCP\\IGroupManager' => $baseDir . '/lib/public/IGroupManager.php',
|
'OCP\\IGroupManager' => $baseDir . '/lib/public/IGroupManager.php',
|
||||||
'OCP\\IHelper' => $baseDir . '/lib/public/IHelper.php',
|
|
||||||
'OCP\\IImage' => $baseDir . '/lib/public/IImage.php',
|
'OCP\\IImage' => $baseDir . '/lib/public/IImage.php',
|
||||||
'OCP\\IL10N' => $baseDir . '/lib/public/IL10N.php',
|
'OCP\\IL10N' => $baseDir . '/lib/public/IL10N.php',
|
||||||
'OCP\\ILogger' => $baseDir . '/lib/public/ILogger.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\\ControllerMethodReflector' => $baseDir . '/lib/private/AppFramework/Utility/ControllerMethodReflector.php',
|
||||||
'OC\\AppFramework\\Utility\\SimpleContainer' => $baseDir . '/lib/private/AppFramework/Utility/SimpleContainer.php',
|
'OC\\AppFramework\\Utility\\SimpleContainer' => $baseDir . '/lib/private/AppFramework/Utility/SimpleContainer.php',
|
||||||
'OC\\AppFramework\\Utility\\TimeFactory' => $baseDir . '/lib/private/AppFramework/Utility/TimeFactory.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\\AppManager' => $baseDir . '/lib/private/App/AppManager.php',
|
||||||
'OC\\App\\AppStore\\Bundles\\Bundle' => $baseDir . '/lib/private/App/AppStore/Bundles/Bundle.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',
|
'OC\\App\\AppStore\\Bundles\\BundleFetcher' => $baseDir . '/lib/private/App/AppStore/Bundles/BundleFetcher.php',
|
||||||
|
|
|
@ -233,7 +233,6 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
|
||||||
'OCP\\IEventSource' => __DIR__ . '/../../..' . '/lib/public/IEventSource.php',
|
'OCP\\IEventSource' => __DIR__ . '/../../..' . '/lib/public/IEventSource.php',
|
||||||
'OCP\\IGroup' => __DIR__ . '/../../..' . '/lib/public/IGroup.php',
|
'OCP\\IGroup' => __DIR__ . '/../../..' . '/lib/public/IGroup.php',
|
||||||
'OCP\\IGroupManager' => __DIR__ . '/../../..' . '/lib/public/IGroupManager.php',
|
'OCP\\IGroupManager' => __DIR__ . '/../../..' . '/lib/public/IGroupManager.php',
|
||||||
'OCP\\IHelper' => __DIR__ . '/../../..' . '/lib/public/IHelper.php',
|
|
||||||
'OCP\\IImage' => __DIR__ . '/../../..' . '/lib/public/IImage.php',
|
'OCP\\IImage' => __DIR__ . '/../../..' . '/lib/public/IImage.php',
|
||||||
'OCP\\IL10N' => __DIR__ . '/../../..' . '/lib/public/IL10N.php',
|
'OCP\\IL10N' => __DIR__ . '/../../..' . '/lib/public/IL10N.php',
|
||||||
'OCP\\ILogger' => __DIR__ . '/../../..' . '/lib/public/ILogger.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\\ControllerMethodReflector' => __DIR__ . '/../../..' . '/lib/private/AppFramework/Utility/ControllerMethodReflector.php',
|
||||||
'OC\\AppFramework\\Utility\\SimpleContainer' => __DIR__ . '/../../..' . '/lib/private/AppFramework/Utility/SimpleContainer.php',
|
'OC\\AppFramework\\Utility\\SimpleContainer' => __DIR__ . '/../../..' . '/lib/private/AppFramework/Utility/SimpleContainer.php',
|
||||||
'OC\\AppFramework\\Utility\\TimeFactory' => __DIR__ . '/../../..' . '/lib/private/AppFramework/Utility/TimeFactory.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\\AppManager' => __DIR__ . '/../../..' . '/lib/private/App/AppManager.php',
|
||||||
'OC\\App\\AppStore\\Bundles\\Bundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/Bundle.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',
|
'OC\\App\\AppStore\\Bundles\\BundleFetcher' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/BundleFetcher.php',
|
||||||
|
|
|
@ -40,7 +40,6 @@ class DeprecationCheck extends AbstractCheck {
|
||||||
|
|
||||||
'OCP\Contacts' => '8.1.0',
|
'OCP\Contacts' => '8.1.0',
|
||||||
'OCP\DB' => '8.1.0',
|
'OCP\DB' => '8.1.0',
|
||||||
'OCP\IHelper' => '8.1.0',
|
|
||||||
'OCP\JSON' => '8.1.0',
|
'OCP\JSON' => '8.1.0',
|
||||||
'OCP\Response' => '8.1.0',
|
'OCP\Response' => '8.1.0',
|
||||||
'OCP\AppFramework\IApi' => '8.0.0',
|
'OCP\AppFramework\IApi' => '8.0.0',
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -470,9 +470,6 @@ class Server extends ServerContainer implements IServerContainer {
|
||||||
});
|
});
|
||||||
$this->registerAlias('URLGenerator', \OCP\IURLGenerator::class);
|
$this->registerAlias('URLGenerator', \OCP\IURLGenerator::class);
|
||||||
|
|
||||||
$this->registerService('AppHelper', function ($c) {
|
|
||||||
return new \OC\AppHelper();
|
|
||||||
});
|
|
||||||
$this->registerAlias('AppFetcher', AppFetcher::class);
|
$this->registerAlias('AppFetcher', AppFetcher::class);
|
||||||
$this->registerAlias('CategoryFetcher', CategoryFetcher::class);
|
$this->registerAlias('CategoryFetcher', CategoryFetcher::class);
|
||||||
|
|
||||||
|
@ -1458,13 +1455,6 @@ class Server extends ServerContainer implements IServerContainer {
|
||||||
return $this->query('URLGenerator');
|
return $this->query('URLGenerator');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \OCP\IHelper
|
|
||||||
*/
|
|
||||||
public function getHelper() {
|
|
||||||
return $this->query('AppHelper');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return AppFetcher
|
* @return AppFetcher
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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);
|
|
||||||
}
|
|
|
@ -250,14 +250,6 @@ interface IServerContainer extends IContainer {
|
||||||
*/
|
*/
|
||||||
public function getURLGenerator();
|
public function getURLGenerator();
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the Helper
|
|
||||||
*
|
|
||||||
* @return \OCP\IHelper
|
|
||||||
* @since 6.0.0
|
|
||||||
*/
|
|
||||||
public function getHelper();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an ICache instance
|
* Returns an ICache instance
|
||||||
*
|
*
|
||||||
|
|
|
@ -53,8 +53,6 @@ class ServerTest extends \Test\TestCase {
|
||||||
['AppConfig', '\OC\AppConfig'],
|
['AppConfig', '\OC\AppConfig'],
|
||||||
['AppConfig', '\OCP\IAppConfig'],
|
['AppConfig', '\OCP\IAppConfig'],
|
||||||
['AppFetcher', AppFetcher::class],
|
['AppFetcher', AppFetcher::class],
|
||||||
['AppHelper', '\OC\AppHelper'],
|
|
||||||
['AppHelper', '\OCP\IHelper'],
|
|
||||||
['AppManager', '\OC\App\AppManager'],
|
['AppManager', '\OC\App\AppManager'],
|
||||||
['AppManager', '\OCP\App\IAppManager'],
|
['AppManager', '\OCP\App\IAppManager'],
|
||||||
['AsyncCommandBus', '\OC\Command\AsyncBus'],
|
['AsyncCommandBus', '\OC\Command\AsyncBus'],
|
||||||
|
|
Loading…
Reference in New Issue