slince / shopify-api-php

:rocket: Shopify API Client for PHP
MIT License
128 stars 47 forks source link

Need accept null in return types #100

Closed sahartak closed 3 years ago

sahartak commented 3 years ago

return types generating error for null values, for example in class Slince\Shopify\Model\Orders\Order public function getFulfillmentStatus(): string { return $this->fulfillmentStatus; }

need change return types to public function getFulfillmentStatus(): ?string {}

slince commented 3 years ago

hello, can you submit a pr for this?

dashko commented 3 years ago

This is an issue for us as well.

happyclicker commented 3 years ago

This. needs to be done pretty much everywhere - Shopify returns a null when it feels like it instead of a "". Address, Order, Customer, everything.

slince commented 3 years ago

fixed in 3.0.2

dashko commented 3 years ago

This was not fixed in 3.0.2 @slince :

Return value of Slince\Shopify\Model\Orders\Order::getShippingAddress() must be an instance of Slince\Shopify\Model\Orders\Common\OrderAddress, null returned

slince commented 2 years ago

@dashko fixed