CyberSource / CyberSource/cybersource-rest-client-php

Implicitly marking parameters as nullable is deprecated, the explicit nullable type must be used instead

Open
#213 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
41
Forks
77
Avg merge
26m
Merged PRs (30d)
1

Description

Since PHP 8.4, it is now deprecated to not mark parameters as explicitly nullable: https://wiki.php.net/rfc/deprecate-implicitly-nullable-types

There are a number of places in this library that need updating to fix these deprecations. For example, this:

https://github.com/CyberSource/cybersource-rest-client-php/blob/39d1fbd335c3a401cd9f546b7a3f63b931e60694/lib/ApiClient.php#L105

Needs to be updated to:

public function __construct(?\CyberSource\Configuration $config = null, ?\CyberSource\Authentication\Core\MerchantConfiguration $merchantConfig = null)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the constructor in lib/ApiClient.php at the linked location, then search the library for parameters with a null default and no explicit nullable type. Update the affected declarations consistently and verify that the PHP 8.4 deprecation no longer occurs across the library.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.