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

Reporting API: remove the PHP serialization response format #8100

Closed
mnapoli opened this issue Jun 12, 2015 · 10 comments · Fixed by #15558
Closed

Reporting API: remove the PHP serialization response format #8100

mnapoli opened this issue Jun 12, 2015 · 10 comments · Fixed by #15558
Assignees
Labels
Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@mnapoli
Copy link
Contributor

mnapoli commented Jun 12, 2015

A possible response format for APIs is in a PHP serialized string. This isn't good for many reasons:

  • readable only by PHP
  • prone to not work across systems or across time (e.g. differences between HHVM and the zend engine)
  • very fragile (e.g. some plugin replace words in responses, this break this format)
  • not standard at all (JSON, XML & co are more than enough for an HTTP API)

We could deprecate it for 3.0 and remove it later.

@mnapoli mnapoli added this to the 3.0.0 milestone Jun 12, 2015
@diosmosis
Copy link
Member

+1

@mattab mattab added the Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. label Jun 16, 2015
@mattab
Copy link
Member

mattab commented Jun 16, 2015

Sounds good to me too.

Hi @braekling - FYI: we may deprecate serialised PHP api output in Piwik 3.0.0. maybe it would be possible to plan ahead of this change, and make WP-Piwik use another API format eg. JSON? (IIRC wp-piwik is using php serialised api)

@mattab
Copy link
Member

mattab commented Jun 23, 2015

  • When this will be done let's remove the temporary fix for 'serialize=1' in WhiteLabel plugin

@braekling
Copy link

@mattab Thanks for the advise. I'm working on this.

@braekling
Copy link

FYI: WP-Piwik is using JSON now.

@mattab mattab added the Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. label Aug 13, 2015
@mattab
Copy link
Member

mattab commented Aug 13, 2015

Hi @braekling great to know!

@mattab
Copy link
Member

mattab commented Sep 2, 2015

Note: search in codebase for format=php for uses in core that should be changed (also two UI tests: CoreUpdaterDb and ReportExporting)

@mattab
Copy link
Member

mattab commented Jun 19, 2017

Moving tentatively to Piwik 4.0.0 (PHP format export causes some issues such as #11108 )

Maybe we could announce the PHP format deprecation in Piwik 4 and remove it completely in Piwik 5

@tsteur
Copy link
Member

tsteur commented Feb 11, 2020

@mattab I reckon it should be fine to directly remove as part of Matomo 4. It be rarely used I suppose and it's quite easy to migrate to JSON for example. (all you need to do is basically a json_decode() on the response I reckon)

@mattab
Copy link
Member

mattab commented Feb 11, 2020

since it's so easy to change to json instead, sounds good to remove the PHP format in Matomo 4 directly 👍

@sgiehl sgiehl self-assigned this Feb 12, 2020
@mattab mattab added the Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. label Sep 28, 2020
@mattab mattab changed the title Deprecate the PHP serialization response format Reporting API: deprecate the PHP serialization response format Sep 28, 2020
@mattab mattab changed the title Reporting API: deprecate the PHP serialization response format Reporting API: remove the PHP serialization response format Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants