Skip to content

Remove deprecation notice on nullable properties in method signatures #57

@LaurentBrieu

Description

@LaurentBrieu

Description

Update methods signatures to avoid deprecation notices when using PHP 8.4 :

Brevo\Client\Api\EventsApi::__construct(): Implicitly marking parameter $client as nullable is deprecated, the explicit nullable type must be used instead in lib/Api/EventsApi.php on line 72
Brevo\Client\Api\EventsApi::__construct(): Implicitly marking parameter $config as nullable is deprecated, the explicit nullable type must be used instead in lib/Api/EventsApi.php on line 72
Brevo\Client\Api\EventsApi::__construct(): Implicitly marking parameter $selector as nullable is deprecated, the explicit nullable type must be used instead in lib/Api/EventsApi.php on line 72

Proposed Solution

Generally speaking, across the whole project, it will be cool to set the expected types in method signatures, so that we don't have that kind of deprecations in the future.

Regarding the ones i've mentionned above, here's a quick fix in lib/Api/EventsApi.php.

public function __construct(
        ?ClientInterface $client = null,
        ?Configuration $config = null,
        ?HeaderSelector $selector = null
) {

Disclaimer

This fix will not be suitable for users that uses PHP < 7.1.

When does the support of PHP 5.6/7.0 will stop ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions