@mnapoli opened this Issue on June 12th 2015 Member

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

+1

@mattab commented on June 16th 2015 Owner

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 Owner
  • 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 Owner

Hi @braekling great to know!

@mattab commented on September 2nd 2015 Owner

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 Owner

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

Powered by GitHub Issue Mirror