brevo-php
brevo-php copied to clipboard
Refactor constructors to use nullable array type hinting
- Updated constructors in multiple model classes to accept a nullable array parameter.
- Changed the type hint from
array $data = nullto?array $data = nullfor better clarity and to allow null values explicitly.
Hello getbrevo people, it would be very nice to have these changes, even in a new 1.0.3 release, since those deprecation warnings can be very annoying.
Hope you will be able to merge it rapidly.
Hi,
What I see is, that brevo php lib must be compatible with php 5.6, so what is propose to add nullable (?) type is not possible unless php 7.1.
But maybe @tirgrig you can replace default null by an empty array, I think it could be worked.
public function __construct(array $data = [])
Hope I helped
