Plugin Directory

Changeset 3368573


Ignore:
Timestamp:
09/26/2025 03:37:30 PM (6 months ago)
Author:
bruceanetwork
Message:

1.3.3 - 2025-09-26

  • Composer Version Issue: This is a fix for an issue identified in automated testing, as it corrects a problem with the Composer version to ensure compatibility.
  • WooCommerce Active Check: The addition of programmatic checks to verify WooCommerce is active and admin-side notifications are new features or functionalities introduced to the plugin.
  • Logging Configuration: Disabling logging by default modifies an existing behavior to align with data privacy best practices.
Location:
ngenius/trunk
Files:
1 added
58 edited

Legend:

Unmodified
Added
Removed
  • ngenius/trunk/composer.json

    r3343857 r3368573  
    33  "type": "composer-plugin",
    44  "require": {
    5     "ngenius/ngenius-common": "v1.3.0"
     5    "ngenius/ngenius-common": "v1.3.0",
     6    "symfony/deprecation-contracts": "^2.5"
     7  },
     8  "config": {
     9    "platform": {
     10      "php": "8.0.30"
     11    }
    612  }
    713}
  • ngenius/trunk/composer.lock

    r3343859 r3368573  
    55        "This file is @generated automatically"
    66    ],
    7     "content-hash": "ac2cc52249f76cf874e8d4d133e632cc",
     7    "content-hash": "39c224ceee6be1a1ad2a09fa811edefb",
    88    "packages": [
    99        {
    1010            "name": "guzzlehttp/guzzle",
    11             "version": "7.9.2",
     11            "version": "7.10.0",
    1212            "source": {
    1313                "type": "git",
    1414                "url": "https://github.com/guzzle/guzzle.git",
    15                 "reference": "d281ed313b989f213357e3be1a179f02196ac99b"
    16             },
    17             "dist": {
    18                 "type": "zip",
    19                 "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b",
    20                 "reference": "d281ed313b989f213357e3be1a179f02196ac99b",
     15                "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4"
     16            },
     17            "dist": {
     18                "type": "zip",
     19                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b51ac707cfa420b7bfd4e4d5e510ba8008e822b4",
     20                "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4",
    2121                "shasum": ""
    2222            },
    2323            "require": {
    2424                "ext-json": "*",
    25                 "guzzlehttp/promises": "^1.5.3 || ^2.0.3",
    26                 "guzzlehttp/psr7": "^2.7.0",
     25                "guzzlehttp/promises": "^2.3",
     26                "guzzlehttp/psr7": "^2.8",
    2727                "php": "^7.2.5 || ^8.0",
    2828                "psr/http-client": "^1.0",
     
    115115            "support": {
    116116                "issues": "https://github.com/guzzle/guzzle/issues",
    117                 "source": "https://github.com/guzzle/guzzle/tree/7.9.2"
     117                "source": "https://github.com/guzzle/guzzle/tree/7.10.0"
    118118            },
    119119            "funding": [
     
    131131                }
    132132            ],
    133             "time": "2024-07-24T11:22:20+00:00"
     133            "time": "2025-08-23T22:36:01+00:00"
    134134        },
    135135        {
    136136            "name": "guzzlehttp/promises",
    137             "version": "2.0.4",
     137            "version": "2.3.0",
    138138            "source": {
    139139                "type": "git",
    140140                "url": "https://github.com/guzzle/promises.git",
    141                 "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455"
    142             },
    143             "dist": {
    144                 "type": "zip",
    145                 "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
    146                 "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
     141                "reference": "481557b130ef3790cf82b713667b43030dc9c957"
     142            },
     143            "dist": {
     144                "type": "zip",
     145                "url": "https://api.github.com/repos/guzzle/promises/zipball/481557b130ef3790cf82b713667b43030dc9c957",
     146                "reference": "481557b130ef3790cf82b713667b43030dc9c957",
    147147                "shasum": ""
    148148            },
     
    152152            "require-dev": {
    153153                "bamarni/composer-bin-plugin": "^1.8.2",
    154                 "phpunit/phpunit": "^8.5.39 || ^9.6.20"
     154                "phpunit/phpunit": "^8.5.44 || ^9.6.25"
    155155            },
    156156            "type": "library",
     
    198198            "support": {
    199199                "issues": "https://github.com/guzzle/promises/issues",
    200                 "source": "https://github.com/guzzle/promises/tree/2.0.4"
     200                "source": "https://github.com/guzzle/promises/tree/2.3.0"
    201201            },
    202202            "funding": [
     
    214214                }
    215215            ],
    216             "time": "2024-10-17T10:06:22+00:00"
     216            "time": "2025-08-22T14:34:08+00:00"
    217217        },
    218218        {
    219219            "name": "guzzlehttp/psr7",
    220             "version": "2.7.0",
     220            "version": "2.8.0",
    221221            "source": {
    222222                "type": "git",
    223223                "url": "https://github.com/guzzle/psr7.git",
    224                 "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201"
    225             },
    226             "dist": {
    227                 "type": "zip",
    228                 "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
    229                 "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
     224                "reference": "21dc724a0583619cd1652f673303492272778051"
     225            },
     226            "dist": {
     227                "type": "zip",
     228                "url": "https://api.github.com/repos/guzzle/psr7/zipball/21dc724a0583619cd1652f673303492272778051",
     229                "reference": "21dc724a0583619cd1652f673303492272778051",
    230230                "shasum": ""
    231231            },
     
    243243                "bamarni/composer-bin-plugin": "^1.8.2",
    244244                "http-interop/http-factory-tests": "0.9.0",
    245                 "phpunit/phpunit": "^8.5.39 || ^9.6.20"
     245                "phpunit/phpunit": "^8.5.44 || ^9.6.25"
    246246            },
    247247            "suggest": {
     
    314314            "support": {
    315315                "issues": "https://github.com/guzzle/psr7/issues",
    316                 "source": "https://github.com/guzzle/psr7/tree/2.7.0"
     316                "source": "https://github.com/guzzle/psr7/tree/2.8.0"
    317317            },
    318318            "funding": [
     
    330330                }
    331331            ],
    332             "time": "2024-07-18T11:15:46+00:00"
     332            "time": "2025-08-23T21:21:41+00:00"
    333333        },
    334334        {
     
    629629        {
    630630            "name": "symfony/deprecation-contracts",
    631             "version": "v3.5.1",
     631            "version": "v2.5.4",
    632632            "source": {
    633633                "type": "git",
    634634                "url": "https://github.com/symfony/deprecation-contracts.git",
    635                 "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6"
    636             },
    637             "dist": {
    638                 "type": "zip",
    639                 "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
    640                 "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
    641                 "shasum": ""
    642             },
    643             "require": {
    644                 "php": ">=8.1"
     635                "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918"
     636            },
     637            "dist": {
     638                "type": "zip",
     639                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/605389f2a7e5625f273b53960dc46aeaf9c62918",
     640                "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918",
     641                "shasum": ""
     642            },
     643            "require": {
     644                "php": ">=7.1"
    645645            },
    646646            "type": "library",
     
    651651                },
    652652                "branch-alias": {
    653                     "dev-main": "3.5-dev"
     653                    "dev-main": "2.5-dev"
    654654                }
    655655            },
     
    676676            "homepage": "https://symfony.com",
    677677            "support": {
    678                 "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1"
     678                "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.4"
    679679            },
    680680            "funding": [
     
    692692                }
    693693            ],
    694             "time": "2024-09-25T14:20:29+00:00"
     694            "time": "2024-09-25T14:11:13+00:00"
    695695        }
    696696    ],
     
    703703    "platform": [],
    704704    "platform-dev": [],
     705    "platform-overrides": {
     706        "php": "8.0.30"
     707    },
    705708    "plugin-api-version": "2.2.0"
    706709}
  • ngenius/trunk/gateway/class-network-international-ngenius-abstract.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3add_action('plugins_loaded', function() {
     4    if (!class_exists('WooCommerce')) {
     5        return;
     6    }
     7
     8    if (!defined('ABSPATH')) {
     9        exit;
     10    }
     11});
    612
    713$f = dirname(__DIR__, 1);
  • ngenius/trunk/gateway/class-network-international-ngenius-blocks-support.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3use Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType;
    64
    7 use Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType;
     5add_action('plugins_loaded', function() {
     6    if (!class_exists('WooCommerce')) {
     7        return;
     8    }
     9
     10    if (!defined('ABSPATH')) {
     11        exit;
     12    }
     13});
    814
    915/**
     
    5460        $payment_gateways_class = WC()->payment_gateways();
    5561        $payment_gateways       = $payment_gateways_class->payment_gateways();
     62
     63        if (!isset($payment_gateways['ngenius']) || !$payment_gateways['ngenius']) {
     64            return false;
     65        }
    5666
    5767        return $payment_gateways['ngenius']->is_available();
     
    116126        $payment_gateways = WC()->payment_gateways->payment_gateways();
    117127
     128        if (!isset($payment_gateways['ngenius']) || !$payment_gateways['ngenius']) {
     129            return [];
     130        }
     131
    118132        return $payment_gateways['ngenius']->supports;
    119133    }
  • ngenius/trunk/gateway/class-network-international-ngenius-gateway-payment.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
    6 
    7 $f = dirname(__DIR__, 1);
    8 require_once "$f/vendor/autoload.php";
     3add_action('plugins_loaded', function() {
     4    if (!class_exists('WooCommerce')) {
     5        return;
     6    }
     7
     8    if (!defined('ABSPATH')) {
     9        exit;
     10    }
     11});
    912
    1013use Automattic\WooCommerce\Admin\Overrides\Order;
     
    1215use Ngenius\NgeniusCommon\NgeniusOrderStatuses;
    1316use Ngenius\NgeniusCommon\Processor\ApiProcessor;
     17
     18$f = dirname(__DIR__, 1);
     19require_once "$f/vendor/autoload.php";
    1420
    1521/**
  • ngenius/trunk/gateway/class-network-international-ngenius-gateway.php

    r3346214 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
    6 
    7 $f = dirname(__DIR__, 1);
    8 require_once "$f/vendor/autoload.php";
    9 
    10 require_once dirname(__FILE__) . '/class-network-international-ngenius-abstract.php';
     3add_action('plugins_loaded', function() {
     4    if (!class_exists('WooCommerce')) {
     5        return;
     6    }
     7
     8    if (!defined('ABSPATH')) {
     9        exit;
     10    }
     11});
    1112
    1213use Ngenius\NgeniusCommon\Formatter\ValueFormatter;
    1314use Ngenius\NgeniusCommon\NgeniusHTTPTransfer;
    1415use Ngenius\NgeniusCommon\NgeniusOrderStatuses;
     16
     17
     18$f = dirname(__DIR__, 1);
     19require_once "$f/vendor/autoload.php";
     20
     21require_once dirname(__FILE__) . '/class-network-international-ngenius-abstract.php';
    1522
    1623/**
  • ngenius/trunk/gateway/class-network-international-ngenius-settings.php

    r3363610 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3add_action('plugins_loaded', function() {
     4    if (!defined('ABSPATH')) {
     5        exit;
     6    }
     7
     8    if (!class_exists('WooCommerce')) {
     9        return;
     10    }
     11});
    612
    713/**
     
    185191                    '<code>' . WC_Log_Handler_File::get_log_file_path('ngenius') . '</code>'
    186192                ),
    187                 'default'     => 'yes',
     193                'default'     => 'no',
    188194            ),
    189195            'debugMode'                     => array(
  • ngenius/trunk/gateway/config/class-network-international-ngenius-gateway-config.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3add_action('plugins_loaded', function() {
     4    if (!class_exists('WooCommerce')) {
     5        return;
     6    }
     7
     8    if (!defined('ABSPATH')) {
     9        exit;
     10    }
     11});
    612
    713/**
  • ngenius/trunk/gateway/http/class-network-international-ngenius-gateway-http-abstract.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3add_action('plugins_loaded', function() {
     4    if (!class_exists('WooCommerce')) {
     5        return;
     6    }
    67
    7 $f = dirname(__DIR__, 2);
    8 require_once "$f/vendor/autoload.php";
     8    if (!defined('ABSPATH')) {
     9        exit;
     10    }
     11});
    912
    1013use \Ngenius\NgeniusCommon\NgeniusHTTPCommon;
    1114use \Ngenius\NgeniusCommon\NgeniusHTTPTransfer;
    1215use Ngenius\NgeniusCommon\NgeniusOrderStatuses;
     16
     17$f = dirname(__DIR__, 2);
     18require_once "$f/vendor/autoload.php";
    1319
    1420/**
  • ngenius/trunk/gateway/http/class-network-international-ngenius-gateway-http-authorize.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3add_action('plugins_loaded', function() {
     4    if (!class_exists('WooCommerce')) {
     5        return;
     6    }
     7
     8    if (!defined('ABSPATH')) {
     9        exit;
     10    }
     11});
    612
    713/**
  • ngenius/trunk/gateway/http/class-network-international-ngenius-gateway-http-capture.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3use Ngenius\NgeniusCommon\Formatter\ValueFormatter;
     4
     5add_action('plugins_loaded', function() {
     6    if (!class_exists('WooCommerce')) {
     7        return;
     8    }
     9
     10    if (!defined('ABSPATH')) {
     11        exit;
     12    }
     13});
    614
    715/**
    816 * NetworkInternationalNgeniusGatewayHttpCapture class.
    917 */
    10 
    11 use Ngenius\NgeniusCommon\Formatter\ValueFormatter;
    1218
    1319class NetworkInternationalNgeniusGatewayHttpCapture extends NetworkInternationalNgeniusGatewayHttpAbstract
  • ngenius/trunk/gateway/http/class-network-international-ngenius-gateway-http-fetch.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3// Check WooCommerce availability in plugins_loaded hook as recommended
     4add_action('plugins_loaded', function() {
     5    if (!class_exists('WooCommerce')) {
     6        return;
     7    }
     8
     9    if (!defined('ABSPATH')) {
     10        exit;
     11    }
     12});
    613
    714/**
  • ngenius/trunk/gateway/http/class-network-international-ngenius-gateway-http-purchase.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3add_action('plugins_loaded', function() {
     4    if (!class_exists('WooCommerce')) {
     5        return;
     6    }
     7
     8    if (!defined('ABSPATH')) {
     9        exit;
     10    }
     11});
    612
    713/**
    8  * NetworkInternationalNgeniusGatewayHttpSale class.
     14 * NetworkInternationalNgeniusGatewayHttpPurchase class.
    915 */
    1016class NetworkInternationalNgeniusGatewayHttpPurchase extends NetworkInternationalNgeniusGatewayHttpAbstract
  • ngenius/trunk/gateway/http/class-network-international-ngenius-gateway-http-refund.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3use Ngenius\NgeniusCommon\Formatter\ValueFormatter;
    64
    7 use Ngenius\NgeniusCommon\Formatter\ValueFormatter;
     5add_action('plugins_loaded', function() {
     6    if (!class_exists('WooCommerce')) {
     7        return;
     8    }
     9
     10    if (!defined('ABSPATH')) {
     11        exit;
     12    }
     13});
    814
    915/**
  • ngenius/trunk/gateway/http/class-network-international-ngenius-gateway-http-sale.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3add_action('plugins_loaded', function() {
     4    if (!class_exists('WooCommerce')) {
     5        return;
     6    }
     7
     8    if (!defined('ABSPATH')) {
     9        exit;
     10    }
     11});
    612
    713/**
  • ngenius/trunk/gateway/http/class-network-international-ngenius-gateway-http-transfer.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3add_action('plugins_loaded', function() {
     4    if (!class_exists('WooCommerce')) {
     5        return;
     6    }
    67
    7 /**
    8  * NetworkInternationalNgeniusGatewayHttpTransfer class.
    9  */
    10 class NetworkInternationalNgeniusGatewayHttpTransfer
    11 {
    12     /**
    13      * @var array
    14      */
    15     private $headers = array();
     8    if (!defined('ABSPATH')) {
     9        exit;
     10    }
    1611
    17     /**
    18      * @var array
    19      */
    20     private $body = array();
     12    if (!class_exists('NetworkInternationalNgeniusGatewayHttpAbstract')) {
     13        require_once __DIR__ . '/class-network-international-ngenius-gateway-http-abstract.php';
     14    }
    2115
    22     /**
    23      * @var api curl uri
    24      */
    25     private $uri = '';
     16    if (!class_exists('NetworkInternationalNgeniusGatewayHttpTransfer')) {
     17        /**
     18         * NetworkInternationalNgeniusGatewayHttpTransfer class.
     19         */
     20        class NetworkInternationalNgeniusGatewayHttpTransfer extends NetworkInternationalNgeniusGatewayHttpAbstract
     21        {
     22            /**
     23             * @var array
     24             */
     25            private $headers = array();
    2626
    27     /**
    28      * @var method
    29      */
    30     private $method;
     27            /**
     28             * @var array
     29             */
     30            private $body = array();
    3131
    32     /**
    33      * Builds gateway transfer object
    34      *
    35      * @param array $request
    36      *
    37      * @return TransferInterface
    38      */
    39     public function create(array $request)
    40     {
    41         if ($request['token'] && is_array($request['request'])) {
    42             return $this->set_body($request['request']['data'])
    43                         ->set_method($request['request']['method'])
    44                         ->set_headers(
    45                             array(
    46                                 'Authorization' => 'Bearer ' . $request['token'],
    47                                 'Content-Type'  => 'application/vnd.ni-payment.v2+json',
    48                                 'Accept'        => 'application/vnd.ni-payment.v2+json',
    49                             )
    50                         )
    51                         ->set_uri($request['request']['uri']);
     32            /**
     33             * @var api curl uri
     34             */
     35            private $uri = '';
     36
     37            /**
     38             * @var method
     39             */
     40            private $method;
     41
     42            /**
     43             * Processing of API request body
     44             *
     45             * @param array $data
     46             *
     47             * @return string
     48             */
     49            protected function pre_process(array $data): string
     50            {
     51                return wp_json_encode($data);
     52            }
     53
     54            /**
     55             * Builds gateway transfer object
     56             *
     57             * @param array $request
     58             *
     59             * @return TransferInterface
     60             */
     61            public function create(array $request)
     62            {
     63                if ($request['token'] && is_array($request['request'])) {
     64                    return $this->set_body($request['request']['data'])
     65                                ->set_method($request['request']['method'])
     66                                ->set_headers(
     67                                    array(
     68                                        'Authorization' => 'Bearer ' . $request['token'],
     69                                        'Content-Type'  => 'application/vnd.ni-payment.v2+json',
     70                                        'Accept'        => 'application/vnd.ni-payment.v2+json',
     71                                    )
     72                                )
     73                                ->set_uri($request['request']['uri']);
     74                }
     75            }
     76
     77            /**
     78             * Set header for transfer object
     79             *
     80             * @param array $headers
     81             *
     82             * @return Transferfactory
     83             */
     84            public function set_headers(array $headers)
     85            {
     86                $this->headers = $headers;
     87
     88                return $this;
     89            }
     90
     91            /**
     92             * Set body for transfer object
     93             *
     94             * @param array $body
     95             *
     96             * @return Transferfactory
     97             */
     98            public function set_body($body)
     99            {
     100                $this->body = $body;
     101
     102                return $this;
     103            }
     104
     105            /**
     106             * Set method for transfer object
     107             *
     108             * @param array $method
     109             *
     110             * @return Transferfactory
     111             */
     112            public function set_method($method)
     113            {
     114                $this->method = $method;
     115
     116                return $this;
     117            }
     118
     119            /**
     120             * Set uri for transfer object
     121             *
     122             * @param array $uri
     123             *
     124             * @return Transferfactory
     125             */
     126            public function set_uri($uri)
     127            {
     128                $this->uri = $uri;
     129
     130                return $this;
     131            }
     132
     133            /**
     134             * Retrieve method from transfer object
     135             *
     136             * @return string
     137             */
     138            public function get_method()
     139            {
     140                return (string)$this->method;
     141            }
     142
     143            /**
     144             * Retrieve header from transfer object
     145             *
     146             * @return Transferfactory
     147             */
     148            public function get_headers()
     149            {
     150                return $this->headers;
     151            }
     152
     153            /**
     154             * Retrieve body from transfer object
     155             *
     156             * @return Transferfactory
     157             */
     158            public function get_body()
     159            {
     160                return $this->body;
     161            }
     162
     163            /**
     164             * Retrieve uri from transfer object
     165             *
     166             * @return string
     167             */
     168            public function get_uri()
     169            {
     170                return (string)$this->uri;
     171            }
    52172        }
    53173    }
    54 
    55     /**
    56      * Set header for transfer object
    57      *
    58      * @param array $headers
    59      *
    60      * @return Transferfactory
    61      */
    62     public function set_headers(array $headers)
    63     {
    64         $this->headers = $headers;
    65 
    66         return $this;
    67     }
    68 
    69     /**
    70      * Set body for transfer object
    71      *
    72      * @param array $body
    73      *
    74      * @return Transferfactory
    75      */
    76     public function set_body($body)
    77     {
    78         $this->body = $body;
    79 
    80         return $this;
    81     }
    82 
    83     /**
    84      * Set method for transfer object
    85      *
    86      * @param array $method
    87      *
    88      * @return Transferfactory
    89      */
    90     public function set_method($method)
    91     {
    92         $this->method = $method;
    93 
    94         return $this;
    95     }
    96 
    97     /**
    98      * Set uri for transfer object
    99      *
    100      * @param array $uri
    101      *
    102      * @return Transferfactory
    103      */
    104     public function set_uri($uri)
    105     {
    106         $this->uri = $uri;
    107 
    108         return $this;
    109     }
    110 
    111     /**
    112      * Retrieve method from transfer object
    113      *
    114      * @return string
    115      */
    116     public function get_method()
    117     {
    118         return (string)$this->method;
    119     }
    120 
    121     /**
    122      * Retrieve header from transfer object
    123      *
    124      * @return Transferfactory
    125      */
    126     public function get_headers()
    127     {
    128         return $this->headers;
    129     }
    130 
    131     /**
    132      * Retrieve body from transfer object
    133      *
    134      * @return Transferfactory
    135      */
    136     public function get_body()
    137     {
    138         return $this->body;
    139     }
    140 
    141     /**
    142      * Retrieve uri from transfer object
    143      *
    144      * @return string
    145      */
    146     public function get_uri()
    147     {
    148         return (string)$this->uri;
    149     }
    150 }
     174});
  • ngenius/trunk/gateway/http/class-network-international-ngenius-gateway-http-void.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3add_action('plugins_loaded', function() {
     4    if (!class_exists('WooCommerce')) {
     5        return;
     6    }
     7
     8    if (!defined('ABSPATH')) {
     9        exit;
     10    }
     11});
    612
    713/**
  • ngenius/trunk/gateway/request/class-network-international-ngenius-gateway-request-abstract.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3add_action('plugins_loaded', function() {
     4    if (!defined('ABSPATH')) {
     5        exit;
     6    }
     7
     8    if (!class_exists('WooCommerce')) {
     9        return;
     10    }
     11});
    612
    713/**
  • ngenius/trunk/gateway/request/class-network-international-ngenius-gateway-request-authorize.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3use Ngenius\NgeniusCommon\Formatter\ValueFormatter;
    64
    75require_once 'class-network-international-ngenius-gateway-request-abstract.php';
    86
    9 use Ngenius\NgeniusCommon\Formatter\ValueFormatter;
     7add_action('plugins_loaded', function() {
     8    if (!defined('ABSPATH')) {
     9        exit;
     10    }
     11
     12    if (!class_exists('WooCommerce')) {
     13        return;
     14    }
     15});
    1016
    1117/**
  • ngenius/trunk/gateway/request/class-network-international-ngenius-gateway-request-capture.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3use Ngenius\NgeniusCommon\Formatter\ValueFormatter;
    64
    7 use Ngenius\NgeniusCommon\Formatter\ValueFormatter;
     5add_action('plugins_loaded', function() {
     6    if (!defined('ABSPATH')) {
     7        exit;
     8    }
     9
     10    if (!class_exists('WooCommerce')) {
     11        return;
     12    }
     13});
    814
    915/**
  • ngenius/trunk/gateway/request/class-network-international-ngenius-gateway-request-purchase.php

    r3343860 r3368573  
    11<?php
    2 
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
    62
    73use Ngenius\NgeniusCommon\Formatter\ValueFormatter;
    84
    95require_once 'class-network-international-ngenius-gateway-request-abstract.php';
     6
     7add_action('plugins_loaded', function() {
     8    if (!defined('ABSPATH')) {
     9        exit;
     10    }
     11
     12    if (!class_exists('WooCommerce')) {
     13        return;
     14    }
     15});
    1016
    1117/**
  • ngenius/trunk/gateway/request/class-network-international-ngenius-gateway-request-refund.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3use Ngenius\NgeniusCommon\Formatter\ValueFormatter;
    64
    7 use Ngenius\NgeniusCommon\Formatter\ValueFormatter;
     5add_action('plugins_loaded', function() {
     6    if (!defined('ABSPATH')) {
     7        exit;
     8    }
     9
     10    if (!class_exists('WooCommerce')) {
     11        return;
     12    }
     13});
    814
    915/**
  • ngenius/trunk/gateway/request/class-network-international-ngenius-gateway-request-sale.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3use Ngenius\NgeniusCommon\Formatter\ValueFormatter;
    64
    75require_once 'class-network-international-ngenius-gateway-request-abstract.php';
    86
    9 use Ngenius\NgeniusCommon\Formatter\ValueFormatter;
     7add_action('plugins_loaded', function() {
     8    if (!defined('ABSPATH')) {
     9        exit;
     10    }
     11
     12    if (!class_exists('WooCommerce')) {
     13        return;
     14    }
     15});
    1016
    1117/**
  • ngenius/trunk/gateway/request/class-network-international-ngenius-gateway-request-token.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3use \Ngenius\NgeniusCommon\NgeniusHTTPCommon;
     4use \Ngenius\NgeniusCommon\NgeniusHTTPTransfer;
    65
    76$f = dirname(__DIR__, 2);
    87require_once "$f/vendor/autoload.php";
    98
    10 use \Ngenius\NgeniusCommon\NgeniusHTTPCommon;
    11 use \Ngenius\NgeniusCommon\NgeniusHTTPTransfer;
     9add_action('plugins_loaded', function() {
     10    if (!defined('ABSPATH')) {
     11        exit;
     12    }
    1213
     14    if (!class_exists('WooCommerce')) {
     15        return;
     16    }
     17});
    1318
    1419/**
  • ngenius/trunk/gateway/request/class-network-international-ngenius-gateway-request-void.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
     3add_action('plugins_loaded', function() {
     4    if (!defined('ABSPATH')) {
     5        exit;
     6    }
     7
     8    if (!class_exists('WooCommerce')) {
     9        return;
     10    }
     11});
     12
     13if (!class_exists('WooCommerce')) {
     14    return;
    515}
    616
  • ngenius/trunk/gateway/validator/class-network-international-ngenius-gateway-validator-capture.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3add_action('plugins_loaded', function() {
     4    if (!class_exists('WooCommerce')) {
     5        return;
     6    }
     7
     8    if (!defined('ABSPATH')) {
     9        exit;
     10    }
     11});
    612
    713/**
  • ngenius/trunk/gateway/validator/class-network-international-ngenius-gateway-validator-refund.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3add_action('plugins_loaded', function() {
     4    if (!class_exists('WooCommerce')) {
     5        return;
     6    }
     7
     8    if (!defined('ABSPATH')) {
     9        exit;
     10    }
     11});
    612
    713/**
  • ngenius/trunk/gateway/validator/class-network-international-ngenius-gateway-validator-response.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3add_action('plugins_loaded', function() {
     4    if (!class_exists('WooCommerce')) {
     5        return;
     6    }
     7
     8    if (!defined('ABSPATH')) {
     9        exit;
     10    }
     11});
    612
    713/**
  • ngenius/trunk/gateway/validator/class-network-international-ngenius-gateway-validator-void.php

    r3343860 r3368573  
    11<?php
    22
    3 if (!defined('ABSPATH')) {
    4     exit;
    5 }
     3add_action('plugins_loaded', function() {
     4    if (!class_exists('WooCommerce')) {
     5        return;
     6    }
     7
     8    if (!defined('ABSPATH')) {
     9        exit;
     10    }
     11});
    612
    713/**
  • ngenius/trunk/ngenius.php

    r3363610 r3368573  
    66 * Author: Network International
    77 * Author URI: https://www.network.ae/en
    8  * Version: 1.3.2
     8 * Version: 1.3.3
    99 * Requires at least: 6.0
    1010 * Requires PHP: 8.0
     
    1212 * WC tested up to: 10.1.2
    1313 * WC requires at least: 6.0
     14 * Requires Plugins: woocommerce
    1415 *
    1516 * Developer: App Inlet (Pty) Ltd
     
    2627 */
    2728
    28 if (!defined('ABSPATH')) {
    29     exit;
    30 }
     29add_action('plugins_loaded', function() {
     30    if (!class_exists('WooCommerce')) {
     31        return;
     32    }
     33
     34    if (!defined('ABSPATH')) {
     35        exit;
     36    }
     37});
    3138
    3239if (version_compare(phpversion(), '8.0', '<')) {
     
    4047use Ngenius\NgeniusCommon\NgeniusOrderStatuses;
    4148
    42 define('NETWORK_INTERNATIONAL_NGENIUS_VERSION', '1.3.2'); // WRCS: DEFINED_VERSION.
     49define('NETWORK_INTERNATIONAL_NGENIUS_VERSION', '1.3.3'); // WRCS: DEFINED_VERSION.
    4350define(
    4451    'NETWORK_INTERNATIONAL_NGENIUS_URL',
  • ngenius/trunk/readme.txt

    r3363610 r3368573  
    55Tested up to: 6.8
    66Requires PHP: 8.0
    7 Stable tag: 1.3.2
     7Stable tag: 1.3.3
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    2323
    2424== Changelog ==
     25= 1.3.3 - 2025-09-26 =
     26 * Composer Version Issue: This is a fix for an issue identified in automated testing, as it corrects a problem with the Composer version to ensure compatibility.
     27 * WooCommerce Active Check: The addition of programmatic checks to verify WooCommerce is active and admin-side notifications are new features or functionalities introduced to the plugin.
     28 * Logging Configuration: Disabling logging by default modifies an existing behavior to align with data privacy best practices.
    2529= 1.3.2 - 2025-09-18 =
    2630 * Onboarding Link in Plugin Interface: Added an accessible link within the WooCommerce plugin interface that redirects merchants to the onboarding site for e-commerce payment solutions. The link is prominently placed in the plugin's settings panel, ensuring easy access for merchants to initiate the onboarding process.
  • ngenius/trunk/vendor/composer/installed.json

    r3343865 r3368573  
    33        {
    44            "name": "guzzlehttp/guzzle",
    5             "version": "7.9.2",
    6             "version_normalized": "7.9.2.0",
     5            "version": "7.10.0",
     6            "version_normalized": "7.10.0.0",
    77            "source": {
    88                "type": "git",
    99                "url": "https://github.com/guzzle/guzzle.git",
    10                 "reference": "d281ed313b989f213357e3be1a179f02196ac99b"
    11             },
    12             "dist": {
    13                 "type": "zip",
    14                 "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b",
    15                 "reference": "d281ed313b989f213357e3be1a179f02196ac99b",
     10                "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4"
     11            },
     12            "dist": {
     13                "type": "zip",
     14                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b51ac707cfa420b7bfd4e4d5e510ba8008e822b4",
     15                "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4",
    1616                "shasum": ""
    1717            },
    1818            "require": {
    1919                "ext-json": "*",
    20                 "guzzlehttp/promises": "^1.5.3 || ^2.0.3",
    21                 "guzzlehttp/psr7": "^2.7.0",
     20                "guzzlehttp/promises": "^2.3",
     21                "guzzlehttp/psr7": "^2.8",
    2222                "php": "^7.2.5 || ^8.0",
    2323                "psr/http-client": "^1.0",
     
    4040                "psr/log": "Required for using the Log middleware"
    4141            },
    42             "time": "2024-07-24T11:22:20+00:00",
     42            "time": "2025-08-23T22:36:01+00:00",
    4343            "type": "library",
    4444            "extra": {
     
    112112            "support": {
    113113                "issues": "https://github.com/guzzle/guzzle/issues",
    114                 "source": "https://github.com/guzzle/guzzle/tree/7.9.2"
     114                "source": "https://github.com/guzzle/guzzle/tree/7.10.0"
    115115            },
    116116            "funding": [
     
    132132        {
    133133            "name": "guzzlehttp/promises",
    134             "version": "2.0.4",
    135             "version_normalized": "2.0.4.0",
     134            "version": "2.3.0",
     135            "version_normalized": "2.3.0.0",
    136136            "source": {
    137137                "type": "git",
    138138                "url": "https://github.com/guzzle/promises.git",
    139                 "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455"
    140             },
    141             "dist": {
    142                 "type": "zip",
    143                 "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
    144                 "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
     139                "reference": "481557b130ef3790cf82b713667b43030dc9c957"
     140            },
     141            "dist": {
     142                "type": "zip",
     143                "url": "https://api.github.com/repos/guzzle/promises/zipball/481557b130ef3790cf82b713667b43030dc9c957",
     144                "reference": "481557b130ef3790cf82b713667b43030dc9c957",
    145145                "shasum": ""
    146146            },
     
    150150            "require-dev": {
    151151                "bamarni/composer-bin-plugin": "^1.8.2",
    152                 "phpunit/phpunit": "^8.5.39 || ^9.6.20"
    153             },
    154             "time": "2024-10-17T10:06:22+00:00",
     152                "phpunit/phpunit": "^8.5.44 || ^9.6.25"
     153            },
     154            "time": "2025-08-22T14:34:08+00:00",
    155155            "type": "library",
    156156            "extra": {
     
    198198            "support": {
    199199                "issues": "https://github.com/guzzle/promises/issues",
    200                 "source": "https://github.com/guzzle/promises/tree/2.0.4"
     200                "source": "https://github.com/guzzle/promises/tree/2.3.0"
    201201            },
    202202            "funding": [
     
    218218        {
    219219            "name": "guzzlehttp/psr7",
    220             "version": "2.7.0",
    221             "version_normalized": "2.7.0.0",
     220            "version": "2.8.0",
     221            "version_normalized": "2.8.0.0",
    222222            "source": {
    223223                "type": "git",
    224224                "url": "https://github.com/guzzle/psr7.git",
    225                 "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201"
    226             },
    227             "dist": {
    228                 "type": "zip",
    229                 "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
    230                 "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
     225                "reference": "21dc724a0583619cd1652f673303492272778051"
     226            },
     227            "dist": {
     228                "type": "zip",
     229                "url": "https://api.github.com/repos/guzzle/psr7/zipball/21dc724a0583619cd1652f673303492272778051",
     230                "reference": "21dc724a0583619cd1652f673303492272778051",
    231231                "shasum": ""
    232232            },
     
    244244                "bamarni/composer-bin-plugin": "^1.8.2",
    245245                "http-interop/http-factory-tests": "0.9.0",
    246                 "phpunit/phpunit": "^8.5.39 || ^9.6.20"
     246                "phpunit/phpunit": "^8.5.44 || ^9.6.25"
    247247            },
    248248            "suggest": {
    249249                "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
    250250            },
    251             "time": "2024-07-18T11:15:46+00:00",
     251            "time": "2025-08-23T21:21:41+00:00",
    252252            "type": "library",
    253253            "extra": {
     
    317317            "support": {
    318318                "issues": "https://github.com/guzzle/psr7/issues",
    319                 "source": "https://github.com/guzzle/psr7/tree/2.7.0"
     319                "source": "https://github.com/guzzle/psr7/tree/2.8.0"
    320320            },
    321321            "funding": [
     
    650650        {
    651651            "name": "symfony/deprecation-contracts",
    652             "version": "v3.5.1",
    653             "version_normalized": "3.5.1.0",
     652            "version": "v2.5.4",
     653            "version_normalized": "2.5.4.0",
    654654            "source": {
    655655                "type": "git",
    656656                "url": "https://github.com/symfony/deprecation-contracts.git",
    657                 "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6"
    658             },
    659             "dist": {
    660                 "type": "zip",
    661                 "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
    662                 "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
    663                 "shasum": ""
    664             },
    665             "require": {
    666                 "php": ">=8.1"
    667             },
    668             "time": "2024-09-25T14:20:29+00:00",
     657                "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918"
     658            },
     659            "dist": {
     660                "type": "zip",
     661                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/605389f2a7e5625f273b53960dc46aeaf9c62918",
     662                "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918",
     663                "shasum": ""
     664            },
     665            "require": {
     666                "php": ">=7.1"
     667            },
     668            "time": "2024-09-25T14:11:13+00:00",
    669669            "type": "library",
    670670            "extra": {
     
    674674                },
    675675                "branch-alias": {
    676                     "dev-main": "3.5-dev"
     676                    "dev-main": "2.5-dev"
    677677                }
    678678            },
     
    700700            "homepage": "https://symfony.com",
    701701            "support": {
    702                 "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1"
     702                "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.4"
    703703            },
    704704            "funding": [
  • ngenius/trunk/vendor/composer/installed.php

    r3343865 r3368573  
    66        'install_path' => __DIR__ . '/../../',
    77        'aliases' => array(),
    8         'reference' => '3ead25f59b969aec4239ca134113c4244423ae39',
     8        'reference' => '62bd134240a63d737814f1f749170fbe9359ac47',
    99        'name' => 'ngenius/woocommerce',
    1010        'dev' => true,
     
    1212    'versions' => array(
    1313        'guzzlehttp/guzzle' => array(
    14             'pretty_version' => '7.9.2',
    15             'version' => '7.9.2.0',
     14            'pretty_version' => '7.10.0',
     15            'version' => '7.10.0.0',
    1616            'type' => 'library',
    1717            'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
    1818            'aliases' => array(),
    19             'reference' => 'd281ed313b989f213357e3be1a179f02196ac99b',
     19            'reference' => 'b51ac707cfa420b7bfd4e4d5e510ba8008e822b4',
    2020            'dev_requirement' => false,
    2121        ),
    2222        'guzzlehttp/promises' => array(
    23             'pretty_version' => '2.0.4',
    24             'version' => '2.0.4.0',
     23            'pretty_version' => '2.3.0',
     24            'version' => '2.3.0.0',
    2525            'type' => 'library',
    2626            'install_path' => __DIR__ . '/../guzzlehttp/promises',
    2727            'aliases' => array(),
    28             'reference' => 'f9c436286ab2892c7db7be8c8da4ef61ccf7b455',
     28            'reference' => '481557b130ef3790cf82b713667b43030dc9c957',
    2929            'dev_requirement' => false,
    3030        ),
    3131        'guzzlehttp/psr7' => array(
    32             'pretty_version' => '2.7.0',
    33             'version' => '2.7.0.0',
     32            'pretty_version' => '2.8.0',
     33            'version' => '2.8.0.0',
    3434            'type' => 'library',
    3535            'install_path' => __DIR__ . '/../guzzlehttp/psr7',
    3636            'aliases' => array(),
    37             'reference' => 'a70f5c95fb43bc83f07c9c948baa0dc1829bf201',
     37            'reference' => '21dc724a0583619cd1652f673303492272778051',
    3838            'dev_requirement' => false,
    3939        ),
     
    6262            'install_path' => __DIR__ . '/../../',
    6363            'aliases' => array(),
    64             'reference' => '3ead25f59b969aec4239ca134113c4244423ae39',
     64            'reference' => '62bd134240a63d737814f1f749170fbe9359ac47',
    6565            'dev_requirement' => false,
    6666        ),
     
    120120        ),
    121121        'symfony/deprecation-contracts' => array(
    122             'pretty_version' => 'v3.5.1',
    123             'version' => '3.5.1.0',
     122            'pretty_version' => 'v2.5.4',
     123            'version' => '2.5.4.0',
    124124            'type' => 'library',
    125125            'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
    126126            'aliases' => array(),
    127             'reference' => '74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6',
     127            'reference' => '605389f2a7e5625f273b53960dc46aeaf9c62918',
    128128            'dev_requirement' => false,
    129129        ),
  • ngenius/trunk/vendor/composer/platform_check.php

    r3343865 r3368573  
    55$issues = array();
    66
    7 if (!(PHP_VERSION_ID >= 80100)) {
    8     $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.';
     7if (!(PHP_VERSION_ID >= 80000)) {
     8    $issues[] = 'Your Composer dependencies require a PHP version ">= 8.0.0". You are running ' . PHP_VERSION . '.';
    99}
    1010
  • ngenius/trunk/vendor/guzzlehttp/guzzle/CHANGELOG.md

    r3343865 r3368573  
    22
    33Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version.
     4
     5## 7.10.0 - 2025-08-23
     6
     7### Added
     8
     9- Support for PHP 8.5
     10
     11### Changed
     12
     13- Adjusted `guzzlehttp/promises` version constraint to `^2.3`
     14- Adjusted `guzzlehttp/psr7` version constraint to `^2.8`
     15
     16
     17## 7.9.3 - 2025-03-27
     18
     19### Changed
     20
     21- Remove explicit content-length header for GET requests
     22- Improve compatibility with bad servers for boolean cookie values
    423
    524
  • ngenius/trunk/vendor/guzzlehttp/guzzle/composer.json

    r3343865 r3368573  
    8282        "php": "^7.2.5 || ^8.0",
    8383        "ext-json": "*",
    84         "guzzlehttp/promises": "^1.5.3 || ^2.0.3",
    85         "guzzlehttp/psr7": "^2.7.0",
     84        "guzzlehttp/promises": "^2.3",
     85        "guzzlehttp/psr7": "^2.8",
    8686        "psr/http-client": "^1.0",
    8787        "symfony/deprecation-contracts": "^2.2 || ^3.0"
  • ngenius/trunk/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php

    r3343865 r3368573  
    6363                                $data[$search] = (int) $value;
    6464                            }
     65                        } elseif ($search === 'Secure' || $search === 'Discard' || $search === 'HttpOnly') {
     66                            if ($value) {
     67                                $data[$search] = true;
     68                            }
    6569                        } else {
    6670                            $data[$search] = $value;
  • ngenius/trunk/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php

    r3343865 r3368573  
    126126
    127127        if (\count($this->handles) >= $this->maxHandles) {
    128             \curl_close($resource);
     128            if (PHP_VERSION_ID < 80000) {
     129                \curl_close($resource);
     130            }
    129131        } else {
    130132            // Remove all callback functions as they can hold onto references
     
    730732    {
    731733        foreach ($this->handles as $id => $handle) {
    732             \curl_close($handle);
     734            if (PHP_VERSION_ID < 80000) {
     735                \curl_close($handle);
     736            }
     737
    733738            unset($this->handles[$id]);
    734739        }
  • ngenius/trunk/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php

    r3343865 r3368573  
    241241        unset($this->delays[$id], $this->handles[$id]);
    242242        \curl_multi_remove_handle($this->_mh, $handle);
    243         \curl_close($handle);
     243
     244        if (PHP_VERSION_ID < 80000) {
     245            \curl_close($handle);
     246        }
    244247
    245248        return true;
  • ngenius/trunk/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php

    r3343865 r3368573  
    1818     * requests to another handler.
    1919     *
    20      * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $default Handler used for normal responses
    21      * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $sync    Handler used for synchronous responses.
     20     * @param callable(RequestInterface, array): PromiseInterface $default Handler used for normal responses
     21     * @param callable(RequestInterface, array): PromiseInterface $sync    Handler used for synchronous responses.
    2222     *
    23      * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.
     23     * @return callable(RequestInterface, array): PromiseInterface Returns the composed handler.
    2424     */
    2525    public static function wrapSync(callable $default, callable $sync): callable
     
    3838     * through the StreamHandler.
    3939     *
    40      * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $default   Handler used for non-streaming responses
    41      * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $streaming Handler used for streaming responses
     40     * @param callable(RequestInterface, array): PromiseInterface $default   Handler used for non-streaming responses
     41     * @param callable(RequestInterface, array): PromiseInterface $streaming Handler used for streaming responses
    4242     *
    43      * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.
     43     * @return callable(RequestInterface, array): PromiseInterface Returns the composed handler.
    4444     */
    4545    public static function wrapStreaming(callable $default, callable $streaming): callable
  • ngenius/trunk/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php

    r3343865 r3368573  
    5454
    5555            // Append a content-length header if body size is zero to match
    56             // cURL's behavior.
    57             if (0 === $request->getBody()->getSize()) {
     56            // the behavior of `CurlHandler`
     57            if (
     58                (
     59                    0 === \strcasecmp('PUT', $request->getMethod())
     60                    || 0 === \strcasecmp('POST', $request->getMethod())
     61                )
     62                && 0 === $request->getBody()->getSize()
     63            ) {
    5864                $request = $request->withHeader('Content-Length', '0');
    5965            }
     
    328334
    329335        return $this->createResource(
    330             function () use ($uri, &$http_response_header, $contextResource, $context, $options, $request) {
     336            function () use ($uri, $contextResource, $context, $options, $request) {
    331337                $resource = @\fopen((string) $uri, 'r', false, $contextResource);
     338
     339                // See https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_http_response_header_predefined_variable
     340                if (function_exists('http_get_last_response_headers')) {
     341                    /** @var array|null */
     342                    $http_response_header = \http_get_last_response_headers();
     343                }
     344
    332345                $this->lastHeaders = $http_response_header ?? [];
    333346
  • ngenius/trunk/vendor/guzzlehttp/guzzle/src/Middleware.php

    r3343865 r3368573  
    188188     * formatter.
    189189     *
    190      * @phpstan-param \Psr\Log\LogLevel::* $logLevel  Level at which to log requests.
    191      *
    192190     * @param LoggerInterface                            $logger    Logs messages.
    193191     * @param MessageFormatterInterface|MessageFormatter $formatter Formatter used to create message strings.
    194192     * @param string                                     $logLevel  Level at which to log requests.
     193     *
     194     * @phpstan-param \Psr\Log\LogLevel::* $logLevel Level at which to log requests.
    195195     *
    196196     * @return callable Returns a function that accepts the next handler.
  • ngenius/trunk/vendor/guzzlehttp/guzzle/src/Pool.php

    r3343865 r3368573  
    8787     * @param array|\Iterator $requests Requests to send concurrently.
    8888     * @param array           $options  Passes through the options available in
    89      *                                  {@see \GuzzleHttp\Pool::__construct}
     89     *                                  {@see Pool::__construct}
    9090     *
    9191     * @return array Returns an array containing the response or an exception
  • ngenius/trunk/vendor/guzzlehttp/guzzle/src/Utils.php

    r3343865 r3368573  
    8080     * The returned handler is not wrapped by any default middlewares.
    8181     *
    82      * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.
     82     * @return callable(\Psr\Http\Message\RequestInterface, array): Promise\PromiseInterface Returns the best handler for the given system.
    8383     *
    8484     * @throws \RuntimeException if no viable Handler is available.
  • ngenius/trunk/vendor/guzzlehttp/guzzle/src/functions.php

    r3343865 r3368573  
    5151 * The returned handler is not wrapped by any default middlewares.
    5252 *
    53  * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.
     53 * @return callable(\Psr\Http\Message\RequestInterface, array): Promise\PromiseInterface Returns the best handler for the given system.
    5454 *
    5555 * @throws \RuntimeException if no viable Handler is available.
  • ngenius/trunk/vendor/guzzlehttp/promises/CHANGELOG.md

    r3343865 r3368573  
    11# CHANGELOG
     2
     3
     4## 2.3.0 - 2025-08-22
     5
     6### Added
     7
     8- PHP 8.5 support
     9
     10
     11## 2.2.0 - 2025-03-27
     12
     13### Fixed
     14
     15- Revert "Allow an empty EachPromise to be resolved by running the queue"
     16
     17
     18## 2.1.0 - 2025-03-27
     19
     20### Added
     21
     22- Allow an empty EachPromise to be resolved by running the queue
    223
    324
  • ngenius/trunk/vendor/guzzlehttp/promises/README.md

    r3343865 r3368573  
    4242|---------|---------------------|--------------|
    4343| 1.x     | Security fixes only | >=5.5,<8.3   |
    44 | 2.x     | Latest              | >=7.2.5,<8.5 |
     44| 2.x     | Latest              | >=7.2.5,<8.6 |
    4545
    4646
  • ngenius/trunk/vendor/guzzlehttp/promises/composer.json

    r3343865 r3368573  
    3131    "require-dev": {
    3232        "bamarni/composer-bin-plugin": "^1.8.2",
    33         "phpunit/phpunit": "^8.5.39 || ^9.6.20"
     33        "phpunit/phpunit": "^8.5.44 || ^9.6.25"
    3434    },
    3535    "autoload": {
  • ngenius/trunk/vendor/guzzlehttp/psr7/CHANGELOG.md

    r3343865 r3368573  
    55The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
    66and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
     7
     8## 2.8.0 - 2025-08-23
     9
     10### Added
     11
     12- Allow empty lists as header values
     13
     14### Changed
     15
     16- PHP 8.5 support
     17
     18## 2.7.1 - 2025-03-27
     19
     20### Fixed
     21
     22- Fixed uppercase IPv6 addresses in URI
     23
     24### Changed
     25
     26- Improve uploaded file error message
    727
    828## 2.7.0 - 2024-07-18
  • ngenius/trunk/vendor/guzzlehttp/psr7/README.md

    r3343865 r3368573  
    2626|---------|---------------------|--------------|
    2727| 1.x     | EOL (2024-06-30)    | >=5.4,<8.2   |
    28 | 2.x     | Latest              | >=7.2.5,<8.5 |
     28| 2.x     | Latest              | >=7.2.5,<8.6 |
    2929
    3030
  • ngenius/trunk/vendor/guzzlehttp/psr7/composer.json

    r3343865 r3368573  
    6363        "bamarni/composer-bin-plugin": "^1.8.2",
    6464        "http-interop/http-factory-tests": "0.9.0",
    65         "phpunit/phpunit": "^8.5.39 || ^9.6.20"
     65        "phpunit/phpunit": "^8.5.44 || ^9.6.25"
    6666    },
    6767    "suggest": {
  • ngenius/trunk/vendor/guzzlehttp/psr7/src/MessageTrait.php

    r3343865 r3368573  
    173173        if (!is_array($value)) {
    174174            return $this->trimAndValidateHeaderValues([$value]);
    175         }
    176 
    177         if (count($value) === 0) {
    178             throw new \InvalidArgumentException('Header value can not be an empty array.');
    179175        }
    180176
  • ngenius/trunk/vendor/guzzlehttp/psr7/src/UploadedFile.php

    r3343865 r3368573  
    1212class UploadedFile implements UploadedFileInterface
    1313{
    14     private const ERRORS = [
    15         UPLOAD_ERR_OK,
    16         UPLOAD_ERR_INI_SIZE,
    17         UPLOAD_ERR_FORM_SIZE,
    18         UPLOAD_ERR_PARTIAL,
    19         UPLOAD_ERR_NO_FILE,
    20         UPLOAD_ERR_NO_TMP_DIR,
    21         UPLOAD_ERR_CANT_WRITE,
    22         UPLOAD_ERR_EXTENSION,
     14    private const ERROR_MAP = [
     15        UPLOAD_ERR_OK => 'UPLOAD_ERR_OK',
     16        UPLOAD_ERR_INI_SIZE => 'UPLOAD_ERR_INI_SIZE',
     17        UPLOAD_ERR_FORM_SIZE => 'UPLOAD_ERR_FORM_SIZE',
     18        UPLOAD_ERR_PARTIAL => 'UPLOAD_ERR_PARTIAL',
     19        UPLOAD_ERR_NO_FILE => 'UPLOAD_ERR_NO_FILE',
     20        UPLOAD_ERR_NO_TMP_DIR => 'UPLOAD_ERR_NO_TMP_DIR',
     21        UPLOAD_ERR_CANT_WRITE => 'UPLOAD_ERR_CANT_WRITE',
     22        UPLOAD_ERR_EXTENSION => 'UPLOAD_ERR_EXTENSION',
    2323    ];
    2424
     
    105105    private function setError(int $error): void
    106106    {
    107         if (false === in_array($error, UploadedFile::ERRORS, true)) {
     107        if (!isset(UploadedFile::ERROR_MAP[$error])) {
    108108            throw new InvalidArgumentException(
    109109                'Invalid error status for UploadedFile'
     
    138138    {
    139139        if (false === $this->isOk()) {
    140             throw new RuntimeException('Cannot retrieve stream due to upload error');
     140            throw new RuntimeException(\sprintf('Cannot retrieve stream due to upload error (%s)', self::ERROR_MAP[$this->error]));
    141141        }
    142142
  • ngenius/trunk/vendor/guzzlehttp/psr7/src/Uri.php

    r3343865 r3368573  
    108108        // If IPv6
    109109        $prefix = '';
    110         if (preg_match('%^(.*://\[[0-9:a-f]+\])(.*?)$%', $url, $matches)) {
     110        if (preg_match('%^(.*://\[[0-9:a-fA-F]+\])(.*?)$%', $url, $matches)) {
    111111            /** @var array{0:string, 1:string, 2:string} $matches */
    112112            $prefix = $matches[1];
  • ngenius/trunk/vendor/guzzlehttp/psr7/src/Utils.php

    r3343865 r3368573  
    398398
    399399        if ($ex) {
    400             /** @var $ex \RuntimeException */
     400            /** @var \RuntimeException $ex */
    401401            throw $ex;
    402402        }
     
    445445
    446446        if ($ex) {
    447             /** @var $ex \RuntimeException */
     447            /** @var \RuntimeException $ex */
    448448            throw $ex;
    449449        }
  • ngenius/trunk/vendor/symfony/deprecation-contracts/README.md

    r3343865 r3368573  
    2323`Since symfony/blockchain 8.9: Using "bitcoin" is deprecated, use "fabcoin" instead.`
    2424
    25 While not recommended, the deprecation notices can be completely ignored by declaring an empty
     25While not necessarily recommended, the deprecation notices can be completely ignored by declaring an empty
    2626`function trigger_deprecation() {}` in your application.
  • ngenius/trunk/vendor/symfony/deprecation-contracts/composer.json

    r3343865 r3368573  
    1616    ],
    1717    "require": {
    18         "php": ">=8.1"
     18        "php": ">=7.1"
    1919    },
    2020    "autoload": {
     
    2626    "extra": {
    2727        "branch-alias": {
    28             "dev-main": "3.5-dev"
     28            "dev-main": "2.5-dev"
    2929        },
    3030        "thanks": {
  • ngenius/trunk/vendor/symfony/deprecation-contracts/function.php

    r3343865 r3368573  
    2121     * @author Nicolas Grekas <p@tchwork.com>
    2222     */
    23     function trigger_deprecation(string $package, string $version, string $message, mixed ...$args): void
     23    function trigger_deprecation(string $package, string $version, string $message, ...$args): void
    2424    {
    2525        @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED);
Note: See TracChangeset for help on using the changeset viewer.