bugsnag / bugsnag-php

BugSnag error monitoring and crash reporting tool for PHP apps
https://docs.bugsnag.com/platforms/php
MIT License
554 stars 77 forks source link

Is payloadVersion set on the wrong object? #649

Closed xPaw closed 2 years ago

xPaw commented 2 years ago

It's set on the error object here: https://github.com/bugsnag/bugsnag-php/blob/44fc93cac95e44741e0a5f9100f2a0958372e792/src/Report.php#L759

But according to the docs (https://bugsnagerrorreportingapi.docs.apiary.io/) it should be set on the root object here: https://github.com/bugsnag/bugsnag-php/blob/ad2b40ba8a512d9b19ed0ff8fab169184d3eb775/src/HttpClient.php#L217-L221

Was it different in v4? Should it be upgraded to v5?

luke-belton commented 2 years ago

Hi @xPaw payloadVersion is something used in our data pipeline logic for knowing how to process event payloads - so the current bugsnag-php payload format is correct for v4 (and similarly our API docs are correct for v5). Did you notice something that made you question whether this should be updated in this repo?

xPaw commented 2 years ago

I was generally curious because I was writing a payload sender myself.