Skip to content

PHP 8.4 support: Fix deprecation warnings for implicit nullable parameters #235

@clementmas

Description

@clementmas

The Pipedrive PHP client API generates multiple deprecation warnings when used with PHP 8.4 due to implicitly nullable parameters that should be explicitly marked as nullable.

Environment

  • PHP Version: 8.4
  • Pipedrive package version: 12.0.2
  • Pipedrive API Client versions: v1 and v2

Code example:

<?php
use Pipedrive\versions\v2\Api\PersonsApi;
use Pipedrive\versions\v2\Configuration;

$config = (new Configuration)
    ->setApiKey('x-api-token', 'your-api-token');

// This line triggers deprecation warnings
$client = new PersonsApi(config: $config);

Deprecation warnings:

Pipedrive\versions\v2\Api\PersonsApi::__construct(): Implicitly marking parameter $client as nullable is deprecated, the explicit nullable type must be used instead in /vendor/pipedrive/pipedrive/lib/versions/v2/Api/PersonsApi.php on line 85

Pipedrive\versions\v2\Model\PersonRequestBodyEmails::__construct(): Implicitly marking parameter $data as nullable is deprecated, the explicit nullable type must be used instead in vendor/pipedrive/pipedrive/lib/versions/v2/Model/PersonRequestBodyEmails.php on line 210.

All the constructors need to be updated to use explicit nullable type declarations.

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