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

Deprecate OC_JSON and OCP\JSON #14129

Merged
merged 1 commit into from
Feb 12, 2015
Merged

Deprecate OC_JSON and OCP\JSON #14129

merged 1 commit into from
Feb 12, 2015

Conversation

LukasReschke
Copy link
Member

This deprecates – but not removes – those two classes and all functions in it. There is no reason that new developments should use those methods as with the AppFramework there is a replacement that allows testable code (this code uses exit() and other anti-patterns that makes testing such code impossible). This change set also corrects some PHPDocs.

With the @deprecated annotation IDEs like PHPStorm will point out to the developer that a functionality is deprecated and that there is a better suited replacement.

cc @DeepDiver1975 @karlitschek

This deprecates – but not removes – those two classes and all functions in it. There is no reason that new developments should use those methods as with the AppFramework there is a replacement that allows testable code.

With the `@deprecated` annotation IDEs like PHPStorm will point out to the developer that a functionality is deprecated and that there is a better suited replacement.
@scrutinizer-notifier
Copy link

The inspection completed: 397 new issues

@ghost
Copy link

ghost commented Feb 12, 2015

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/9266/
Test PASSed.

@@ -31,141 +30,142 @@
namespace OCP;

/**
* This class provides convinient functions to generate and send JSON data. Usefull for Ajax calls
* This class provides convenient functions to generate and send JSON data. Useful for Ajax calls
* @deprecated Use a AppFramework JSONResponse instead
Copy link
Contributor

Choose a reason for hiding this comment

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

Please specify the time range for public APIs

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, that would require that we have a consensus on that first. => Out of scope for this PR.

@DeepDiver1975 DeepDiver1975 added this to the 8.1-next milestone Feb 12, 2015
@DeepDiver1975
Copy link
Member

fine with me 👍

@MorrisJobke
Copy link
Contributor

👍

MorrisJobke added a commit that referenced this pull request Feb 12, 2015
Deprecate `OC_JSON` and `OCP\JSON`
@MorrisJobke MorrisJobke merged commit 6421697 into master Feb 12, 2015
@MorrisJobke MorrisJobke deleted the deprecate-oc-json branch February 12, 2015 09:05
@lock lock bot locked as resolved and limited conversation to collaborators Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants