Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove \OCP\JSON #8943

Merged
merged 3 commits into from
Mar 23, 2018
Merged

Remove \OCP\JSON #8943

merged 3 commits into from
Mar 23, 2018

Conversation

rullzer
Copy link
Member

@rullzer rullzer commented Mar 22, 2018

It should of course be solved properly by moving those functions away from the private class. But I really want to get rid of this in the public interface so nobody that writes app can still use it.

They should be properly fixed at some point.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
*
* @suppress PhanDeprecatedFunction
*/
public static function checkLoggedIn() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used by following apps:

bildschirmfoto 2018-03-22 um 15 31 46

*
* @suppress PhanDeprecatedFunction
*/
public static function callCheck() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used by following apps:

bildschirmfoto 2018-03-22 um 15 31 58

* @deprecated 8.1.0 Use a AppFramework JSONResponse instead
* @suppress PhanDeprecatedFunction
*/
public static function success( $data = array() ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used by following apps:

bildschirmfoto 2018-03-22 um 15 34 13

* @deprecated 8.1.0 Use a AppFramework JSONResponse instead
* @suppress PhanDeprecatedFunction
*/
public static function error( $data = array() ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used by following apps:

bildschirmfoto 2018-03-22 um 15 37 24

* @deprecated 8.1.0 Use the AppFramework instead. It will automatically check if the app is enabled.
* @suppress PhanDeprecatedFunction
*/
public static function checkAppEnabled( $app ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used by following apps:

bildschirmfoto 2018-03-22 um 15 37 51

* @deprecated 8.1.0 Use annotation based ACLs from the AppFramework instead
* @suppress PhanDeprecatedFunction
*/
public static function checkAdminUser() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used by following apps:

bildschirmfoto 2018-03-22 um 15 38 22

Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We maybe should ping again the authors of those apps:

  • files_opds
  • files_reader
  • files_snapshots
  • piwik
  • radio
  • rainloop
  • user_sql
  • W2G2
  • working2gether

Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are various places that use \\OC_JSON instead of \OC_JSON

@@ -47,10 +47,10 @@
unset($version['path']);
}

\OCP\JSON::success(array('data' => array('versions' => $versions, 'endReached' => $endReached)));
\\OC_JSON::success(array('data' => array('versions' => $versions, 'endReached' => $endReached)));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate backslack 😉

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@codecov
Copy link

codecov bot commented Mar 23, 2018

Codecov Report

Merging #8943 into master will increase coverage by 0.01%.
The diff coverage is 0%.

@@             Coverage Diff              @@
##             master    #8943      +/-   ##
============================================
+ Coverage     51.88%   51.89%   +0.01%     
+ Complexity    25283    25277       -6     
============================================
  Files          1604     1603       -1     
  Lines         94918    94906      -12     
  Branches       1388     1388              
============================================
+ Hits          49245    49251       +6     
+ Misses        45673    45655      -18
Impacted Files Coverage Δ Complexity Δ
settings/ajax/enableapp.php 0% <0%> (ø) 0 <0> (ø) ⬇️
settings/ajax/togglesubadmins.php 0% <0%> (ø) 0 <0> (ø) ⬇️
settings/ajax/setquota.php 0% <0%> (ø) 0 <0> (ø) ⬇️
lib/base.php 2.15% <0%> (ø) 168 <0> (ø) ⬇️
apps/user_ldap/ajax/testConfiguration.php 0% <0%> (ø) 0 <0> (ø) ⬇️
apps/files_versions/ajax/rollbackVersion.php 0% <0%> (ø) 0 <0> (ø) ⬇️
settings/ajax/navigationdetect.php 0% <0%> (ø) 0 <0> (ø) ⬇️
settings/ajax/updateapp.php 0% <0%> (ø) 0 <0> (ø) ⬇️
apps/user_ldap/ajax/getConfiguration.php 0% <0%> (ø) 0 <0> (ø) ⬇️
apps/files_versions/ajax/getVersions.php 0% <0%> (ø) 0 <0> (ø) ⬇️
... and 17 more

@MorrisJobke MorrisJobke added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Mar 23, 2018
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer rullzer merged commit e286609 into master Mar 23, 2018
@rullzer rullzer deleted the dep_oc_json branch March 23, 2018 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants