Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecation notice on nullable properties in method signatures #277

Open
1 task done
LaurentBrieu opened this issue Dec 18, 2024 · 1 comment
Open
1 task done

Comments

@LaurentBrieu
Copy link

Environment

  • Checkout SDK version: 3.2.7
  • Operating System and version: MacOS 14.2.1

Description

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

Checkout\Payments\PaymentsClient::capturePayment(): Implicitly marking parameter $captureRequest as nullable is deprecated, the explicit nullable type must be used instead
Checkout\Payments\PaymentsClient::refundPayment(): Implicitly marking parameter $refundRequest as nullable is deprecated, the explicit nullable type must be used instead
Checkout\Payments\PaymentsClient::voidPayment(): Implicitly marking parameter $voidRequest as nullable is deprecated, the explicit nullable type must be used instead
Checkout\Payments\PaymentsClient::incrementPaymentAuthorization(): Implicitly marking parameter $authorizationRequest as nullable is deprecated, the explicit nullable type must be used instead

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.

public function capturePayment($paymentId, CaptureRequest $captureRequest = null, ?string $idempotencyKey = null)
public function refundPayment($paymentId, RefundRequest $refundRequest = null, ?string $idempotencyKey = null)
public function voidPayment($paymentId, VoidRequest $voidRequest = null, ?string $idempotencyKey = null)
public function incrementPaymentAuthorization($paymentId, AuthorizationRequest $authorizationRequest = null, ?string $idempotencyKey = null)
  • I may be able to implement this feature
@LaurentBrieu
Copy link
Author

Any news regarding this issue ? Would it be possible to do a commit on my own ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant