Skip to content

Paypal v6.7.1 + PS9.1.4 + php8.3+ #505

Description

@HartLarsson

Describe the bug and add screenshots

Many errors of deprecations appaera in error_log_php.

Expected behavior

Because PayPal 6.7.1 version is compatible with PS 9.1.x all scripts must be ok with php 8.3+

Patch for deprecations:

--- paypal/services/ToolKit.php	Wed Jun 24 11:13:23 2026
+++ paypal/services/ToolKit.php	Thu Jul 16 10:16:33 2026
@@ -88,7 +88,7 @@
         return false;
     }
 
-    public function displayPrice($price, $currency = null, $no_utf8 = false, \Context $context = null)
+    public function displayPrice($price, $currency = null, $no_utf8 = false, ?\Context $context = null)
     {
         if (version_compare(_PS_VERSION_, '1.7.7.0', '<')) {
             return call_user_func([\Tools::class, 'displayPrice'], $price, $currency, $no_utf8, $context);


--- paypal/services/WebhookService.php	Wed Jun 24 11:13:23 2026
+++ paypal/services/WebhookService.php	Thu Jul 16 10:14:18 2026
@@ -84,7 +84,7 @@
      *
      * @return \PaypalWebhook[]
      */
-    public function getPendingWebhooks(\PaypalOrder $paypalOrder = null, $delay = null)
+    public function getPendingWebhooks(?PaypalOrder $paypalOrder = null, $delay = null)
     {
         $webhooks = [];
         $query = (new \DbQuery())


--- paypal/paypal.php	Wed Jun 24 11:13:23 2026
+++ paypal/paypal.php	Thu Jul 16 10:20:18 2026
@@ -1632,7 +1632,7 @@
         $currency_special = null,
         $dont_touch_amount = false,
         $secure_key = false,
-        Shop $shop = null,
+        ?Shop $shop = null,
         $order_reference = null
     ) {
         if ($this->needConvert()) {

Steps to reproduce

  1. Install the module
  2. Check error_log_php for deprecation errors.

PrestaShop version(s) where the bug happened

9.1.4

PHP version(s) where the bug happened

8.3+

Activity

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

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