@mnapoli opened this Issue on June 12th 2015 Contributor

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.

@diosmosis commented on June 12th 2015 Member


@mattab commented on June 16th 2015 Member

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 commented on June 23rd 2015 Member
  • When this will be done let's remove the temporary fix for 'serialize=1' in WhiteLabel plugin
@braekling commented on June 23rd 2015

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

@braekling commented on July 23rd 2015

FYI: WP-Piwik is using JSON now.

@mattab commented on August 13th 2015 Member

Hi @braekling great to know!

@mattab commented on September 2nd 2015 Member

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

@mattab commented on June 19th 2017 Member

Moving tentatively to Piwik 4.0.0 (PHP format export causes some issues such as https://github.com/piwik/piwik/issues/11108 )

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

@tsteur commented on February 11th 2020 Member

@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 commented on February 11th 2020 Member

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

This Issue was closed on March 22nd 2020
Powered by GitHub Issue Mirror