commercetools / commercetools/commercetools-sdk-php-v2
Allow getting raw results of an API Response
- Dominant language
- PHP
- Stars
- 19
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
I need to get the full raw results of an API response.
In v1 it was possible via function `$response->toArray()`:
```php
$response = $request->execute();
$responseData = $response->toArray();
```
But in v2 this method is marked as protected in `lib/commercetools-base/src/Base/JsonObjectModel.php`:
```php
final protected function toArray(): array
```
So we can't get the raw results by this method.
**Describe the solution you'd like**
Is there any other way to get the raw response as an array, like in v1?
If not, could you please consider making this method public in v2, like in v1?
**Describe alternatives you've considered**
Alternatively, maybe it's good to provide another method to get raw results if you don't want to make the current `toArray` public for some reason?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.