Deprecated: Return type of Klaviyo\Model\ProfileModel::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in xxxx/xxxxx/vendor/klaviyo/php-sdk/src/Model/ProfileModel.php on line 164
In order to reproduce :
namespace App\Client;
use Klaviyo\Klaviyo as KlaviyoSDK;
use Klaviyo\Model\ProfileModel as KlaviyoProfile;
class Klaviyo
{
public function __construct(
protected KlaviyoSDK $client
) {
}
public function create($args): void
{
$profile = new KlaviyoProfile($args);
/* @phpstan-ignore-next-line */
$this->client->publicAPI->identify($profile, true);
}
}
👋🏻 Hello,
I have a deprecation warning :
In order to reproduce :
Thanks 🙏🏼 /Sam