Closed roberthenniger closed 4 years ago
Problem is that wrapper expects an label created to convert an parcel into an array. Sometimes you wanna split these two processes and this won't work with the current version.
Changing
jouwweb/sendcloud/src/Model/Parcel.php:299
to
'labels' => array_map(function (int $format): ?string {
solves the issue
Thanks for the report and a way of fixing the issue. Sorry for not getting back to you sooner. I didn't have this repository watched yet. I'll fix it and follow up with a minor version bump immediately after that.
When you create a parcel and call the toArray() function on the resulting parcel it fails with the error:
Return value of JouwWeb\SendCloud\Model\Parcel::JouwWeb\SendCloud\Model{closure}() must be of the type string, null returned