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

APIs marked as deprecated can't be used anymore #6519

Closed
sgiehl opened this issue Oct 24, 2014 · 3 comments
Closed

APIs marked as deprecated can't be used anymore #6519

sgiehl opened this issue Oct 24, 2014 · 3 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. Critical Indicates the severity of an issue is very critical and the issue has a very high priority.

Comments

@sgiehl
Copy link
Member

sgiehl commented Oct 24, 2014

As soon as an API is marked as deprecated it is not possible anymore to call them.
Example:
http://demo.piwik.org/index.php?module=API&method=Live.getLastVisitsForVisitor&idSite=1&format=JSON

Those APIs should still be usable until they are removed. (Otherwise we could remove them directly)
As that breaks BC in some way, we should try to fix that asap.

@sgiehl sgiehl added Bug For errors / faults / flaws / inconsistencies etc. Critical Indicates the severity of an issue is very critical and the issue has a very high priority. labels Oct 24, 2014
@tsteur
Copy link
Member

tsteur commented Oct 27, 2014

True! Problem seems to be here https://github.com/piwik/piwik/blob/master/core/API/Proxy.php#L463 . In this case it seems to be caused by @ignore and @deprecated as the method is tagged with both. I'm surprised about the @ignore. If a method is not supposed to be available in the API it should not be in this class but in a Model or other class. Needs to be refactored...

When did it stop to work? Looks like this code is already there for a while

@sgiehl
Copy link
Member Author

sgiehl commented Oct 27, 2014

I don't know since when it's not working. Just noticed it as I'm about to
deprecate some parts of the usersettings API and wanted to add some test
that check that the API methods are still callable...
And a @deprecated seems to be enough to make the API uncallable.

@tsteur
Copy link
Member

tsteur commented Oct 28, 2014

I'm going to create an issue for removing all methods out of API.php that have an @ignore tag. Edit: See #6535

tsteur added a commit that referenced this issue Oct 28, 2014
…can be executed now. I do not know whether the actual data is correct or not!
tsteur added a commit that referenced this issue Oct 28, 2014
…thods

refs #6519 allow execution of deprecated methods
@tsteur tsteur closed this as completed Oct 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Critical Indicates the severity of an issue is very critical and the issue has a very high priority.
Projects
None yet
Development

No branches or pull requests

2 participants