-
Notifications
You must be signed in to change notification settings - Fork 42
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
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
riyadamr, jeanlucnguyen, Anatoliy-Gerasimov and BafS
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request