summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-10-14 16:34:55 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-14 16:34:55 +0200
commitfbccdedb5c5153d2876f610bc37065432f4e54af (patch)
treec80b3c0be426e74db4ebe623cbb25ce5c4769135
parentba461b0c9200c3ba62cf63f4477e4731dec9f61c (diff)
parentd904a09a049f64ad3b55eb2b5184b4c5554b4710 (diff)
downloadnextcloud-server-fbccdedb5c5153d2876f610bc37065432f4e54af.tar.gz
nextcloud-server-fbccdedb5c5153d2876f610bc37065432f4e54af.zip
Merge pull request #19731 from owncloud/update-list-of-deprecated-methods
Update list of deprecated methods
-rw-r--r--lib/private/app/codechecker/deprecationcheck.php31
-rw-r--r--lib/private/util.php3
-rw-r--r--tests/data/app/code-checker/test-const.php2
-rw-r--r--tests/lib/app/codechecker/deprecationchecktest.php2
4 files changed, 29 insertions, 9 deletions
diff --git a/lib/private/app/codechecker/deprecationcheck.php b/lib/private/app/codechecker/deprecationcheck.php
index 3b6dc968bb5..1d287edc858 100644
--- a/lib/private/app/codechecker/deprecationcheck.php
+++ b/lib/private/app/codechecker/deprecationcheck.php
@@ -34,6 +34,8 @@ class DeprecationCheck extends AbstractCheck implements ICheck {
*/
protected function getLocalClasses() {
return [
+ 'OC_JSON' => '8.2.0',
+
'OCP\Config' => '8.0.0',
'OCP\Contacts' => '8.1.0',
'OCP\DB' => '8.1.0',
@@ -49,6 +51,15 @@ class DeprecationCheck extends AbstractCheck implements ICheck {
*/
protected function getLocalConstants() {
return [
+ 'OC_API::GUEST_AUTH' => '8.2.0',
+ 'OC_API::USER_AUTH' => '8.2.0',
+ 'OC_API::SUBADMIN_AUTH' => '8.2.0',
+ 'OC_API::ADMIN_AUTH' => '8.2.0',
+ 'OC_API::RESPOND_UNAUTHORISED' => '8.2.0',
+ 'OC_API::RESPOND_SERVER_ERROR' => '8.2.0',
+ 'OC_API::RESPOND_NOT_FOUND' => '8.2.0',
+ 'OC_API::RESPOND_UNKNOWN_ERROR' => '8.2.0',
+
'OCP::PERMISSION_CREATE' => '8.0.0',
'OCP::PERMISSION_READ' => '8.0.0',
'OCP::PERMISSION_UPDATE' => '8.0.0',
@@ -80,8 +91,13 @@ class DeprecationCheck extends AbstractCheck implements ICheck {
*/
protected function getLocalMethods() {
return [
+ 'OC_L10N::get' => '8.2.0',
+
+ 'OCP\Activity\IManager::publishActivity' => '8.2.0',
+
'OCP\App::register' => '8.1.0',
'OCP\App::addNavigationEntry' => '8.1.0',
+ 'OCP\App::getActiveNavigationEntry' => '8.2.0',
'OCP\App::setActiveNavigationEntry' => '8.1.0',
'OCP\AppFramework\Controller::params' => '7.0.0',
@@ -115,8 +131,12 @@ class DeprecationCheck extends AbstractCheck implements ICheck {
'OCP\IAppConfig::setValue' => '8.0.0',
'OCP\IAppConfig::deleteApp' => '8.0.0',
+ 'OCP\IDBConnection::createQueryBuilder' => '8.2.0',
+ 'OCP\IDBConnection::getExpressionBuilder' => '8.2.0',
+
'OCP\ISearch::search' => '8.0.0',
+ 'OCP\IServerContainer::getCache' => '8.2.0',
'OCP\IServerContainer::getDb' => '8.1.0',
'OCP\IServerContainer::getHTTPHelper' => '8.1.0',
@@ -128,20 +148,21 @@ class DeprecationCheck extends AbstractCheck implements ICheck {
'OCP\User::logout' => '8.1.0',
'OCP\User::checkPassword' => '8.1.0',
- 'OCP\Util::sendMail' => '8.1.0',
- 'OCP\Util::formatDate' => '8.0.0',
'OCP\Util::encryptedFiles' => '8.1.0',
- 'OCP\Util::linkToRoute' => '8.1.0',
- 'OCP\Util::linkTo' => '8.1.0',
+ 'OCP\Util::formatDate' => '8.0.0',
+ 'OCP\Util::generateRandomBytes' => '8.1.0',
'OCP\Util::getServerHost' => '8.1.0',
'OCP\Util::getServerProtocol' => '8.1.0',
'OCP\Util::getRequestUri' => '8.1.0',
'OCP\Util::getScriptName' => '8.1.0',
'OCP\Util::imagePath' => '8.1.0',
'OCP\Util::isValidFileName' => '8.1.0',
- 'OCP\Util::generateRandomBytes' => '8.1.0',
+ 'OCP\Util::linkToRoute' => '8.1.0',
+ 'OCP\Util::linkTo' => '8.1.0',
+ 'OCP\Util::logException' => '8.2.0',
'OCP\Util::mb_str_replace' => '8.2.0',
'OCP\Util::mb_substr_replace' => '8.2.0',
+ 'OCP\Util::sendMail' => '8.1.0',
];
}
}
diff --git a/lib/private/util.php b/lib/private/util.php
index 9ea355f0168..05f10aef1e0 100644
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -1300,12 +1300,11 @@ class OC_Util {
/**
* Get URL content
* @param string $url Url to get content
- * @deprecated Use \OC::$server->getHTTPHelper()->getUrlContent($url);
* @throws Exception If the URL does not start with http:// or https://
* @return string of the response or false on error
* This function get the content of a page via curl, if curl is enabled.
* If not, file_get_contents is used.
- * @deprecated Use \OCP\Http\Client\IClientService
+ * @deprecated Use \OC::$server->getHTTPClientService()->newClient()->get($url);
*/
public static function getUrlContent($url) {
try {
diff --git a/tests/data/app/code-checker/test-const.php b/tests/data/app/code-checker/test-const.php
index 2af6baf2f3d..7ea3bd6c870 100644
--- a/tests/data/app/code-checker/test-const.php
+++ b/tests/data/app/code-checker/test-const.php
@@ -5,6 +5,6 @@
*/
class BadClass {
public function foo() {
- $bar = OC_API::ADMIN_AUTH;
+ $bar = \OC_API::ADMIN_AUTH;
}
}
diff --git a/tests/lib/app/codechecker/deprecationchecktest.php b/tests/lib/app/codechecker/deprecationchecktest.php
index 2cf64a9d186..ee69f075a61 100644
--- a/tests/lib/app/codechecker/deprecationchecktest.php
+++ b/tests/lib/app/codechecker/deprecationchecktest.php
@@ -38,6 +38,7 @@ class DeprecationCheckTest extends TestCase {
['OCP\AppFramework\IApi', 1006, 'test-deprecated-use-alias.php'],
['AppFramework\IApi', 1001, 'test-deprecated-use-sub.php'],
['OAF\IApi', 1001, 'test-deprecated-use-sub-alias.php'],
+ ['OC_API::ADMIN_AUTH', 1003, 'test-const.php'],
];
}
@@ -61,7 +62,6 @@ class DeprecationCheckTest extends TestCase {
['test-extends.php'],
['test-implements.php'],
['test-static-call.php'],
- ['test-const.php'],
['test-new.php'],
['test-use.php'],
['test-identical-operator.php'],