Plugin Directory

Changeset 3122743


Ignore:
Timestamp:
07/21/2024 12:39:43 PM (21 months ago)
Author:
axazara
Message:

Update to version v1.8 from GitHub

Location:
moneroo
Files:
4 added
122 edited
1 copied

Legend:

Unmodified
Added
Removed
  • moneroo/tags/v1.8/moneroo-for-woocommerce.php

    r3057581 r3122743  
    1111 * License: GPLv2
    1212 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
    13  * Version: v1.7
     13 * Version: v1.8
    1414 * Requires at least: 4.9
    15  * Tested up to: 6.4
     15 * Tested up to: 6.6
    1616 * WC requires at least: 5.3
    17  * WC tested up to: 8.3
     17 * WC tested up to: 9.1
    1818 * Text Domain: moneroo-for-woocommerce
    1919 * Domain Path: /languages.
    2020 */
    2121
     22const MONEROO_WC_MAIN_FILE = __FILE__;
     23const MONEROO_WC__VERSION = 'v1.8';
    2224
    2325
     
    3133    return;
    3234}
     35
    3336
    3437// Include the Composer autoload file
     
    8285}
    8386
     87
     88
    8489/**
    8590 * Load the plugin text domain for translations.
     
    95100register_activation_hook(__FILE__, 'moneroo_wc_generate_webhook_secret');
    96101add_action('plugins_loaded', 'moneroo_wc_load_plugin_textdomain');
     102
     103/**
     104 * Declare the HPOS compatibility
     105 */
     106add_action(
     107    'before_woocommerce_init',
     108    function () {
     109        if (class_exists(\Automattic\WooCommerce\Utilities\FeaturesUtil::class)) {
     110            \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', __FILE__, true);
     111        }
     112        if (class_exists('\Automattic\WooCommerce\Utilities\FeaturesUtil')) {
     113            \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility(
     114                'cart_checkout_blocks',
     115                __FILE__,
     116                true
     117            );
     118        }
     119    }
     120);
     121
     122/**
     123 * Registers WooCommerce Blocks integration.
     124 */
     125function moneroo_gateway_woocommerce_block_support()
     126{
     127
     128    if (class_exists(\Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType::class)) {
     129
     130        require_once __DIR__ . '/src/Moneroo_WC_Gateway_Blocks.php';
     131
     132        add_action(
     133            'woocommerce_blocks_payment_method_type_registration',
     134            static function (Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry $payment_method_registry) {
     135                $payment_method_registry->register(new \Moneroo\WooCommerce\Moneroo_WC_Gateway_Blocks());
     136            }
     137        );
     138    }
     139}
     140add_action('woocommerce_blocks_loaded', 'moneroo_gateway_woocommerce_block_support');
  • moneroo/tags/v1.8/readme.txt

    r3057581 r3122743  
    55Requires at least: 4.9
    66Tested up to: 6.4
    7 Stable tag: v1.7
     7Stable tag: v1.8
    88Requires PHP: 7.4
    99License: GPLv3
  • moneroo/tags/v1.8/src/Moneroo_WC_Gateway.php

    r3057581 r3122743  
    1515use function is_admin;
    1616
    17 use Moneroo\Payment;
    1817use Moneroo\WooCommerce\Handlers\Moneroo_WC_Payment_Handler;
    1918
     
    2625use function wc_get_logger;
    2726use function wc_get_order;
    28 use function wp_enqueue_style;
    2927use function wp_redirect;
    30 use function wp_register_style;
    3128
    3229if (! defined('ABSPATH')) {
     
    3835class Moneroo_WC_Gateway extends \WC_Payment_Gateway
    3936{
    40     public Payment $moneroo;
     37    public \Moneroo\Payment $moneroo;
    4138
    4239    public array $moneroo_wc_moneroo_wc_config = [];
     40
     41    public ?string $moneroo_wc_public_key = null;
    4342
    4443    public ?string $moneroo_wc_private_key = null;
     
    5049        $this->moneroo_wc_initialize_settings();
    5150        $this->moneroo_wc_register_filters();
    52         $this->moneroo_wc_load_custom_css_styles();
    5351        $this->moneroo_wc_check_if_webhook_secret_is_set_or_generate();
    5452        if ($this->moneroo_wc_keys_are_set()) {
     
    120118    public function moneroo_wc_load_moneroo(): void
    121119    {
    122         $this->moneroo = new Payment(
     120        $this->moneroo = new \Moneroo\Payment(
     121            $this->moneroo_wc_public_key,
    123122            $this->moneroo_wc_private_key,
    124123        );
     
    133132    {
    134133        $order = wc_get_order($order_id);
     134
    135135        if (! $this->moneroo_wc_check_if_gateway_is_available()) {
    136136            wc_add_notice(
     
    154154                'first_name' => $order->get_billing_first_name(),
    155155                'last_name'  => $order->get_billing_last_name(),
    156                 'phone'      => empty($order->get_billing_phone()) ? null : (int) $order->get_billing_phone(),
    157                 'address'    => $order->get_billing_address_1(),
     156                'phone'      => empty($order->get_billing_phone()) ? null : (int) $order->get_billing_phone(),                'address'    => $order->get_billing_address_1(),
    158157                'city'       => $order->get_billing_city(),
    159158                'state'      => $order->get_billing_state(),
     
    304303    }
    305304
    306     // Load custom CSS styles.
    307     public function moneroo_wc_load_custom_css_styles(): void
    308     {
    309         wp_register_style('custom-moneroo-style', plugins_url('../assets/css/style.css', __FILE__));
    310         wp_enqueue_style('custom-moneroo-style');
    311     }
    312 
    313305    /**
    314306     * Load plugin text domain.
     
    348340        }
    349341
    350         return ! ($this->moneroo_wc_keys_are_set() === false);
     342        return $this->moneroo_wc_keys_are_set();
    351343    }
    352344
  • moneroo/tags/v1.8/src/Settings/moneroo-settings.php

    r3057581 r3122743  
    1717        'description' => '',
    1818        'default'     => 'yes',
     19        'desc_tip'    => true,
    1920    ],
    2021    'title' => [
     
    3334        'desc_tip'    => true,
    3435    ],
     36    'moneroo_wc_public_key' => [
     37        'title'       => esc_html__('Public KEY', 'moneroo-woocommerce'),
     38        'type'        => 'password',
     39        'description' => esc_html__('Get your API keys from your Moneroo dashboard', 'moneroo-woocommerce'),
     40    ],
    3541    'moneroo_wc_private_key' => [
    3642        'title'       => esc_html__('Private KEY', 'moneroo-woocommerce'),
    3743        'type'        => 'password',
    38         'desc_tip'    => true,
    3944        'description' => esc_html__('Get your API keys from your Moneroo dashboard', 'moneroo-woocommerce'),
    4045    ],
  • moneroo/tags/v1.8/vendor/composer/autoload_classmap.php

    r3015851 r3122743  
    111111    'Moneroo\\WooCommerce\\Handlers\\Moneroo_WC_Payment_Handler' => $baseDir . '/src/Handlers/Moneroo_WC_Payment_Handler.php',
    112112    'Moneroo\\WooCommerce\\Moneroo_WC_Gateway' => $baseDir . '/src/Moneroo_WC_Gateway.php',
     113    'Moneroo\\WooCommerce\\Moneroo_WC_Gateway_Blocks' => $baseDir . '/src/Moneroo_WC_Gateway_Blocks.php',
    113114    'Psr\\Http\\Client\\ClientExceptionInterface' => $vendorDir . '/psr/http-client/src/ClientExceptionInterface.php',
    114115    'Psr\\Http\\Client\\ClientInterface' => $vendorDir . '/psr/http-client/src/ClientInterface.php',
  • moneroo/tags/v1.8/vendor/composer/autoload_static.php

    r3057581 r3122743  
    169169        'Moneroo\\WooCommerce\\Handlers\\Moneroo_WC_Payment_Handler' => __DIR__ . '/../..' . '/src/Handlers/Moneroo_WC_Payment_Handler.php',
    170170        'Moneroo\\WooCommerce\\Moneroo_WC_Gateway' => __DIR__ . '/../..' . '/src/Moneroo_WC_Gateway.php',
     171        'Moneroo\\WooCommerce\\Moneroo_WC_Gateway_Blocks' => __DIR__ . '/../..' . '/src/Moneroo_WC_Gateway_Blocks.php',
    171172        'Psr\\Http\\Client\\ClientExceptionInterface' => __DIR__ . '/..' . '/psr/http-client/src/ClientExceptionInterface.php',
    172173        'Psr\\Http\\Client\\ClientInterface' => __DIR__ . '/..' . '/psr/http-client/src/ClientInterface.php',
  • moneroo/tags/v1.8/vendor/composer/installed.json

    r3057581 r3122743  
    33        {
    44            "name": "guzzlehttp/guzzle",
    5             "version": "7.8.1",
    6             "version_normalized": "7.8.1.0",
     5            "version": "7.9.1",
     6            "version_normalized": "7.9.1.0",
    77            "source": {
    88                "type": "git",
    99                "url": "https://github.com/guzzle/guzzle.git",
    10                 "reference": "41042bc7ab002487b876a0683fc8dce04ddce104"
    11             },
    12             "dist": {
    13                 "type": "zip",
    14                 "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104",
    15                 "reference": "41042bc7ab002487b876a0683fc8dce04ddce104",
     10                "reference": "a629e5b69db96eb4939c1b34114130077dd4c6fc"
     11            },
     12            "dist": {
     13                "type": "zip",
     14                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a629e5b69db96eb4939c1b34114130077dd4c6fc",
     15                "reference": "a629e5b69db96eb4939c1b34114130077dd4c6fc",
    1616                "shasum": ""
    1717            },
    1818            "require": {
    1919                "ext-json": "*",
    20                 "guzzlehttp/promises": "^1.5.3 || ^2.0.1",
    21                 "guzzlehttp/psr7": "^1.9.1 || ^2.5.1",
     20                "guzzlehttp/promises": "^1.5.3 || ^2.0.3",
     21                "guzzlehttp/psr7": "^2.7.0",
    2222                "php": "^7.2.5 || ^8.0",
    2323                "psr/http-client": "^1.0",
     
    3030                "bamarni/composer-bin-plugin": "^1.8.2",
    3131                "ext-curl": "*",
    32                 "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
     32                "guzzle/client-integration-tests": "3.0.2",
    3333                "php-http/message-factory": "^1.1",
    34                 "phpunit/phpunit": "^8.5.36 || ^9.6.15",
     34                "phpunit/phpunit": "^8.5.39 || ^9.6.20",
    3535                "psr/log": "^1.1 || ^2.0 || ^3.0"
    3636            },
     
    4040                "psr/log": "Required for using the Log middleware"
    4141            },
    42             "time": "2023-12-03T20:35:24+00:00",
     42            "time": "2024-07-19T16:19:57+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.8.1"
     114                "source": "https://github.com/guzzle/guzzle/tree/7.9.1"
    115115            },
    116116            "funding": [
     
    132132        {
    133133            "name": "guzzlehttp/promises",
    134             "version": "2.0.2",
    135             "version_normalized": "2.0.2.0",
     134            "version": "2.0.3",
     135            "version_normalized": "2.0.3.0",
    136136            "source": {
    137137                "type": "git",
    138138                "url": "https://github.com/guzzle/promises.git",
    139                 "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223"
    140             },
    141             "dist": {
    142                 "type": "zip",
    143                 "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223",
    144                 "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223",
     139                "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8"
     140            },
     141            "dist": {
     142                "type": "zip",
     143                "url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8",
     144                "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8",
    145145                "shasum": ""
    146146            },
     
    150150            "require-dev": {
    151151                "bamarni/composer-bin-plugin": "^1.8.2",
    152                 "phpunit/phpunit": "^8.5.36 || ^9.6.15"
    153             },
    154             "time": "2023-12-03T20:19:20+00:00",
     152                "phpunit/phpunit": "^8.5.39 || ^9.6.20"
     153            },
     154            "time": "2024-07-18T10:29:17+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.2"
     200                "source": "https://github.com/guzzle/promises/tree/2.0.3"
    201201            },
    202202            "funding": [
     
    218218        {
    219219            "name": "guzzlehttp/psr7",
    220             "version": "2.6.2",
    221             "version_normalized": "2.6.2.0",
     220            "version": "2.7.0",
     221            "version_normalized": "2.7.0.0",
    222222            "source": {
    223223                "type": "git",
    224224                "url": "https://github.com/guzzle/psr7.git",
    225                 "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221"
    226             },
    227             "dist": {
    228                 "type": "zip",
    229                 "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221",
    230                 "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221",
     225                "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201"
     226            },
     227            "dist": {
     228                "type": "zip",
     229                "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
     230                "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
    231231                "shasum": ""
    232232            },
     
    243243            "require-dev": {
    244244                "bamarni/composer-bin-plugin": "^1.8.2",
    245                 "http-interop/http-factory-tests": "^0.9",
    246                 "phpunit/phpunit": "^8.5.36 || ^9.6.15"
     245                "http-interop/http-factory-tests": "0.9.0",
     246                "phpunit/phpunit": "^8.5.39 || ^9.6.20"
    247247            },
    248248            "suggest": {
    249249                "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
    250250            },
    251             "time": "2023-12-03T20:05:35+00:00",
     251            "time": "2024-07-18T11:15:46+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.6.2"
     319                "source": "https://github.com/guzzle/psr7/tree/2.7.0"
    320320            },
    321321            "funding": [
     
    456456        {
    457457            "name": "psr/http-factory",
    458             "version": "1.0.2",
    459             "version_normalized": "1.0.2.0",
     458            "version": "1.1.0",
     459            "version_normalized": "1.1.0.0",
    460460            "source": {
    461461                "type": "git",
    462462                "url": "https://github.com/php-fig/http-factory.git",
    463                 "reference": "e616d01114759c4c489f93b099585439f795fe35"
    464             },
    465             "dist": {
    466                 "type": "zip",
    467                 "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35",
    468                 "reference": "e616d01114759c4c489f93b099585439f795fe35",
    469                 "shasum": ""
    470             },
    471             "require": {
    472                 "php": ">=7.0.0",
     463                "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a"
     464            },
     465            "dist": {
     466                "type": "zip",
     467                "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
     468                "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
     469                "shasum": ""
     470            },
     471            "require": {
     472                "php": ">=7.1",
    473473                "psr/http-message": "^1.0 || ^2.0"
    474474            },
    475             "time": "2023-04-10T20:10:41+00:00",
     475            "time": "2024-04-15T12:06:14+00:00",
    476476            "type": "library",
    477477            "extra": {
     
    496496                }
    497497            ],
    498             "description": "Common interfaces for PSR-7 HTTP message factories",
     498            "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories",
    499499            "keywords": [
    500500                "factory",
     
    508508            ],
    509509            "support": {
    510                 "source": "https://github.com/php-fig/http-factory/tree/1.0.2"
     510                "source": "https://github.com/php-fig/http-factory"
    511511            },
    512512            "install-path": "../psr/http-factory"
     
    617617        {
    618618            "name": "symfony/deprecation-contracts",
    619             "version": "v3.4.0",
    620             "version_normalized": "3.4.0.0",
     619            "version": "v2.5.3",
     620            "version_normalized": "2.5.3.0",
    621621            "source": {
    622622                "type": "git",
    623623                "url": "https://github.com/symfony/deprecation-contracts.git",
    624                 "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf"
    625             },
    626             "dist": {
    627                 "type": "zip",
    628                 "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf",
    629                 "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf",
    630                 "shasum": ""
    631             },
    632             "require": {
    633                 "php": ">=8.1"
    634             },
    635             "time": "2023-05-23T14:45:45+00:00",
     624                "reference": "80d075412b557d41002320b96a096ca65aa2c98d"
     625            },
     626            "dist": {
     627                "type": "zip",
     628                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d",
     629                "reference": "80d075412b557d41002320b96a096ca65aa2c98d",
     630                "shasum": ""
     631            },
     632            "require": {
     633                "php": ">=7.1"
     634            },
     635            "time": "2023-01-24T14:02:46+00:00",
    636636            "type": "library",
    637637            "extra": {
    638638                "branch-alias": {
    639                     "dev-main": "3.4-dev"
     639                    "dev-main": "2.5-dev"
    640640                },
    641641                "thanks": {
     
    667667            "homepage": "https://symfony.com",
    668668            "support": {
    669                 "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0"
     669                "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.3"
    670670            },
    671671            "funding": [
  • moneroo/tags/v1.8/vendor/composer/installed.php

    r3057581 r3122743  
    22    'root' => array(
    33        'name' => 'moneroo/moneroo-woocommerce',
    4         'pretty_version' => 'v1.7',
    5         'version' => '1.7.0.0',
    6         'reference' => '98bd4ad51c131e991039a1facb0d8c3ba7fef204',
     4        'pretty_version' => 'v1.8',
     5        'version' => '1.8.0.0',
     6        'reference' => '6ee4b7e9bcf7aeb31d2a67a5b9161adcc8fd4591',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'guzzlehttp/guzzle' => array(
    14             'pretty_version' => '7.8.1',
    15             'version' => '7.8.1.0',
    16             'reference' => '41042bc7ab002487b876a0683fc8dce04ddce104',
     14            'pretty_version' => '7.9.1',
     15            'version' => '7.9.1.0',
     16            'reference' => 'a629e5b69db96eb4939c1b34114130077dd4c6fc',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
     
    2121        ),
    2222        'guzzlehttp/promises' => array(
    23             'pretty_version' => '2.0.2',
    24             'version' => '2.0.2.0',
    25             'reference' => 'bbff78d96034045e58e13dedd6ad91b5d1253223',
     23            'pretty_version' => '2.0.3',
     24            'version' => '2.0.3.0',
     25            'reference' => '6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8',
    2626            'type' => 'library',
    2727            'install_path' => __DIR__ . '/../guzzlehttp/promises',
     
    3030        ),
    3131        'guzzlehttp/psr7' => array(
    32             'pretty_version' => '2.6.2',
    33             'version' => '2.6.2.0',
    34             'reference' => '45b30f99ac27b5ca93cb4831afe16285f57b8221',
     32            'pretty_version' => '2.7.0',
     33            'version' => '2.7.0.0',
     34            'reference' => 'a70f5c95fb43bc83f07c9c948baa0dc1829bf201',
    3535            'type' => 'library',
    3636            'install_path' => __DIR__ . '/../guzzlehttp/psr7',
     
    4848        ),
    4949        'moneroo/moneroo-woocommerce' => array(
    50             'pretty_version' => 'v1.7',
    51             'version' => '1.7.0.0',
    52             'reference' => '98bd4ad51c131e991039a1facb0d8c3ba7fef204',
     50            'pretty_version' => 'v1.8',
     51            'version' => '1.8.0.0',
     52            'reference' => '6ee4b7e9bcf7aeb31d2a67a5b9161adcc8fd4591',
    5353            'type' => 'library',
    5454            'install_path' => __DIR__ . '/../../',
     
    7272        ),
    7373        'psr/http-factory' => array(
    74             'pretty_version' => '1.0.2',
    75             'version' => '1.0.2.0',
    76             'reference' => 'e616d01114759c4c489f93b099585439f795fe35',
     74            'pretty_version' => '1.1.0',
     75            'version' => '1.1.0.0',
     76            'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a',
    7777            'type' => 'library',
    7878            'install_path' => __DIR__ . '/../psr/http-factory',
     
    111111        ),
    112112        'symfony/deprecation-contracts' => array(
    113             'pretty_version' => 'v3.4.0',
    114             'version' => '3.4.0.0',
    115             'reference' => '7c3aff79d10325257a001fcf92d991f24fc967cf',
     113            'pretty_version' => 'v2.5.3',
     114            'version' => '2.5.3.0',
     115            'reference' => '80d075412b557d41002320b96a096ca65aa2c98d',
    116116            'type' => 'library',
    117117            'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
  • moneroo/tags/v1.8/vendor/composer/platform_check.php

    r3057581 r3122743  
    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 >= 70400)) {
     8    $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.';
    99}
    1010
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/CHANGELOG.md

    r3015851 r3122743  
    22
    33Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version.
     4
     5
     6## 7.9.1 - 2024-07-19
     7
     8### Fixed
     9
     10- Fix TLS 1.3 check for HTTP/2 requests
     11
     12
     13## 7.9.0 - 2024-07-18
     14
     15### Changed
     16
     17- Improve protocol version checks to provide feedback around unsupported protocols
     18- Only select the cURL handler by default if 7.34.0 or higher is linked
     19- Improved `CurlMultiHandler` to avoid busy wait if possible
     20- Dropped support for EOL `guzzlehttp/psr7` v1
     21- Improved URI user info redaction in errors
     22
     23## 7.8.2 - 2024-07-18
     24
     25### Added
     26
     27- Support for PHP 8.4
    428
    529
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/README.md

    r3015851 r3122743  
    6363| Version | Status              | Packagist           | Namespace    | Repo                | Docs                | PSR-7 | PHP Version  |
    6464|---------|---------------------|---------------------|--------------|---------------------|---------------------|-------|--------------|
    65 | 3.x     | EOL                 | `guzzle/guzzle`     | `Guzzle`     | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No    | >=5.3.3,<7.0 |
    66 | 4.x     | EOL                 | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A                 | No    | >=5.4,<7.0   |
    67 | 5.x     | EOL                 | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No    | >=5.4,<7.4   |
    68 | 6.x     | Security fixes only | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes   | >=5.5,<8.0   |
    69 | 7.x     | Latest              | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes   | >=7.2.5,<8.4 |
     65| 3.x     | EOL (2016-10-31)    | `guzzle/guzzle`     | `Guzzle`     | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No    | >=5.3.3,<7.0 |
     66| 4.x     | EOL (2016-10-31)    | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A                 | No    | >=5.4,<7.0   |
     67| 5.x     | EOL (2019-10-31)    | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No    | >=5.4,<7.4   |
     68| 6.x     | EOL (2023-10-31)    | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes   | >=5.5,<8.0   |
     69| 7.x     | Latest              | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes   | >=7.2.5,<8.5 |
    7070
    7171[guzzle-3-repo]: https://github.com/guzzle/guzzle3
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/composer.json

    r3015851 r3122743  
    5151        }
    5252    ],
     53    "repositories": [
     54        {
     55            "type": "package",
     56            "package": {
     57                "name": "guzzle/client-integration-tests",
     58                "version": "v3.0.2",
     59                "dist": {
     60                    "url": "https://codeload.github.com/guzzle/client-integration-tests/zip/2c025848417c1135031fdf9c728ee53d0a7ceaee",
     61                    "type": "zip"
     62                },
     63                "require": {
     64                    "php": "^7.2.5 || ^8.0",
     65                    "phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.11",
     66                    "php-http/message": "^1.0 || ^2.0",
     67                    "guzzlehttp/psr7": "^1.7 || ^2.0",
     68                    "th3n3rd/cartesian-product": "^0.3"
     69                },
     70                "autoload": {
     71                    "psr-4": {
     72                        "Http\\Client\\Tests\\": "src/"
     73                    }
     74                },
     75                "bin": [
     76                    "bin/http_test_server"
     77                ]
     78            }
     79        }
     80    ],
    5381    "require": {
    5482        "php": "^7.2.5 || ^8.0",
    5583        "ext-json": "*",
    56         "guzzlehttp/promises": "^1.5.3 || ^2.0.1",
    57         "guzzlehttp/psr7": "^1.9.1 || ^2.5.1",
     84        "guzzlehttp/promises": "^1.5.3 || ^2.0.3",
     85        "guzzlehttp/psr7": "^2.7.0",
    5886        "psr/http-client": "^1.0",
    5987        "symfony/deprecation-contracts": "^2.2 || ^3.0"
     
    6593        "ext-curl": "*",
    6694        "bamarni/composer-bin-plugin": "^1.8.2",
    67         "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
     95        "guzzle/client-integration-tests": "3.0.2",
    6896        "php-http/message-factory": "^1.1",
    69         "phpunit/phpunit": "^8.5.36 || ^9.6.15",
     97        "phpunit/phpunit": "^8.5.39 || ^9.6.20",
    7098        "psr/log": "^1.1 || ^2.0 || ^3.0"
    7199    },
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/BodySummarizer.php

    r3015851 r3122743  
    1212    private $truncateAt;
    1313
    14     public function __construct(int $truncateAt = null)
     14    public function __construct(?int $truncateAt = null)
    1515    {
    1616        $this->truncateAt = $truncateAt;
     
    2323    {
    2424        return $this->truncateAt === null
    25             ? \GuzzleHttp\Psr7\Message::bodySummary($message)
    26             : \GuzzleHttp\Psr7\Message::bodySummary($message, $this->truncateAt);
     25            ? Psr7\Message::bodySummary($message)
     26            : Psr7\Message::bodySummary($message, $this->truncateAt);
    2727    }
    2828}
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/Client.php

    r3015851 r3122743  
    5353     * @param array $config Client configuration settings.
    5454     *
    55      * @see \GuzzleHttp\RequestOptions for a list of available request options.
     55     * @see RequestOptions for a list of available request options.
    5656     */
    5757    public function __construct(array $config = [])
     
    203203     * @deprecated Client::getConfig will be removed in guzzlehttp/guzzle:8.0.
    204204     */
    205     public function getConfig(string $option = null)
     205    public function getConfig(?string $option = null)
    206206    {
    207207        return $option === null
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/ClientInterface.php

    r3015851 r3122743  
    8181     * @deprecated ClientInterface::getConfig will be removed in guzzlehttp/guzzle:8.0.
    8282     */
    83     public function getConfig(string $option = null);
     83    public function getConfig(?string $option = null);
    8484}
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php

    r3015851 r3122743  
    104104    }
    105105
    106     public function clear(string $domain = null, string $path = null, string $name = null): void
     106    public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void
    107107    {
    108108        if (!$domain) {
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php

    r3015851 r3122743  
    6363     * @param string|null $name   Clears cookies matching a domain, path, and name
    6464     */
    65     public function clear(string $domain = null, string $path = null, string $name = null): void;
     65    public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void;
    6666
    6767    /**
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php

    r3015851 r3122743  
    1515        RequestInterface $request,
    1616        ResponseInterface $response,
    17         \Throwable $previous = null,
     17        ?\Throwable $previous = null,
    1818        array $handlerContext = []
    1919    ) {
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php

    r3015851 r3122743  
    2626        string $message,
    2727        RequestInterface $request,
    28         \Throwable $previous = null,
     28        ?\Throwable $previous = null,
    2929        array $handlerContext = []
    3030    ) {
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php

    r3015851 r3122743  
    88use Psr\Http\Message\RequestInterface;
    99use Psr\Http\Message\ResponseInterface;
    10 use Psr\Http\Message\UriInterface;
    1110
    1211/**
     
    3332        string $message,
    3433        RequestInterface $request,
    35         ResponseInterface $response = null,
    36         \Throwable $previous = null,
     34        ?ResponseInterface $response = null,
     35        ?\Throwable $previous = null,
    3736        array $handlerContext = []
    3837    ) {
     
    6463    public static function create(
    6564        RequestInterface $request,
    66         ResponseInterface $response = null,
    67         \Throwable $previous = null,
     65        ?ResponseInterface $response = null,
     66        ?\Throwable $previous = null,
    6867        array $handlerContext = [],
    69         BodySummarizerInterface $bodySummarizer = null
     68        ?BodySummarizerInterface $bodySummarizer = null
    7069    ): self {
    7170        if (!$response) {
     
    9190        }
    9291
    93         $uri = $request->getUri();
    94         $uri = static::obfuscateUri($uri);
     92        $uri = \GuzzleHttp\Psr7\Utils::redactUserInfo($request->getUri());
    9593
    9694        // Client Error: `GET /` resulted in a `404 Not Found` response:
     
    112110
    113111        return new $className($message, $request, $response, $previous, $handlerContext);
    114     }
    115 
    116     /**
    117      * Obfuscates URI if there is a username and a password present
    118      */
    119     private static function obfuscateUri(UriInterface $uri): UriInterface
    120     {
    121         $userInfo = $uri->getUserInfo();
    122 
    123         if (false !== ($pos = \strpos($userInfo, ':'))) {
    124             return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***');
    125         }
    126 
    127         return $uri;
    128112    }
    129113
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php

    r3015851 r3122743  
    1212use GuzzleHttp\Utils;
    1313use Psr\Http\Message\RequestInterface;
     14use Psr\Http\Message\UriInterface;
    1415
    1516/**
     
    4748    public function create(RequestInterface $request, array $options): EasyHandle
    4849    {
     50        $protocolVersion = $request->getProtocolVersion();
     51
     52        if ('2' === $protocolVersion || '2.0' === $protocolVersion) {
     53            if (!self::supportsHttp2()) {
     54                throw new ConnectException('HTTP/2 is supported by the cURL handler, however libcurl is built without HTTP/2 support.', $request);
     55            }
     56        } elseif ('1.0' !== $protocolVersion && '1.1' !== $protocolVersion) {
     57            throw new ConnectException(sprintf('HTTP/%s is not supported by the cURL handler.', $protocolVersion), $request);
     58        }
     59
    4960        if (isset($options['curl']['body_as_string'])) {
    5061            $options['_body_as_string'] = $options['curl']['body_as_string'];
     
    7182
    7283        return $easy;
     84    }
     85
     86    private static function supportsHttp2(): bool
     87    {
     88        static $supportsHttp2 = null;
     89
     90        if (null === $supportsHttp2) {
     91            $supportsHttp2 = self::supportsTls12()
     92                && defined('CURL_VERSION_HTTP2')
     93                && (\CURL_VERSION_HTTP2 & \curl_version()['features']);
     94        }
     95
     96        return $supportsHttp2;
     97    }
     98
     99    private static function supportsTls12(): bool
     100    {
     101        static $supportsTls12 = null;
     102
     103        if (null === $supportsTls12) {
     104            $supportsTls12 = \CURL_SSLVERSION_TLSv1_2 & \curl_version()['features'];
     105        }
     106
     107        return $supportsTls12;
     108    }
     109
     110    private static function supportsTls13(): bool
     111    {
     112        static $supportsTls13 = null;
     113
     114        if (null === $supportsTls13) {
     115            $supportsTls13 = defined('CURL_SSLVERSION_TLSv1_3')
     116                && (\CURL_SSLVERSION_TLSv1_3 & \curl_version()['features']);
     117        }
     118
     119        return $supportsTls13;
    73120    }
    74121
     
    148195            'appconnect_time' => \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME),
    149196        ] + \curl_getinfo($easy->handle);
    150         $ctx[self::CURL_VERSION_STR] = \curl_version()['version'];
     197        $ctx[self::CURL_VERSION_STR] = self::getCurlVersion();
    151198        $factory->release($easy);
    152199
     
    157204
    158205        return self::createRejection($easy, $ctx);
     206    }
     207
     208    private static function getCurlVersion(): string
     209    {
     210        static $curlVersion = null;
     211
     212        if (null === $curlVersion) {
     213            $curlVersion = \curl_version()['version'];
     214        }
     215
     216        return $curlVersion;
    159217    }
    160218
     
    195253        }
    196254
     255        $uri = $easy->request->getUri();
     256
     257        $sanitizedError = self::sanitizeCurlError($ctx['error'] ?? '', $uri);
     258
    197259        $message = \sprintf(
    198260            'cURL error %s: %s (%s)',
    199261            $ctx['errno'],
    200             $ctx['error'],
     262            $sanitizedError,
    201263            'see https://curl.haxx.se/libcurl/c/libcurl-errors.html'
    202264        );
    203         $uriString = (string) $easy->request->getUri();
    204         if ($uriString !== '' && false === \strpos($ctx['error'], $uriString)) {
    205             $message .= \sprintf(' for %s', $uriString);
     265
     266        if ('' !== $sanitizedError) {
     267            $redactedUriString = \GuzzleHttp\Psr7\Utils::redactUserInfo($uri)->__toString();
     268            if ($redactedUriString !== '' && false === \strpos($sanitizedError, $redactedUriString)) {
     269                $message .= \sprintf(' for %s', $redactedUriString);
     270            }
    206271        }
    207272
     
    212277
    213278        return P\Create::rejectionFor($error);
     279    }
     280
     281    private static function sanitizeCurlError(string $error, UriInterface $uri): string
     282    {
     283        if ('' === $error) {
     284            return $error;
     285        }
     286
     287        $baseUri = $uri->withQuery('')->withFragment('');
     288        $baseUriString = $baseUri->__toString();
     289
     290        if ('' === $baseUriString) {
     291            return $error;
     292        }
     293
     294        $redactedUriString = \GuzzleHttp\Psr7\Utils::redactUserInfo($baseUri)->__toString();
     295
     296        return str_replace($baseUriString, $redactedUriString, $error);
    214297    }
    215298
     
    233316
    234317        $version = $easy->request->getProtocolVersion();
    235         if ($version == 1.1) {
     318
     319        if ('2' === $version || '2.0' === $version) {
     320            $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0;
     321        } elseif ('1.1' === $version) {
    236322            $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_1;
    237         } elseif ($version == 2.0) {
    238             $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0;
    239323        } else {
    240324            $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_0;
     
    391475                // sets a matching 'Accept-Encoding' header.
    392476                $conf[\CURLOPT_ENCODING] = '';
    393                 // But as the user did not specify any acceptable encodings we need
    394                 // to overwrite this implicit header with an empty one.
     477                // But as the user did not specify any encoding preference,
     478                // let's leave it up to server by preventing curl from sending
     479                // the header, which will be interpreted as 'Accept-Encoding: *'.
     480                // https://www.rfc-editor.org/rfc/rfc9110#field.accept-encoding
    395481                $conf[\CURLOPT_HTTPHEADER][] = 'Accept-Encoding:';
    396482            }
     
    456542
    457543        if (isset($options['crypto_method'])) {
    458             if (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) {
    459                 if (!defined('CURL_SSLVERSION_TLSv1_0')) {
    460                     throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.0 not supported by your version of cURL');
    461                 }
     544            $protocolVersion = $easy->request->getProtocolVersion();
     545
     546            // If HTTP/2, upgrade TLS 1.0 and 1.1 to 1.2
     547            if ('2' === $protocolVersion || '2.0' === $protocolVersion) {
     548                if (
     549                    \STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']
     550                    || \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method']
     551                    || \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method']
     552                ) {
     553                    $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2;
     554                } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) {
     555                    if (!self::supportsTls13()) {
     556                        throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL');
     557                    }
     558                    $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_3;
     559                } else {
     560                    throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided');
     561                }
     562            } elseif (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) {
    462563                $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_0;
    463564            } elseif (\STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method']) {
    464                 if (!defined('CURL_SSLVERSION_TLSv1_1')) {
    465                     throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.1 not supported by your version of cURL');
    466                 }
    467565                $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_1;
    468566            } elseif (\STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method']) {
    469                 if (!defined('CURL_SSLVERSION_TLSv1_2')) {
     567                if (!self::supportsTls12()) {
    470568                    throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.2 not supported by your version of cURL');
    471569                }
    472570                $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2;
    473571            } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) {
    474                 if (!defined('CURL_SSLVERSION_TLSv1_3')) {
     572                if (!self::supportsTls13()) {
    475573                    throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL');
    476574                }
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php

    r3015851 r3122743  
    33namespace GuzzleHttp\Handler;
    44
     5use Closure;
    56use GuzzleHttp\Promise as P;
    67use GuzzleHttp\Promise\Promise;
     
    160161        }
    161162
     163        // Run curl_multi_exec in the queue to enable other async tasks to run
     164        P\Utils::queue()->add(Closure::fromCallable([$this, 'tickInQueue']));
     165
    162166        // Step through the task queue which may add additional requests.
    163167        P\Utils::queue()->run();
     
    170174
    171175        while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) {
     176            // Prevent busy looping for slow HTTP requests.
     177            \curl_multi_select($this->_mh, $this->selectTimeout);
    172178        }
    173179
    174180        $this->processMessages();
     181    }
     182
     183    /**
     184     * Runs \curl_multi_exec() inside the event loop, to prevent busy looping
     185     */
     186    private function tickInQueue(): void
     187    {
     188        if (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) {
     189            \curl_multi_select($this->_mh, 0);
     190            P\Utils::queue()->add(Closure::fromCallable([$this, 'tickInQueue']));
     191        }
    175192    }
    176193
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php

    r3015851 r3122743  
    5353     * @param callable|null $onRejected  Callback to invoke when the return value is rejected.
    5454     */
    55     public static function createWithMiddleware(array $queue = null, callable $onFulfilled = null, callable $onRejected = null): HandlerStack
     55    public static function createWithMiddleware(?array $queue = null, ?callable $onFulfilled = null, ?callable $onRejected = null): HandlerStack
    5656    {
    5757        return HandlerStack::create(new self($queue, $onFulfilled, $onRejected));
     
    6060    /**
    6161     * The passed in value must be an array of
    62      * {@see \Psr\Http\Message\ResponseInterface} objects, Exceptions,
     62     * {@see ResponseInterface} objects, Exceptions,
    6363     * callables, or Promises.
    6464     *
     
    6767     * @param callable|null          $onRejected  Callback to invoke when the return value is rejected.
    6868     */
    69     public function __construct(array $queue = null, callable $onFulfilled = null, callable $onRejected = null)
     69    public function __construct(?array $queue = null, ?callable $onFulfilled = null, ?callable $onRejected = null)
    7070    {
    7171        $this->onFulfilled = $onFulfilled;
     
    201201        RequestInterface $request,
    202202        array $options,
    203         ResponseInterface $response = null,
     203        ?ResponseInterface $response = null,
    204204        $reason = null
    205205    ): void {
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php

    r3015851 r3122743  
    3939        if (isset($options['delay'])) {
    4040            \usleep($options['delay'] * 1000);
     41        }
     42
     43        $protocolVersion = $request->getProtocolVersion();
     44
     45        if ('1.0' !== $protocolVersion && '1.1' !== $protocolVersion) {
     46            throw new ConnectException(sprintf('HTTP/%s is not supported by the stream handler.', $protocolVersion), $request);
    4147        }
    4248
     
    8490        RequestInterface $request,
    8591        ?float $startTime,
    86         ResponseInterface $response = null,
    87         \Throwable $error = null
     92        ?ResponseInterface $response = null,
     93        ?\Throwable $error = null
    8894    ): void {
    8995        if (isset($options['on_stats'])) {
     
    274280        // HTTP/1.1 streams using the PHP stream wrapper require a
    275281        // Connection: close header
    276         if ($request->getProtocolVersion() == '1.1'
     282        if ($request->getProtocolVersion() === '1.1'
    277283            && !$request->hasHeader('Connection')
    278284        ) {
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/HandlerStack.php

    r3015851 r3122743  
    4545     *                                                                            system will be utilized.
    4646     */
    47     public static function create(callable $handler = null): self
     47    public static function create(?callable $handler = null): self
    4848    {
    4949        $stack = new self($handler ?: Utils::chooseHandler());
     
    5959     * @param (callable(RequestInterface, array): PromiseInterface)|null $handler Underlying HTTP handler.
    6060     */
    61     public function __construct(callable $handler = null)
     61    public function __construct(?callable $handler = null)
    6262    {
    6363        $this->handler = $handler;
     
    132132     * @param string                       $name       Name to register for this middleware.
    133133     */
    134     public function unshift(callable $middleware, string $name = null): void
     134    public function unshift(callable $middleware, ?string $name = null): void
    135135    {
    136136        \array_unshift($this->stack, [$middleware, $name]);
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/MessageFormatter.php

    r3015851 r3122743  
    6969     * @param \Throwable|null        $error    Exception that was received
    7070     */
    71     public function format(RequestInterface $request, ResponseInterface $response = null, \Throwable $error = null): string
     71    public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string
    7272    {
    7373        $cache = [];
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php

    r3015851 r3122743  
    1515     * @param \Throwable|null        $error    Exception that was received
    1616     */
    17     public function format(RequestInterface $request, ResponseInterface $response = null, \Throwable $error = null): string;
     17    public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string;
    1818}
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/Middleware.php

    r3015851 r3122743  
    5656     * @return callable(callable): callable Returns a function that accepts the next handler.
    5757     */
    58     public static function httpErrors(BodySummarizerInterface $bodySummarizer = null): callable
     58    public static function httpErrors(?BodySummarizerInterface $bodySummarizer = null): callable
    5959    {
    6060        return static function (callable $handler) use ($bodySummarizer): callable {
     
    133133     * @return callable Returns a function that accepts the next handler.
    134134     */
    135     public static function tap(callable $before = null, callable $after = null): callable
     135    public static function tap(?callable $before = null, ?callable $after = null): callable
    136136    {
    137137        return static function (callable $handler) use ($before, $after): callable {
     
    177177     * @return callable Returns a function that accepts the next handler.
    178178     */
    179     public static function retry(callable $decider, callable $delay = null): callable
     179    public static function retry(callable $decider, ?callable $delay = null): callable
    180180    {
    181181        return static function (callable $handler) use ($decider, $delay): RetryMiddleware {
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php

    r3015851 r3122743  
    7777        $expect = $options['expect'] ?? null;
    7878
    79         // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0
    80         if ($expect === false || $request->getProtocolVersion() < 1.1) {
     79        // Return if disabled or using HTTP/1.0
     80        if ($expect === false || $request->getProtocolVersion() === '1.0') {
    8181            return;
    8282        }
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/RequestOptions.php

    r3015851 r3122743  
    6262     * jar to use or what cookies to send. This option only works if your
    6363     * handler has the `cookie` middleware. Valid values are `false` and
    64      * an instance of {@see \GuzzleHttp\Cookie\CookieJarInterface}.
     64     * an instance of {@see Cookie\CookieJarInterface}.
    6565     */
    6666    public const COOKIES = 'cookies';
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php

    r3015851 r3122743  
    4141     *                                                                         milliseconds to delay.
    4242     */
    43     public function __construct(callable $decider, callable $nextHandler, callable $delay = null)
     43    public function __construct(callable $decider, callable $nextHandler, ?callable $delay = null)
    4444    {
    4545        $this->decider = $decider;
     
    111111    }
    112112
    113     private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null): PromiseInterface
     113    private function doRetry(RequestInterface $request, array $options, ?ResponseInterface $response = null): PromiseInterface
    114114    {
    115115        $options['delay'] = ($this->delay)(++$options['retries'], $response, $request);
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/TransferStats.php

    r3015851 r3122743  
    4747    public function __construct(
    4848        RequestInterface $request,
    49         ResponseInterface $response = null,
    50         float $transferTime = null,
     49        ?ResponseInterface $response = null,
     50        ?float $transferTime = null,
    5151        $handlerErrorData = null,
    5252        array $handlerStats = []
  • moneroo/tags/v1.8/vendor/guzzlehttp/guzzle/src/Utils.php

    r3015851 r3122743  
    7272        }
    7373
    74         return \GuzzleHttp\Psr7\Utils::tryFopen('php://output', 'w');
     74        return Psr7\Utils::tryFopen('php://output', 'w');
    7575    }
    7676
     
    8888        $handler = null;
    8989
    90         if (\defined('CURLOPT_CUSTOMREQUEST')) {
     90        if (\defined('CURLOPT_CUSTOMREQUEST') && \function_exists('curl_version') && version_compare(curl_version()['version'], '7.34') >= 0) {
    9191            if (\function_exists('curl_multi_exec') && \function_exists('curl_exec')) {
    9292                $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler());
  • moneroo/tags/v1.8/vendor/guzzlehttp/promises/CHANGELOG.md

    r3015851 r3122743  
    11# CHANGELOG
     2
     3
     4## 2.0.3 - 2024-07-18
     5
     6### Changed
     7
     8- PHP 8.4 support
    29
    310
  • moneroo/tags/v1.8/vendor/guzzlehttp/promises/README.md

    r3015851 r3122743  
    3939## Version Guidance
    4040
    41 | Version | Status                 | PHP Version  |
    42 |---------|------------------------|--------------|
    43 | 1.x     | Bug and security fixes | >=5.5,<8.3   |
    44 | 2.x     | Latest                 | >=7.2.5,<8.4 |
     41| Version | Status              | PHP Version  |
     42|---------|---------------------|--------------|
     43| 1.x     | Security fixes only | >=5.5,<8.3   |
     44| 2.x     | Latest              | >=7.2.5,<8.5 |
    4545
    4646
  • moneroo/tags/v1.8/vendor/guzzlehttp/promises/composer.json

    r3015851 r3122743  
    3131    "require-dev": {
    3232        "bamarni/composer-bin-plugin": "^1.8.2",
    33         "phpunit/phpunit": "^8.5.36 || ^9.6.15"
     33        "phpunit/phpunit": "^8.5.39 || ^9.6.20"
    3434    },
    3535    "autoload": {
  • moneroo/tags/v1.8/vendor/guzzlehttp/promises/src/Coroutine.php

    r3015851 r3122743  
    8585
    8686    public function then(
    87         callable $onFulfilled = null,
    88         callable $onRejected = null
     87        ?callable $onFulfilled = null,
     88        ?callable $onRejected = null
    8989    ): PromiseInterface {
    9090        return $this->result->then($onFulfilled, $onRejected);
  • moneroo/tags/v1.8/vendor/guzzlehttp/promises/src/Each.php

    r3015851 r3122743  
    2424    public static function of(
    2525        $iterable,
    26         callable $onFulfilled = null,
    27         callable $onRejected = null
     26        ?callable $onFulfilled = null,
     27        ?callable $onRejected = null
    2828    ): PromiseInterface {
    2929        return (new EachPromise($iterable, [
     
    4747        $iterable,
    4848        $concurrency,
    49         callable $onFulfilled = null,
    50         callable $onRejected = null
     49        ?callable $onFulfilled = null,
     50        ?callable $onRejected = null
    5151    ): PromiseInterface {
    5252        return (new EachPromise($iterable, [
     
    6868        $iterable,
    6969        $concurrency,
    70         callable $onFulfilled = null
     70        ?callable $onFulfilled = null
    7171    ): PromiseInterface {
    7272        return self::ofLimit(
  • moneroo/tags/v1.8/vendor/guzzlehttp/promises/src/FulfilledPromise.php

    r3015851 r3122743  
    3232
    3333    public function then(
    34         callable $onFulfilled = null,
    35         callable $onRejected = null
     34        ?callable $onFulfilled = null,
     35        ?callable $onRejected = null
    3636    ): PromiseInterface {
    3737        // Return itself if there is no onFulfilled function.
  • moneroo/tags/v1.8/vendor/guzzlehttp/promises/src/Promise.php

    r3015851 r3122743  
    2626     */
    2727    public function __construct(
    28         callable $waitFn = null,
    29         callable $cancelFn = null
     28        ?callable $waitFn = null,
     29        ?callable $cancelFn = null
    3030    ) {
    3131        $this->waitFn = $waitFn;
     
    3434
    3535    public function then(
    36         callable $onFulfilled = null,
    37         callable $onRejected = null
     36        ?callable $onFulfilled = null,
     37        ?callable $onRejected = null
    3838    ): PromiseInterface {
    3939        if ($this->state === self::PENDING) {
  • moneroo/tags/v1.8/vendor/guzzlehttp/promises/src/PromiseInterface.php

    r3015851 r3122743  
    2828     */
    2929    public function then(
    30         callable $onFulfilled = null,
    31         callable $onRejected = null
     30        ?callable $onFulfilled = null,
     31        ?callable $onRejected = null
    3232    ): PromiseInterface;
    3333
  • moneroo/tags/v1.8/vendor/guzzlehttp/promises/src/RejectedPromise.php

    r3015851 r3122743  
    3232
    3333    public function then(
    34         callable $onFulfilled = null,
    35         callable $onRejected = null
     34        ?callable $onFulfilled = null,
     35        ?callable $onRejected = null
    3636    ): PromiseInterface {
    3737        // If there's no onRejected callback then just return self.
  • moneroo/tags/v1.8/vendor/guzzlehttp/promises/src/RejectionException.php

    r3015851 r3122743  
    1919     * @param string|null $description Optional description.
    2020     */
    21     public function __construct($reason, string $description = null)
     21    public function __construct($reason, ?string $description = null)
    2222    {
    2323        $this->reason = $reason;
  • moneroo/tags/v1.8/vendor/guzzlehttp/promises/src/Utils.php

    r3015851 r3122743  
    2222     * @param TaskQueueInterface|null $assign Optionally specify a new queue instance.
    2323     */
    24     public static function queue(TaskQueueInterface $assign = null): TaskQueueInterface
     24    public static function queue(?TaskQueueInterface $assign = null): TaskQueueInterface
    2525    {
    2626        static $queue;
  • moneroo/tags/v1.8/vendor/guzzlehttp/psr7/CHANGELOG.md

    r3015851 r3122743  
    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.7.0 - 2024-07-18
     9
     10### Added
     11
     12- Add `Utils::redactUserInfo()` method
     13- Add ability to encode bools as ints in `Query::build`
     14
     15## 2.6.3 - 2024-07-18
     16
     17### Fixed
     18
     19- Make `StreamWrapper::stream_stat()` return `false` if inner stream's size is `null`
     20
     21### Changed
     22
     23- PHP 8.4 support
    724
    825## 2.6.2 - 2023-12-03
  • moneroo/tags/v1.8/vendor/guzzlehttp/psr7/README.md

    r3015851 r3122743  
    2525| Version | Status              | PHP Version  |
    2626|---------|---------------------|--------------|
    27 | 1.x     | Security fixes only | >=5.4,<8.1   |
    28 | 2.x     | Latest              | >=7.2.5,<8.4 |
     27| 1.x     | EOL (2024-06-30)    | >=5.4,<8.2   |
     28| 2.x     | Latest              | >=7.2.5,<8.5 |
    2929
    3030
     
    437437## `GuzzleHttp\Psr7\Query::build`
    438438
    439 `public static function build(array $params, int|false $encoding = PHP_QUERY_RFC3986): string`
     439`public static function build(array $params, int|false $encoding = PHP_QUERY_RFC3986, bool $treatBoolsAsInts = true): string`
    440440
    441441Build a query string from an array of key value pairs.
     
    499499## `GuzzleHttp\Psr7\Utils::readLine`
    500500
    501 `public static function readLine(StreamInterface $stream, int $maxLength = null): string`
     501`public static function readLine(StreamInterface $stream, ?int $maxLength = null): string`
    502502
    503503Read a line from the stream up to the maximum allowed buffer length.
     504
     505
     506## `GuzzleHttp\Psr7\Utils::redactUserInfo`
     507
     508`public static function redactUserInfo(UriInterface $uri): UriInterface`
     509
     510Redact the password in the user info part of a URI.
    504511
    505512
     
    675682### `GuzzleHttp\Psr7\Uri::isSameDocumentReference`
    676683
    677 `public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool`
     684`public static function isSameDocumentReference(UriInterface $uri, ?UriInterface $base = null): bool`
    678685
    679686Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its
  • moneroo/tags/v1.8/vendor/guzzlehttp/psr7/composer.json

    r3015851 r3122743  
    6262    "require-dev": {
    6363        "bamarni/composer-bin-plugin": "^1.8.2",
    64         "http-interop/http-factory-tests": "^0.9",
    65         "phpunit/phpunit": "^8.5.36 || ^9.6.15"
     64        "http-interop/http-factory-tests": "0.9.0",
     65        "phpunit/phpunit": "^8.5.39 || ^9.6.20"
    6666    },
    6767    "suggest": {
  • moneroo/tags/v1.8/vendor/guzzlehttp/psr7/src/CachingStream.php

    r3015851 r3122743  
    3434    public function __construct(
    3535        StreamInterface $stream,
    36         StreamInterface $target = null
     36        ?StreamInterface $target = null
    3737    ) {
    3838        $this->remoteStream = $stream;
  • moneroo/tags/v1.8/vendor/guzzlehttp/psr7/src/HttpFactory.php

    r3015851 r3122743  
    2828    public function createUploadedFile(
    2929        StreamInterface $stream,
    30         int $size = null,
     30        ?int $size = null,
    3131        int $error = \UPLOAD_ERR_OK,
    32         string $clientFilename = null,
    33         string $clientMediaType = null
     32        ?string $clientFilename = null,
     33        ?string $clientMediaType = null
    3434    ): UploadedFileInterface {
    3535        if ($size === null) {
  • moneroo/tags/v1.8/vendor/guzzlehttp/psr7/src/MultipartStream.php

    r3015851 r3122743  
    3333     * @throws \InvalidArgumentException
    3434     */
    35     public function __construct(array $elements = [], string $boundary = null)
     35    public function __construct(array $elements = [], ?string $boundary = null)
    3636    {
    3737        $this->boundary = $boundary ?: bin2hex(random_bytes(20));
  • moneroo/tags/v1.8/vendor/guzzlehttp/psr7/src/Query.php

    r3015851 r3122743  
    6464     * encountered (like `http_build_query()` would).
    6565     *
    66      * @param array     $params   Query string parameters.
    67      * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
    68      *                            to encode using RFC3986, or PHP_QUERY_RFC1738
    69      *                            to encode using RFC1738.
     66     * @param array     $params           Query string parameters.
     67     * @param int|false $encoding         Set to false to not encode,
     68     *                                    PHP_QUERY_RFC3986 to encode using
     69     *                                    RFC3986, or PHP_QUERY_RFC1738 to
     70     *                                    encode using RFC1738.
     71     * @param bool      $treatBoolsAsInts Set to true to encode as 0/1, and
     72     *                                    false as false/true.
    7073     */
    71     public static function build(array $params, $encoding = PHP_QUERY_RFC3986): string
     74    public static function build(array $params, $encoding = PHP_QUERY_RFC3986, bool $treatBoolsAsInts = true): string
    7275    {
    7376        if (!$params) {
     
    8790        }
    8891
     92        $castBool = $treatBoolsAsInts ? static function ($v) { return (int) $v; } : static function ($v) { return $v ? 'true' : 'false'; };
     93
    8994        $qs = '';
    9095        foreach ($params as $k => $v) {
     
    9297            if (!is_array($v)) {
    9398                $qs .= $k;
    94                 $v = is_bool($v) ? (int) $v : $v;
     99                $v = is_bool($v) ? $castBool($v) : $v;
    95100                if ($v !== null) {
    96101                    $qs .= '='.$encoder((string) $v);
     
    100105                foreach ($v as $vv) {
    101106                    $qs .= $k;
    102                     $vv = is_bool($vv) ? (int) $vv : $vv;
     107                    $vv = is_bool($vv) ? $castBool($vv) : $vv;
    103108                    if ($vv !== null) {
    104109                        $qs .= '='.$encoder((string) $vv);
  • moneroo/tags/v1.8/vendor/guzzlehttp/psr7/src/Response.php

    r3015851 r3122743  
    9797        $body = null,
    9898        string $version = '1.1',
    99         string $reason = null
     99        ?string $reason = null
    100100    ) {
    101101        $this->assertStatusCodeRange($status);
  • moneroo/tags/v1.8/vendor/guzzlehttp/psr7/src/StreamWrapper.php

    r3015851 r3122743  
    7070    }
    7171
    72     public function stream_open(string $path, string $mode, int $options, string &$opened_path = null): bool
     72    public function stream_open(string $path, string $mode, int $options, ?string &$opened_path = null): bool
    7373    {
    7474        $options = stream_context_get_options($this->context);
     
    120120
    121121        return $resource ?? false;
     122    }
     123
     124    /**
     125     * @return array{
     126     *   dev: int,
     127     *   ino: int,
     128     *   mode: int,
     129     *   nlink: int,
     130     *   uid: int,
     131     *   gid: int,
     132     *   rdev: int,
     133     *   size: int,
     134     *   atime: int,
     135     *   mtime: int,
     136     *   ctime: int,
     137     *   blksize: int,
     138     *   blocks: int
     139     * }|false
     140     */
     141    public function stream_stat()
     142    {
     143        if ($this->stream->getSize() === null) {
     144            return false;
     145        }
     146
     147        static $modeMap = [
     148            'r' => 33060,
     149            'rb' => 33060,
     150            'r+' => 33206,
     151            'w' => 33188,
     152            'wb' => 33188,
     153        ];
     154
     155        return [
     156            'dev' => 0,
     157            'ino' => 0,
     158            'mode' => $modeMap[$this->mode],
     159            'nlink' => 0,
     160            'uid' => 0,
     161            'gid' => 0,
     162            'rdev' => 0,
     163            'size' => $this->stream->getSize() ?: 0,
     164            'atime' => 0,
     165            'mtime' => 0,
     166            'ctime' => 0,
     167            'blksize' => 0,
     168            'blocks' => 0,
     169        ];
    122170    }
    123171
     
    139187     * }
    140188     */
    141     public function stream_stat(): array
    142     {
    143         static $modeMap = [
    144             'r' => 33060,
    145             'rb' => 33060,
    146             'r+' => 33206,
    147             'w' => 33188,
    148             'wb' => 33188,
    149         ];
    150 
    151         return [
    152             'dev' => 0,
    153             'ino' => 0,
    154             'mode' => $modeMap[$this->mode],
    155             'nlink' => 0,
    156             'uid' => 0,
    157             'gid' => 0,
    158             'rdev' => 0,
    159             'size' => $this->stream->getSize() ?: 0,
    160             'atime' => 0,
    161             'mtime' => 0,
    162             'ctime' => 0,
    163             'blksize' => 0,
    164             'blocks' => 0,
    165         ];
    166     }
    167 
    168     /**
    169      * @return array{
    170      *   dev: int,
    171      *   ino: int,
    172      *   mode: int,
    173      *   nlink: int,
    174      *   uid: int,
    175      *   gid: int,
    176      *   rdev: int,
    177      *   size: int,
    178      *   atime: int,
    179      *   mtime: int,
    180      *   ctime: int,
    181      *   blksize: int,
    182      *   blocks: int
    183      * }
    184      */
    185189    public function url_stat(string $path, int $flags): array
    186190    {
  • moneroo/tags/v1.8/vendor/guzzlehttp/psr7/src/UploadedFile.php

    r3015851 r3122743  
    6565        ?int $size,
    6666        int $errorStatus,
    67         string $clientFilename = null,
    68         string $clientMediaType = null
     67        ?string $clientFilename = null,
     68        ?string $clientMediaType = null
    6969    ) {
    7070        $this->setError($errorStatus);
  • moneroo/tags/v1.8/vendor/guzzlehttp/psr7/src/Uri.php

    r3015851 r3122743  
    280280     * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.4
    281281     */
    282     public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool
     282    public static function isSameDocumentReference(UriInterface $uri, ?UriInterface $base = null): bool
    283283    {
    284284        if ($base !== null) {
  • moneroo/tags/v1.8/vendor/guzzlehttp/psr7/src/Utils.php

    r3015851 r3122743  
    232232     * @param int|null        $maxLength Maximum buffer length
    233233     */
    234     public static function readLine(StreamInterface $stream, int $maxLength = null): string
     234    public static function readLine(StreamInterface $stream, ?int $maxLength = null): string
    235235    {
    236236        $buffer = '';
     
    249249
    250250        return $buffer;
     251    }
     252
     253    /**
     254     * Redact the password in the user info part of a URI.
     255     */
     256    public static function redactUserInfo(UriInterface $uri): UriInterface
     257    {
     258        $userInfo = $uri->getUserInfo();
     259
     260        if (false !== ($pos = \strpos($userInfo, ':'))) {
     261            return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***');
     262        }
     263
     264        return $uri;
    251265    }
    252266
  • moneroo/tags/v1.8/vendor/psr/http-factory/composer.json

    r3015851 r3122743  
    11{
    22    "name": "psr/http-factory",
    3     "description": "Common interfaces for PSR-7 HTTP message factories",
     3    "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories",
    44    "keywords": [
    55        "psr",
     
    1919        }
    2020    ],
     21    "support": {
     22        "source": "https://github.com/php-fig/http-factory"
     23    },
    2124    "require": {
    22         "php": ">=7.0.0",
     25        "php": ">=7.1",
    2326        "psr/http-message": "^1.0 || ^2.0"
    2427    },
  • moneroo/tags/v1.8/vendor/psr/http-factory/src/UploadedFileFactoryInterface.php

    r3015851 r3122743  
    1616     * @param StreamInterface $stream Underlying stream representing the
    1717     *     uploaded file content.
    18      * @param int $size in bytes
     18     * @param int|null $size in bytes
    1919     * @param int $error PHP file upload error
    20      * @param string $clientFilename Filename as provided by the client, if any.
    21      * @param string $clientMediaType Media type as provided by the client, if any.
     20     * @param string|null $clientFilename Filename as provided by the client, if any.
     21     * @param string|null $clientMediaType Media type as provided by the client, if any.
    2222     *
    2323     * @return UploadedFileInterface
     
    2727    public function createUploadedFile(
    2828        StreamInterface $stream,
    29         int $size = null,
     29        ?int $size = null,
    3030        int $error = \UPLOAD_ERR_OK,
    31         string $clientFilename = null,
    32         string $clientMediaType = null
     31        ?string $clientFilename = null,
     32        ?string $clientMediaType = null
    3333    ): UploadedFileInterface;
    3434}
  • moneroo/tags/v1.8/vendor/symfony/deprecation-contracts/README.md

    r3057581 r3122743  
    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.
  • moneroo/tags/v1.8/vendor/symfony/deprecation-contracts/composer.json

    r3057581 r3122743  
    1616    ],
    1717    "require": {
    18         "php": ">=8.1"
     18        "php": ">=7.1"
    1919    },
    2020    "autoload": {
     
    2626    "extra": {
    2727        "branch-alias": {
    28             "dev-main": "3.4-dev"
     28            "dev-main": "2.5-dev"
    2929        },
    3030        "thanks": {
  • moneroo/tags/v1.8/vendor/symfony/deprecation-contracts/function.php

    r3057581 r3122743  
    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);
  • moneroo/trunk/moneroo-for-woocommerce.php

    r3057581 r3122743  
    1111 * License: GPLv2
    1212 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
    13  * Version: v1.7
     13 * Version: v1.8
    1414 * Requires at least: 4.9
    15  * Tested up to: 6.4
     15 * Tested up to: 6.6
    1616 * WC requires at least: 5.3
    17  * WC tested up to: 8.3
     17 * WC tested up to: 9.1
    1818 * Text Domain: moneroo-for-woocommerce
    1919 * Domain Path: /languages.
    2020 */
    2121
     22const MONEROO_WC_MAIN_FILE = __FILE__;
     23const MONEROO_WC__VERSION = 'v1.8';
    2224
    2325
     
    3133    return;
    3234}
     35
    3336
    3437// Include the Composer autoload file
     
    8285}
    8386
     87
     88
    8489/**
    8590 * Load the plugin text domain for translations.
     
    95100register_activation_hook(__FILE__, 'moneroo_wc_generate_webhook_secret');
    96101add_action('plugins_loaded', 'moneroo_wc_load_plugin_textdomain');
     102
     103/**
     104 * Declare the HPOS compatibility
     105 */
     106add_action(
     107    'before_woocommerce_init',
     108    function () {
     109        if (class_exists(\Automattic\WooCommerce\Utilities\FeaturesUtil::class)) {
     110            \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', __FILE__, true);
     111        }
     112        if (class_exists('\Automattic\WooCommerce\Utilities\FeaturesUtil')) {
     113            \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility(
     114                'cart_checkout_blocks',
     115                __FILE__,
     116                true
     117            );
     118        }
     119    }
     120);
     121
     122/**
     123 * Registers WooCommerce Blocks integration.
     124 */
     125function moneroo_gateway_woocommerce_block_support()
     126{
     127
     128    if (class_exists(\Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType::class)) {
     129
     130        require_once __DIR__ . '/src/Moneroo_WC_Gateway_Blocks.php';
     131
     132        add_action(
     133            'woocommerce_blocks_payment_method_type_registration',
     134            static function (Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry $payment_method_registry) {
     135                $payment_method_registry->register(new \Moneroo\WooCommerce\Moneroo_WC_Gateway_Blocks());
     136            }
     137        );
     138    }
     139}
     140add_action('woocommerce_blocks_loaded', 'moneroo_gateway_woocommerce_block_support');
  • moneroo/trunk/readme.txt

    r3057581 r3122743  
    55Requires at least: 4.9
    66Tested up to: 6.4
    7 Stable tag: v1.7
     7Stable tag: v1.8
    88Requires PHP: 7.4
    99License: GPLv3
  • moneroo/trunk/src/Moneroo_WC_Gateway.php

    r3057581 r3122743  
    1515use function is_admin;
    1616
    17 use Moneroo\Payment;
    1817use Moneroo\WooCommerce\Handlers\Moneroo_WC_Payment_Handler;
    1918
     
    2625use function wc_get_logger;
    2726use function wc_get_order;
    28 use function wp_enqueue_style;
    2927use function wp_redirect;
    30 use function wp_register_style;
    3128
    3229if (! defined('ABSPATH')) {
     
    3835class Moneroo_WC_Gateway extends \WC_Payment_Gateway
    3936{
    40     public Payment $moneroo;
     37    public \Moneroo\Payment $moneroo;
    4138
    4239    public array $moneroo_wc_moneroo_wc_config = [];
     40
     41    public ?string $moneroo_wc_public_key = null;
    4342
    4443    public ?string $moneroo_wc_private_key = null;
     
    5049        $this->moneroo_wc_initialize_settings();
    5150        $this->moneroo_wc_register_filters();
    52         $this->moneroo_wc_load_custom_css_styles();
    5351        $this->moneroo_wc_check_if_webhook_secret_is_set_or_generate();
    5452        if ($this->moneroo_wc_keys_are_set()) {
     
    120118    public function moneroo_wc_load_moneroo(): void
    121119    {
    122         $this->moneroo = new Payment(
     120        $this->moneroo = new \Moneroo\Payment(
     121            $this->moneroo_wc_public_key,
    123122            $this->moneroo_wc_private_key,
    124123        );
     
    133132    {
    134133        $order = wc_get_order($order_id);
     134
    135135        if (! $this->moneroo_wc_check_if_gateway_is_available()) {
    136136            wc_add_notice(
     
    154154                'first_name' => $order->get_billing_first_name(),
    155155                'last_name'  => $order->get_billing_last_name(),
    156                 'phone'      => empty($order->get_billing_phone()) ? null : (int) $order->get_billing_phone(),
    157                 'address'    => $order->get_billing_address_1(),
     156                'phone'      => empty($order->get_billing_phone()) ? null : (int) $order->get_billing_phone(),                'address'    => $order->get_billing_address_1(),
    158157                'city'       => $order->get_billing_city(),
    159158                'state'      => $order->get_billing_state(),
     
    304303    }
    305304
    306     // Load custom CSS styles.
    307     public function moneroo_wc_load_custom_css_styles(): void
    308     {
    309         wp_register_style('custom-moneroo-style', plugins_url('../assets/css/style.css', __FILE__));
    310         wp_enqueue_style('custom-moneroo-style');
    311     }
    312 
    313305    /**
    314306     * Load plugin text domain.
     
    348340        }
    349341
    350         return ! ($this->moneroo_wc_keys_are_set() === false);
     342        return $this->moneroo_wc_keys_are_set();
    351343    }
    352344
  • moneroo/trunk/src/Settings/moneroo-settings.php

    r3057581 r3122743  
    1717        'description' => '',
    1818        'default'     => 'yes',
     19        'desc_tip'    => true,
    1920    ],
    2021    'title' => [
     
    3334        'desc_tip'    => true,
    3435    ],
     36    'moneroo_wc_public_key' => [
     37        'title'       => esc_html__('Public KEY', 'moneroo-woocommerce'),
     38        'type'        => 'password',
     39        'description' => esc_html__('Get your API keys from your Moneroo dashboard', 'moneroo-woocommerce'),
     40    ],
    3541    'moneroo_wc_private_key' => [
    3642        'title'       => esc_html__('Private KEY', 'moneroo-woocommerce'),
    3743        'type'        => 'password',
    38         'desc_tip'    => true,
    3944        'description' => esc_html__('Get your API keys from your Moneroo dashboard', 'moneroo-woocommerce'),
    4045    ],
  • moneroo/trunk/vendor/composer/autoload_classmap.php

    r3015851 r3122743  
    111111    'Moneroo\\WooCommerce\\Handlers\\Moneroo_WC_Payment_Handler' => $baseDir . '/src/Handlers/Moneroo_WC_Payment_Handler.php',
    112112    'Moneroo\\WooCommerce\\Moneroo_WC_Gateway' => $baseDir . '/src/Moneroo_WC_Gateway.php',
     113    'Moneroo\\WooCommerce\\Moneroo_WC_Gateway_Blocks' => $baseDir . '/src/Moneroo_WC_Gateway_Blocks.php',
    113114    'Psr\\Http\\Client\\ClientExceptionInterface' => $vendorDir . '/psr/http-client/src/ClientExceptionInterface.php',
    114115    'Psr\\Http\\Client\\ClientInterface' => $vendorDir . '/psr/http-client/src/ClientInterface.php',
  • moneroo/trunk/vendor/composer/autoload_static.php

    r3057581 r3122743  
    169169        'Moneroo\\WooCommerce\\Handlers\\Moneroo_WC_Payment_Handler' => __DIR__ . '/../..' . '/src/Handlers/Moneroo_WC_Payment_Handler.php',
    170170        'Moneroo\\WooCommerce\\Moneroo_WC_Gateway' => __DIR__ . '/../..' . '/src/Moneroo_WC_Gateway.php',
     171        'Moneroo\\WooCommerce\\Moneroo_WC_Gateway_Blocks' => __DIR__ . '/../..' . '/src/Moneroo_WC_Gateway_Blocks.php',
    171172        'Psr\\Http\\Client\\ClientExceptionInterface' => __DIR__ . '/..' . '/psr/http-client/src/ClientExceptionInterface.php',
    172173        'Psr\\Http\\Client\\ClientInterface' => __DIR__ . '/..' . '/psr/http-client/src/ClientInterface.php',
  • moneroo/trunk/vendor/composer/installed.json

    r3057581 r3122743  
    33        {
    44            "name": "guzzlehttp/guzzle",
    5             "version": "7.8.1",
    6             "version_normalized": "7.8.1.0",
     5            "version": "7.9.1",
     6            "version_normalized": "7.9.1.0",
    77            "source": {
    88                "type": "git",
    99                "url": "https://github.com/guzzle/guzzle.git",
    10                 "reference": "41042bc7ab002487b876a0683fc8dce04ddce104"
    11             },
    12             "dist": {
    13                 "type": "zip",
    14                 "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104",
    15                 "reference": "41042bc7ab002487b876a0683fc8dce04ddce104",
     10                "reference": "a629e5b69db96eb4939c1b34114130077dd4c6fc"
     11            },
     12            "dist": {
     13                "type": "zip",
     14                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a629e5b69db96eb4939c1b34114130077dd4c6fc",
     15                "reference": "a629e5b69db96eb4939c1b34114130077dd4c6fc",
    1616                "shasum": ""
    1717            },
    1818            "require": {
    1919                "ext-json": "*",
    20                 "guzzlehttp/promises": "^1.5.3 || ^2.0.1",
    21                 "guzzlehttp/psr7": "^1.9.1 || ^2.5.1",
     20                "guzzlehttp/promises": "^1.5.3 || ^2.0.3",
     21                "guzzlehttp/psr7": "^2.7.0",
    2222                "php": "^7.2.5 || ^8.0",
    2323                "psr/http-client": "^1.0",
     
    3030                "bamarni/composer-bin-plugin": "^1.8.2",
    3131                "ext-curl": "*",
    32                 "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
     32                "guzzle/client-integration-tests": "3.0.2",
    3333                "php-http/message-factory": "^1.1",
    34                 "phpunit/phpunit": "^8.5.36 || ^9.6.15",
     34                "phpunit/phpunit": "^8.5.39 || ^9.6.20",
    3535                "psr/log": "^1.1 || ^2.0 || ^3.0"
    3636            },
     
    4040                "psr/log": "Required for using the Log middleware"
    4141            },
    42             "time": "2023-12-03T20:35:24+00:00",
     42            "time": "2024-07-19T16:19:57+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.8.1"
     114                "source": "https://github.com/guzzle/guzzle/tree/7.9.1"
    115115            },
    116116            "funding": [
     
    132132        {
    133133            "name": "guzzlehttp/promises",
    134             "version": "2.0.2",
    135             "version_normalized": "2.0.2.0",
     134            "version": "2.0.3",
     135            "version_normalized": "2.0.3.0",
    136136            "source": {
    137137                "type": "git",
    138138                "url": "https://github.com/guzzle/promises.git",
    139                 "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223"
    140             },
    141             "dist": {
    142                 "type": "zip",
    143                 "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223",
    144                 "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223",
     139                "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8"
     140            },
     141            "dist": {
     142                "type": "zip",
     143                "url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8",
     144                "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8",
    145145                "shasum": ""
    146146            },
     
    150150            "require-dev": {
    151151                "bamarni/composer-bin-plugin": "^1.8.2",
    152                 "phpunit/phpunit": "^8.5.36 || ^9.6.15"
    153             },
    154             "time": "2023-12-03T20:19:20+00:00",
     152                "phpunit/phpunit": "^8.5.39 || ^9.6.20"
     153            },
     154            "time": "2024-07-18T10:29:17+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.2"
     200                "source": "https://github.com/guzzle/promises/tree/2.0.3"
    201201            },
    202202            "funding": [
     
    218218        {
    219219            "name": "guzzlehttp/psr7",
    220             "version": "2.6.2",
    221             "version_normalized": "2.6.2.0",
     220            "version": "2.7.0",
     221            "version_normalized": "2.7.0.0",
    222222            "source": {
    223223                "type": "git",
    224224                "url": "https://github.com/guzzle/psr7.git",
    225                 "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221"
    226             },
    227             "dist": {
    228                 "type": "zip",
    229                 "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221",
    230                 "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221",
     225                "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201"
     226            },
     227            "dist": {
     228                "type": "zip",
     229                "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
     230                "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
    231231                "shasum": ""
    232232            },
     
    243243            "require-dev": {
    244244                "bamarni/composer-bin-plugin": "^1.8.2",
    245                 "http-interop/http-factory-tests": "^0.9",
    246                 "phpunit/phpunit": "^8.5.36 || ^9.6.15"
     245                "http-interop/http-factory-tests": "0.9.0",
     246                "phpunit/phpunit": "^8.5.39 || ^9.6.20"
    247247            },
    248248            "suggest": {
    249249                "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
    250250            },
    251             "time": "2023-12-03T20:05:35+00:00",
     251            "time": "2024-07-18T11:15:46+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.6.2"
     319                "source": "https://github.com/guzzle/psr7/tree/2.7.0"
    320320            },
    321321            "funding": [
     
    456456        {
    457457            "name": "psr/http-factory",
    458             "version": "1.0.2",
    459             "version_normalized": "1.0.2.0",
     458            "version": "1.1.0",
     459            "version_normalized": "1.1.0.0",
    460460            "source": {
    461461                "type": "git",
    462462                "url": "https://github.com/php-fig/http-factory.git",
    463                 "reference": "e616d01114759c4c489f93b099585439f795fe35"
    464             },
    465             "dist": {
    466                 "type": "zip",
    467                 "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35",
    468                 "reference": "e616d01114759c4c489f93b099585439f795fe35",
    469                 "shasum": ""
    470             },
    471             "require": {
    472                 "php": ">=7.0.0",
     463                "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a"
     464            },
     465            "dist": {
     466                "type": "zip",
     467                "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
     468                "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
     469                "shasum": ""
     470            },
     471            "require": {
     472                "php": ">=7.1",
    473473                "psr/http-message": "^1.0 || ^2.0"
    474474            },
    475             "time": "2023-04-10T20:10:41+00:00",
     475            "time": "2024-04-15T12:06:14+00:00",
    476476            "type": "library",
    477477            "extra": {
     
    496496                }
    497497            ],
    498             "description": "Common interfaces for PSR-7 HTTP message factories",
     498            "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories",
    499499            "keywords": [
    500500                "factory",
     
    508508            ],
    509509            "support": {
    510                 "source": "https://github.com/php-fig/http-factory/tree/1.0.2"
     510                "source": "https://github.com/php-fig/http-factory"
    511511            },
    512512            "install-path": "../psr/http-factory"
     
    617617        {
    618618            "name": "symfony/deprecation-contracts",
    619             "version": "v3.4.0",
    620             "version_normalized": "3.4.0.0",
     619            "version": "v2.5.3",
     620            "version_normalized": "2.5.3.0",
    621621            "source": {
    622622                "type": "git",
    623623                "url": "https://github.com/symfony/deprecation-contracts.git",
    624                 "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf"
    625             },
    626             "dist": {
    627                 "type": "zip",
    628                 "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf",
    629                 "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf",
    630                 "shasum": ""
    631             },
    632             "require": {
    633                 "php": ">=8.1"
    634             },
    635             "time": "2023-05-23T14:45:45+00:00",
     624                "reference": "80d075412b557d41002320b96a096ca65aa2c98d"
     625            },
     626            "dist": {
     627                "type": "zip",
     628                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d",
     629                "reference": "80d075412b557d41002320b96a096ca65aa2c98d",
     630                "shasum": ""
     631            },
     632            "require": {
     633                "php": ">=7.1"
     634            },
     635            "time": "2023-01-24T14:02:46+00:00",
    636636            "type": "library",
    637637            "extra": {
    638638                "branch-alias": {
    639                     "dev-main": "3.4-dev"
     639                    "dev-main": "2.5-dev"
    640640                },
    641641                "thanks": {
     
    667667            "homepage": "https://symfony.com",
    668668            "support": {
    669                 "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0"
     669                "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.3"
    670670            },
    671671            "funding": [
  • moneroo/trunk/vendor/composer/installed.php

    r3057581 r3122743  
    22    'root' => array(
    33        'name' => 'moneroo/moneroo-woocommerce',
    4         'pretty_version' => 'v1.7',
    5         'version' => '1.7.0.0',
    6         'reference' => '98bd4ad51c131e991039a1facb0d8c3ba7fef204',
     4        'pretty_version' => 'v1.8',
     5        'version' => '1.8.0.0',
     6        'reference' => '6ee4b7e9bcf7aeb31d2a67a5b9161adcc8fd4591',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'guzzlehttp/guzzle' => array(
    14             'pretty_version' => '7.8.1',
    15             'version' => '7.8.1.0',
    16             'reference' => '41042bc7ab002487b876a0683fc8dce04ddce104',
     14            'pretty_version' => '7.9.1',
     15            'version' => '7.9.1.0',
     16            'reference' => 'a629e5b69db96eb4939c1b34114130077dd4c6fc',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
     
    2121        ),
    2222        'guzzlehttp/promises' => array(
    23             'pretty_version' => '2.0.2',
    24             'version' => '2.0.2.0',
    25             'reference' => 'bbff78d96034045e58e13dedd6ad91b5d1253223',
     23            'pretty_version' => '2.0.3',
     24            'version' => '2.0.3.0',
     25            'reference' => '6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8',
    2626            'type' => 'library',
    2727            'install_path' => __DIR__ . '/../guzzlehttp/promises',
     
    3030        ),
    3131        'guzzlehttp/psr7' => array(
    32             'pretty_version' => '2.6.2',
    33             'version' => '2.6.2.0',
    34             'reference' => '45b30f99ac27b5ca93cb4831afe16285f57b8221',
     32            'pretty_version' => '2.7.0',
     33            'version' => '2.7.0.0',
     34            'reference' => 'a70f5c95fb43bc83f07c9c948baa0dc1829bf201',
    3535            'type' => 'library',
    3636            'install_path' => __DIR__ . '/../guzzlehttp/psr7',
     
    4848        ),
    4949        'moneroo/moneroo-woocommerce' => array(
    50             'pretty_version' => 'v1.7',
    51             'version' => '1.7.0.0',
    52             'reference' => '98bd4ad51c131e991039a1facb0d8c3ba7fef204',
     50            'pretty_version' => 'v1.8',
     51            'version' => '1.8.0.0',
     52            'reference' => '6ee4b7e9bcf7aeb31d2a67a5b9161adcc8fd4591',
    5353            'type' => 'library',
    5454            'install_path' => __DIR__ . '/../../',
     
    7272        ),
    7373        'psr/http-factory' => array(
    74             'pretty_version' => '1.0.2',
    75             'version' => '1.0.2.0',
    76             'reference' => 'e616d01114759c4c489f93b099585439f795fe35',
     74            'pretty_version' => '1.1.0',
     75            'version' => '1.1.0.0',
     76            'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a',
    7777            'type' => 'library',
    7878            'install_path' => __DIR__ . '/../psr/http-factory',
     
    111111        ),
    112112        'symfony/deprecation-contracts' => array(
    113             'pretty_version' => 'v3.4.0',
    114             'version' => '3.4.0.0',
    115             'reference' => '7c3aff79d10325257a001fcf92d991f24fc967cf',
     113            'pretty_version' => 'v2.5.3',
     114            'version' => '2.5.3.0',
     115            'reference' => '80d075412b557d41002320b96a096ca65aa2c98d',
    116116            'type' => 'library',
    117117            'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
  • moneroo/trunk/vendor/composer/platform_check.php

    r3057581 r3122743  
    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 >= 70400)) {
     8    $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.';
    99}
    1010
  • moneroo/trunk/vendor/guzzlehttp/guzzle/CHANGELOG.md

    r3015851 r3122743  
    22
    33Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version.
     4
     5
     6## 7.9.1 - 2024-07-19
     7
     8### Fixed
     9
     10- Fix TLS 1.3 check for HTTP/2 requests
     11
     12
     13## 7.9.0 - 2024-07-18
     14
     15### Changed
     16
     17- Improve protocol version checks to provide feedback around unsupported protocols
     18- Only select the cURL handler by default if 7.34.0 or higher is linked
     19- Improved `CurlMultiHandler` to avoid busy wait if possible
     20- Dropped support for EOL `guzzlehttp/psr7` v1
     21- Improved URI user info redaction in errors
     22
     23## 7.8.2 - 2024-07-18
     24
     25### Added
     26
     27- Support for PHP 8.4
    428
    529
  • moneroo/trunk/vendor/guzzlehttp/guzzle/README.md

    r3015851 r3122743  
    6363| Version | Status              | Packagist           | Namespace    | Repo                | Docs                | PSR-7 | PHP Version  |
    6464|---------|---------------------|---------------------|--------------|---------------------|---------------------|-------|--------------|
    65 | 3.x     | EOL                 | `guzzle/guzzle`     | `Guzzle`     | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No    | >=5.3.3,<7.0 |
    66 | 4.x     | EOL                 | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A                 | No    | >=5.4,<7.0   |
    67 | 5.x     | EOL                 | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No    | >=5.4,<7.4   |
    68 | 6.x     | Security fixes only | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes   | >=5.5,<8.0   |
    69 | 7.x     | Latest              | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes   | >=7.2.5,<8.4 |
     65| 3.x     | EOL (2016-10-31)    | `guzzle/guzzle`     | `Guzzle`     | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No    | >=5.3.3,<7.0 |
     66| 4.x     | EOL (2016-10-31)    | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A                 | No    | >=5.4,<7.0   |
     67| 5.x     | EOL (2019-10-31)    | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No    | >=5.4,<7.4   |
     68| 6.x     | EOL (2023-10-31)    | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes   | >=5.5,<8.0   |
     69| 7.x     | Latest              | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes   | >=7.2.5,<8.5 |
    7070
    7171[guzzle-3-repo]: https://github.com/guzzle/guzzle3
  • moneroo/trunk/vendor/guzzlehttp/guzzle/composer.json

    r3015851 r3122743  
    5151        }
    5252    ],
     53    "repositories": [
     54        {
     55            "type": "package",
     56            "package": {
     57                "name": "guzzle/client-integration-tests",
     58                "version": "v3.0.2",
     59                "dist": {
     60                    "url": "https://codeload.github.com/guzzle/client-integration-tests/zip/2c025848417c1135031fdf9c728ee53d0a7ceaee",
     61                    "type": "zip"
     62                },
     63                "require": {
     64                    "php": "^7.2.5 || ^8.0",
     65                    "phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.11",
     66                    "php-http/message": "^1.0 || ^2.0",
     67                    "guzzlehttp/psr7": "^1.7 || ^2.0",
     68                    "th3n3rd/cartesian-product": "^0.3"
     69                },
     70                "autoload": {
     71                    "psr-4": {
     72                        "Http\\Client\\Tests\\": "src/"
     73                    }
     74                },
     75                "bin": [
     76                    "bin/http_test_server"
     77                ]
     78            }
     79        }
     80    ],
    5381    "require": {
    5482        "php": "^7.2.5 || ^8.0",
    5583        "ext-json": "*",
    56         "guzzlehttp/promises": "^1.5.3 || ^2.0.1",
    57         "guzzlehttp/psr7": "^1.9.1 || ^2.5.1",
     84        "guzzlehttp/promises": "^1.5.3 || ^2.0.3",
     85        "guzzlehttp/psr7": "^2.7.0",
    5886        "psr/http-client": "^1.0",
    5987        "symfony/deprecation-contracts": "^2.2 || ^3.0"
     
    6593        "ext-curl": "*",
    6694        "bamarni/composer-bin-plugin": "^1.8.2",
    67         "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
     95        "guzzle/client-integration-tests": "3.0.2",
    6896        "php-http/message-factory": "^1.1",
    69         "phpunit/phpunit": "^8.5.36 || ^9.6.15",
     97        "phpunit/phpunit": "^8.5.39 || ^9.6.20",
    7098        "psr/log": "^1.1 || ^2.0 || ^3.0"
    7199    },
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/BodySummarizer.php

    r3015851 r3122743  
    1212    private $truncateAt;
    1313
    14     public function __construct(int $truncateAt = null)
     14    public function __construct(?int $truncateAt = null)
    1515    {
    1616        $this->truncateAt = $truncateAt;
     
    2323    {
    2424        return $this->truncateAt === null
    25             ? \GuzzleHttp\Psr7\Message::bodySummary($message)
    26             : \GuzzleHttp\Psr7\Message::bodySummary($message, $this->truncateAt);
     25            ? Psr7\Message::bodySummary($message)
     26            : Psr7\Message::bodySummary($message, $this->truncateAt);
    2727    }
    2828}
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/Client.php

    r3015851 r3122743  
    5353     * @param array $config Client configuration settings.
    5454     *
    55      * @see \GuzzleHttp\RequestOptions for a list of available request options.
     55     * @see RequestOptions for a list of available request options.
    5656     */
    5757    public function __construct(array $config = [])
     
    203203     * @deprecated Client::getConfig will be removed in guzzlehttp/guzzle:8.0.
    204204     */
    205     public function getConfig(string $option = null)
     205    public function getConfig(?string $option = null)
    206206    {
    207207        return $option === null
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/ClientInterface.php

    r3015851 r3122743  
    8181     * @deprecated ClientInterface::getConfig will be removed in guzzlehttp/guzzle:8.0.
    8282     */
    83     public function getConfig(string $option = null);
     83    public function getConfig(?string $option = null);
    8484}
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php

    r3015851 r3122743  
    104104    }
    105105
    106     public function clear(string $domain = null, string $path = null, string $name = null): void
     106    public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void
    107107    {
    108108        if (!$domain) {
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php

    r3015851 r3122743  
    6363     * @param string|null $name   Clears cookies matching a domain, path, and name
    6464     */
    65     public function clear(string $domain = null, string $path = null, string $name = null): void;
     65    public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void;
    6666
    6767    /**
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php

    r3015851 r3122743  
    1515        RequestInterface $request,
    1616        ResponseInterface $response,
    17         \Throwable $previous = null,
     17        ?\Throwable $previous = null,
    1818        array $handlerContext = []
    1919    ) {
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php

    r3015851 r3122743  
    2626        string $message,
    2727        RequestInterface $request,
    28         \Throwable $previous = null,
     28        ?\Throwable $previous = null,
    2929        array $handlerContext = []
    3030    ) {
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php

    r3015851 r3122743  
    88use Psr\Http\Message\RequestInterface;
    99use Psr\Http\Message\ResponseInterface;
    10 use Psr\Http\Message\UriInterface;
    1110
    1211/**
     
    3332        string $message,
    3433        RequestInterface $request,
    35         ResponseInterface $response = null,
    36         \Throwable $previous = null,
     34        ?ResponseInterface $response = null,
     35        ?\Throwable $previous = null,
    3736        array $handlerContext = []
    3837    ) {
     
    6463    public static function create(
    6564        RequestInterface $request,
    66         ResponseInterface $response = null,
    67         \Throwable $previous = null,
     65        ?ResponseInterface $response = null,
     66        ?\Throwable $previous = null,
    6867        array $handlerContext = [],
    69         BodySummarizerInterface $bodySummarizer = null
     68        ?BodySummarizerInterface $bodySummarizer = null
    7069    ): self {
    7170        if (!$response) {
     
    9190        }
    9291
    93         $uri = $request->getUri();
    94         $uri = static::obfuscateUri($uri);
     92        $uri = \GuzzleHttp\Psr7\Utils::redactUserInfo($request->getUri());
    9593
    9694        // Client Error: `GET /` resulted in a `404 Not Found` response:
     
    112110
    113111        return new $className($message, $request, $response, $previous, $handlerContext);
    114     }
    115 
    116     /**
    117      * Obfuscates URI if there is a username and a password present
    118      */
    119     private static function obfuscateUri(UriInterface $uri): UriInterface
    120     {
    121         $userInfo = $uri->getUserInfo();
    122 
    123         if (false !== ($pos = \strpos($userInfo, ':'))) {
    124             return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***');
    125         }
    126 
    127         return $uri;
    128112    }
    129113
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php

    r3015851 r3122743  
    1212use GuzzleHttp\Utils;
    1313use Psr\Http\Message\RequestInterface;
     14use Psr\Http\Message\UriInterface;
    1415
    1516/**
     
    4748    public function create(RequestInterface $request, array $options): EasyHandle
    4849    {
     50        $protocolVersion = $request->getProtocolVersion();
     51
     52        if ('2' === $protocolVersion || '2.0' === $protocolVersion) {
     53            if (!self::supportsHttp2()) {
     54                throw new ConnectException('HTTP/2 is supported by the cURL handler, however libcurl is built without HTTP/2 support.', $request);
     55            }
     56        } elseif ('1.0' !== $protocolVersion && '1.1' !== $protocolVersion) {
     57            throw new ConnectException(sprintf('HTTP/%s is not supported by the cURL handler.', $protocolVersion), $request);
     58        }
     59
    4960        if (isset($options['curl']['body_as_string'])) {
    5061            $options['_body_as_string'] = $options['curl']['body_as_string'];
     
    7182
    7283        return $easy;
     84    }
     85
     86    private static function supportsHttp2(): bool
     87    {
     88        static $supportsHttp2 = null;
     89
     90        if (null === $supportsHttp2) {
     91            $supportsHttp2 = self::supportsTls12()
     92                && defined('CURL_VERSION_HTTP2')
     93                && (\CURL_VERSION_HTTP2 & \curl_version()['features']);
     94        }
     95
     96        return $supportsHttp2;
     97    }
     98
     99    private static function supportsTls12(): bool
     100    {
     101        static $supportsTls12 = null;
     102
     103        if (null === $supportsTls12) {
     104            $supportsTls12 = \CURL_SSLVERSION_TLSv1_2 & \curl_version()['features'];
     105        }
     106
     107        return $supportsTls12;
     108    }
     109
     110    private static function supportsTls13(): bool
     111    {
     112        static $supportsTls13 = null;
     113
     114        if (null === $supportsTls13) {
     115            $supportsTls13 = defined('CURL_SSLVERSION_TLSv1_3')
     116                && (\CURL_SSLVERSION_TLSv1_3 & \curl_version()['features']);
     117        }
     118
     119        return $supportsTls13;
    73120    }
    74121
     
    148195            'appconnect_time' => \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME),
    149196        ] + \curl_getinfo($easy->handle);
    150         $ctx[self::CURL_VERSION_STR] = \curl_version()['version'];
     197        $ctx[self::CURL_VERSION_STR] = self::getCurlVersion();
    151198        $factory->release($easy);
    152199
     
    157204
    158205        return self::createRejection($easy, $ctx);
     206    }
     207
     208    private static function getCurlVersion(): string
     209    {
     210        static $curlVersion = null;
     211
     212        if (null === $curlVersion) {
     213            $curlVersion = \curl_version()['version'];
     214        }
     215
     216        return $curlVersion;
    159217    }
    160218
     
    195253        }
    196254
     255        $uri = $easy->request->getUri();
     256
     257        $sanitizedError = self::sanitizeCurlError($ctx['error'] ?? '', $uri);
     258
    197259        $message = \sprintf(
    198260            'cURL error %s: %s (%s)',
    199261            $ctx['errno'],
    200             $ctx['error'],
     262            $sanitizedError,
    201263            'see https://curl.haxx.se/libcurl/c/libcurl-errors.html'
    202264        );
    203         $uriString = (string) $easy->request->getUri();
    204         if ($uriString !== '' && false === \strpos($ctx['error'], $uriString)) {
    205             $message .= \sprintf(' for %s', $uriString);
     265
     266        if ('' !== $sanitizedError) {
     267            $redactedUriString = \GuzzleHttp\Psr7\Utils::redactUserInfo($uri)->__toString();
     268            if ($redactedUriString !== '' && false === \strpos($sanitizedError, $redactedUriString)) {
     269                $message .= \sprintf(' for %s', $redactedUriString);
     270            }
    206271        }
    207272
     
    212277
    213278        return P\Create::rejectionFor($error);
     279    }
     280
     281    private static function sanitizeCurlError(string $error, UriInterface $uri): string
     282    {
     283        if ('' === $error) {
     284            return $error;
     285        }
     286
     287        $baseUri = $uri->withQuery('')->withFragment('');
     288        $baseUriString = $baseUri->__toString();
     289
     290        if ('' === $baseUriString) {
     291            return $error;
     292        }
     293
     294        $redactedUriString = \GuzzleHttp\Psr7\Utils::redactUserInfo($baseUri)->__toString();
     295
     296        return str_replace($baseUriString, $redactedUriString, $error);
    214297    }
    215298
     
    233316
    234317        $version = $easy->request->getProtocolVersion();
    235         if ($version == 1.1) {
     318
     319        if ('2' === $version || '2.0' === $version) {
     320            $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0;
     321        } elseif ('1.1' === $version) {
    236322            $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_1;
    237         } elseif ($version == 2.0) {
    238             $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0;
    239323        } else {
    240324            $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_0;
     
    391475                // sets a matching 'Accept-Encoding' header.
    392476                $conf[\CURLOPT_ENCODING] = '';
    393                 // But as the user did not specify any acceptable encodings we need
    394                 // to overwrite this implicit header with an empty one.
     477                // But as the user did not specify any encoding preference,
     478                // let's leave it up to server by preventing curl from sending
     479                // the header, which will be interpreted as 'Accept-Encoding: *'.
     480                // https://www.rfc-editor.org/rfc/rfc9110#field.accept-encoding
    395481                $conf[\CURLOPT_HTTPHEADER][] = 'Accept-Encoding:';
    396482            }
     
    456542
    457543        if (isset($options['crypto_method'])) {
    458             if (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) {
    459                 if (!defined('CURL_SSLVERSION_TLSv1_0')) {
    460                     throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.0 not supported by your version of cURL');
    461                 }
     544            $protocolVersion = $easy->request->getProtocolVersion();
     545
     546            // If HTTP/2, upgrade TLS 1.0 and 1.1 to 1.2
     547            if ('2' === $protocolVersion || '2.0' === $protocolVersion) {
     548                if (
     549                    \STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']
     550                    || \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method']
     551                    || \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method']
     552                ) {
     553                    $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2;
     554                } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) {
     555                    if (!self::supportsTls13()) {
     556                        throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL');
     557                    }
     558                    $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_3;
     559                } else {
     560                    throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided');
     561                }
     562            } elseif (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) {
    462563                $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_0;
    463564            } elseif (\STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method']) {
    464                 if (!defined('CURL_SSLVERSION_TLSv1_1')) {
    465                     throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.1 not supported by your version of cURL');
    466                 }
    467565                $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_1;
    468566            } elseif (\STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method']) {
    469                 if (!defined('CURL_SSLVERSION_TLSv1_2')) {
     567                if (!self::supportsTls12()) {
    470568                    throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.2 not supported by your version of cURL');
    471569                }
    472570                $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2;
    473571            } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) {
    474                 if (!defined('CURL_SSLVERSION_TLSv1_3')) {
     572                if (!self::supportsTls13()) {
    475573                    throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL');
    476574                }
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php

    r3015851 r3122743  
    33namespace GuzzleHttp\Handler;
    44
     5use Closure;
    56use GuzzleHttp\Promise as P;
    67use GuzzleHttp\Promise\Promise;
     
    160161        }
    161162
     163        // Run curl_multi_exec in the queue to enable other async tasks to run
     164        P\Utils::queue()->add(Closure::fromCallable([$this, 'tickInQueue']));
     165
    162166        // Step through the task queue which may add additional requests.
    163167        P\Utils::queue()->run();
     
    170174
    171175        while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) {
     176            // Prevent busy looping for slow HTTP requests.
     177            \curl_multi_select($this->_mh, $this->selectTimeout);
    172178        }
    173179
    174180        $this->processMessages();
     181    }
     182
     183    /**
     184     * Runs \curl_multi_exec() inside the event loop, to prevent busy looping
     185     */
     186    private function tickInQueue(): void
     187    {
     188        if (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) {
     189            \curl_multi_select($this->_mh, 0);
     190            P\Utils::queue()->add(Closure::fromCallable([$this, 'tickInQueue']));
     191        }
    175192    }
    176193
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php

    r3015851 r3122743  
    5353     * @param callable|null $onRejected  Callback to invoke when the return value is rejected.
    5454     */
    55     public static function createWithMiddleware(array $queue = null, callable $onFulfilled = null, callable $onRejected = null): HandlerStack
     55    public static function createWithMiddleware(?array $queue = null, ?callable $onFulfilled = null, ?callable $onRejected = null): HandlerStack
    5656    {
    5757        return HandlerStack::create(new self($queue, $onFulfilled, $onRejected));
     
    6060    /**
    6161     * The passed in value must be an array of
    62      * {@see \Psr\Http\Message\ResponseInterface} objects, Exceptions,
     62     * {@see ResponseInterface} objects, Exceptions,
    6363     * callables, or Promises.
    6464     *
     
    6767     * @param callable|null          $onRejected  Callback to invoke when the return value is rejected.
    6868     */
    69     public function __construct(array $queue = null, callable $onFulfilled = null, callable $onRejected = null)
     69    public function __construct(?array $queue = null, ?callable $onFulfilled = null, ?callable $onRejected = null)
    7070    {
    7171        $this->onFulfilled = $onFulfilled;
     
    201201        RequestInterface $request,
    202202        array $options,
    203         ResponseInterface $response = null,
     203        ?ResponseInterface $response = null,
    204204        $reason = null
    205205    ): void {
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php

    r3015851 r3122743  
    3939        if (isset($options['delay'])) {
    4040            \usleep($options['delay'] * 1000);
     41        }
     42
     43        $protocolVersion = $request->getProtocolVersion();
     44
     45        if ('1.0' !== $protocolVersion && '1.1' !== $protocolVersion) {
     46            throw new ConnectException(sprintf('HTTP/%s is not supported by the stream handler.', $protocolVersion), $request);
    4147        }
    4248
     
    8490        RequestInterface $request,
    8591        ?float $startTime,
    86         ResponseInterface $response = null,
    87         \Throwable $error = null
     92        ?ResponseInterface $response = null,
     93        ?\Throwable $error = null
    8894    ): void {
    8995        if (isset($options['on_stats'])) {
     
    274280        // HTTP/1.1 streams using the PHP stream wrapper require a
    275281        // Connection: close header
    276         if ($request->getProtocolVersion() == '1.1'
     282        if ($request->getProtocolVersion() === '1.1'
    277283            && !$request->hasHeader('Connection')
    278284        ) {
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/HandlerStack.php

    r3015851 r3122743  
    4545     *                                                                            system will be utilized.
    4646     */
    47     public static function create(callable $handler = null): self
     47    public static function create(?callable $handler = null): self
    4848    {
    4949        $stack = new self($handler ?: Utils::chooseHandler());
     
    5959     * @param (callable(RequestInterface, array): PromiseInterface)|null $handler Underlying HTTP handler.
    6060     */
    61     public function __construct(callable $handler = null)
     61    public function __construct(?callable $handler = null)
    6262    {
    6363        $this->handler = $handler;
     
    132132     * @param string                       $name       Name to register for this middleware.
    133133     */
    134     public function unshift(callable $middleware, string $name = null): void
     134    public function unshift(callable $middleware, ?string $name = null): void
    135135    {
    136136        \array_unshift($this->stack, [$middleware, $name]);
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/MessageFormatter.php

    r3015851 r3122743  
    6969     * @param \Throwable|null        $error    Exception that was received
    7070     */
    71     public function format(RequestInterface $request, ResponseInterface $response = null, \Throwable $error = null): string
     71    public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string
    7272    {
    7373        $cache = [];
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php

    r3015851 r3122743  
    1515     * @param \Throwable|null        $error    Exception that was received
    1616     */
    17     public function format(RequestInterface $request, ResponseInterface $response = null, \Throwable $error = null): string;
     17    public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string;
    1818}
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/Middleware.php

    r3015851 r3122743  
    5656     * @return callable(callable): callable Returns a function that accepts the next handler.
    5757     */
    58     public static function httpErrors(BodySummarizerInterface $bodySummarizer = null): callable
     58    public static function httpErrors(?BodySummarizerInterface $bodySummarizer = null): callable
    5959    {
    6060        return static function (callable $handler) use ($bodySummarizer): callable {
     
    133133     * @return callable Returns a function that accepts the next handler.
    134134     */
    135     public static function tap(callable $before = null, callable $after = null): callable
     135    public static function tap(?callable $before = null, ?callable $after = null): callable
    136136    {
    137137        return static function (callable $handler) use ($before, $after): callable {
     
    177177     * @return callable Returns a function that accepts the next handler.
    178178     */
    179     public static function retry(callable $decider, callable $delay = null): callable
     179    public static function retry(callable $decider, ?callable $delay = null): callable
    180180    {
    181181        return static function (callable $handler) use ($decider, $delay): RetryMiddleware {
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php

    r3015851 r3122743  
    7777        $expect = $options['expect'] ?? null;
    7878
    79         // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0
    80         if ($expect === false || $request->getProtocolVersion() < 1.1) {
     79        // Return if disabled or using HTTP/1.0
     80        if ($expect === false || $request->getProtocolVersion() === '1.0') {
    8181            return;
    8282        }
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/RequestOptions.php

    r3015851 r3122743  
    6262     * jar to use or what cookies to send. This option only works if your
    6363     * handler has the `cookie` middleware. Valid values are `false` and
    64      * an instance of {@see \GuzzleHttp\Cookie\CookieJarInterface}.
     64     * an instance of {@see Cookie\CookieJarInterface}.
    6565     */
    6666    public const COOKIES = 'cookies';
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php

    r3015851 r3122743  
    4141     *                                                                         milliseconds to delay.
    4242     */
    43     public function __construct(callable $decider, callable $nextHandler, callable $delay = null)
     43    public function __construct(callable $decider, callable $nextHandler, ?callable $delay = null)
    4444    {
    4545        $this->decider = $decider;
     
    111111    }
    112112
    113     private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null): PromiseInterface
     113    private function doRetry(RequestInterface $request, array $options, ?ResponseInterface $response = null): PromiseInterface
    114114    {
    115115        $options['delay'] = ($this->delay)(++$options['retries'], $response, $request);
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/TransferStats.php

    r3015851 r3122743  
    4747    public function __construct(
    4848        RequestInterface $request,
    49         ResponseInterface $response = null,
    50         float $transferTime = null,
     49        ?ResponseInterface $response = null,
     50        ?float $transferTime = null,
    5151        $handlerErrorData = null,
    5252        array $handlerStats = []
  • moneroo/trunk/vendor/guzzlehttp/guzzle/src/Utils.php

    r3015851 r3122743  
    7272        }
    7373
    74         return \GuzzleHttp\Psr7\Utils::tryFopen('php://output', 'w');
     74        return Psr7\Utils::tryFopen('php://output', 'w');
    7575    }
    7676
     
    8888        $handler = null;
    8989
    90         if (\defined('CURLOPT_CUSTOMREQUEST')) {
     90        if (\defined('CURLOPT_CUSTOMREQUEST') && \function_exists('curl_version') && version_compare(curl_version()['version'], '7.34') >= 0) {
    9191            if (\function_exists('curl_multi_exec') && \function_exists('curl_exec')) {
    9292                $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler());
  • moneroo/trunk/vendor/guzzlehttp/promises/CHANGELOG.md

    r3015851 r3122743  
    11# CHANGELOG
     2
     3
     4## 2.0.3 - 2024-07-18
     5
     6### Changed
     7
     8- PHP 8.4 support
    29
    310
  • moneroo/trunk/vendor/guzzlehttp/promises/README.md

    r3015851 r3122743  
    3939## Version Guidance
    4040
    41 | Version | Status                 | PHP Version  |
    42 |---------|------------------------|--------------|
    43 | 1.x     | Bug and security fixes | >=5.5,<8.3   |
    44 | 2.x     | Latest                 | >=7.2.5,<8.4 |
     41| Version | Status              | PHP Version  |
     42|---------|---------------------|--------------|
     43| 1.x     | Security fixes only | >=5.5,<8.3   |
     44| 2.x     | Latest              | >=7.2.5,<8.5 |
    4545
    4646
  • moneroo/trunk/vendor/guzzlehttp/promises/composer.json

    r3015851 r3122743  
    3131    "require-dev": {
    3232        "bamarni/composer-bin-plugin": "^1.8.2",
    33         "phpunit/phpunit": "^8.5.36 || ^9.6.15"
     33        "phpunit/phpunit": "^8.5.39 || ^9.6.20"
    3434    },
    3535    "autoload": {
  • moneroo/trunk/vendor/guzzlehttp/promises/src/Coroutine.php

    r3015851 r3122743  
    8585
    8686    public function then(
    87         callable $onFulfilled = null,
    88         callable $onRejected = null
     87        ?callable $onFulfilled = null,
     88        ?callable $onRejected = null
    8989    ): PromiseInterface {
    9090        return $this->result->then($onFulfilled, $onRejected);
  • moneroo/trunk/vendor/guzzlehttp/promises/src/Each.php

    r3015851 r3122743  
    2424    public static function of(
    2525        $iterable,
    26         callable $onFulfilled = null,
    27         callable $onRejected = null
     26        ?callable $onFulfilled = null,
     27        ?callable $onRejected = null
    2828    ): PromiseInterface {
    2929        return (new EachPromise($iterable, [
     
    4747        $iterable,
    4848        $concurrency,
    49         callable $onFulfilled = null,
    50         callable $onRejected = null
     49        ?callable $onFulfilled = null,
     50        ?callable $onRejected = null
    5151    ): PromiseInterface {
    5252        return (new EachPromise($iterable, [
     
    6868        $iterable,
    6969        $concurrency,
    70         callable $onFulfilled = null
     70        ?callable $onFulfilled = null
    7171    ): PromiseInterface {
    7272        return self::ofLimit(
  • moneroo/trunk/vendor/guzzlehttp/promises/src/FulfilledPromise.php

    r3015851 r3122743  
    3232
    3333    public function then(
    34         callable $onFulfilled = null,
    35         callable $onRejected = null
     34        ?callable $onFulfilled = null,
     35        ?callable $onRejected = null
    3636    ): PromiseInterface {
    3737        // Return itself if there is no onFulfilled function.
  • moneroo/trunk/vendor/guzzlehttp/promises/src/Promise.php

    r3015851 r3122743  
    2626     */
    2727    public function __construct(
    28         callable $waitFn = null,
    29         callable $cancelFn = null
     28        ?callable $waitFn = null,
     29        ?callable $cancelFn = null
    3030    ) {
    3131        $this->waitFn = $waitFn;
     
    3434
    3535    public function then(
    36         callable $onFulfilled = null,
    37         callable $onRejected = null
     36        ?callable $onFulfilled = null,
     37        ?callable $onRejected = null
    3838    ): PromiseInterface {
    3939        if ($this->state === self::PENDING) {
  • moneroo/trunk/vendor/guzzlehttp/promises/src/PromiseInterface.php

    r3015851 r3122743  
    2828     */
    2929    public function then(
    30         callable $onFulfilled = null,
    31         callable $onRejected = null
     30        ?callable $onFulfilled = null,
     31        ?callable $onRejected = null
    3232    ): PromiseInterface;
    3333
  • moneroo/trunk/vendor/guzzlehttp/promises/src/RejectedPromise.php

    r3015851 r3122743  
    3232
    3333    public function then(
    34         callable $onFulfilled = null,
    35         callable $onRejected = null
     34        ?callable $onFulfilled = null,
     35        ?callable $onRejected = null
    3636    ): PromiseInterface {
    3737        // If there's no onRejected callback then just return self.
  • moneroo/trunk/vendor/guzzlehttp/promises/src/RejectionException.php

    r3015851 r3122743  
    1919     * @param string|null $description Optional description.
    2020     */
    21     public function __construct($reason, string $description = null)
     21    public function __construct($reason, ?string $description = null)
    2222    {
    2323        $this->reason = $reason;
  • moneroo/trunk/vendor/guzzlehttp/promises/src/Utils.php

    r3015851 r3122743  
    2222     * @param TaskQueueInterface|null $assign Optionally specify a new queue instance.
    2323     */
    24     public static function queue(TaskQueueInterface $assign = null): TaskQueueInterface
     24    public static function queue(?TaskQueueInterface $assign = null): TaskQueueInterface
    2525    {
    2626        static $queue;
  • moneroo/trunk/vendor/guzzlehttp/psr7/CHANGELOG.md

    r3015851 r3122743  
    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.7.0 - 2024-07-18
     9
     10### Added
     11
     12- Add `Utils::redactUserInfo()` method
     13- Add ability to encode bools as ints in `Query::build`
     14
     15## 2.6.3 - 2024-07-18
     16
     17### Fixed
     18
     19- Make `StreamWrapper::stream_stat()` return `false` if inner stream's size is `null`
     20
     21### Changed
     22
     23- PHP 8.4 support
    724
    825## 2.6.2 - 2023-12-03
  • moneroo/trunk/vendor/guzzlehttp/psr7/README.md

    r3015851 r3122743  
    2525| Version | Status              | PHP Version  |
    2626|---------|---------------------|--------------|
    27 | 1.x     | Security fixes only | >=5.4,<8.1   |
    28 | 2.x     | Latest              | >=7.2.5,<8.4 |
     27| 1.x     | EOL (2024-06-30)    | >=5.4,<8.2   |
     28| 2.x     | Latest              | >=7.2.5,<8.5 |
    2929
    3030
     
    437437## `GuzzleHttp\Psr7\Query::build`
    438438
    439 `public static function build(array $params, int|false $encoding = PHP_QUERY_RFC3986): string`
     439`public static function build(array $params, int|false $encoding = PHP_QUERY_RFC3986, bool $treatBoolsAsInts = true): string`
    440440
    441441Build a query string from an array of key value pairs.
     
    499499## `GuzzleHttp\Psr7\Utils::readLine`
    500500
    501 `public static function readLine(StreamInterface $stream, int $maxLength = null): string`
     501`public static function readLine(StreamInterface $stream, ?int $maxLength = null): string`
    502502
    503503Read a line from the stream up to the maximum allowed buffer length.
     504
     505
     506## `GuzzleHttp\Psr7\Utils::redactUserInfo`
     507
     508`public static function redactUserInfo(UriInterface $uri): UriInterface`
     509
     510Redact the password in the user info part of a URI.
    504511
    505512
     
    675682### `GuzzleHttp\Psr7\Uri::isSameDocumentReference`
    676683
    677 `public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool`
     684`public static function isSameDocumentReference(UriInterface $uri, ?UriInterface $base = null): bool`
    678685
    679686Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its
  • moneroo/trunk/vendor/guzzlehttp/psr7/composer.json

    r3015851 r3122743  
    6262    "require-dev": {
    6363        "bamarni/composer-bin-plugin": "^1.8.2",
    64         "http-interop/http-factory-tests": "^0.9",
    65         "phpunit/phpunit": "^8.5.36 || ^9.6.15"
     64        "http-interop/http-factory-tests": "0.9.0",
     65        "phpunit/phpunit": "^8.5.39 || ^9.6.20"
    6666    },
    6767    "suggest": {
  • moneroo/trunk/vendor/guzzlehttp/psr7/src/CachingStream.php

    r3015851 r3122743  
    3434    public function __construct(
    3535        StreamInterface $stream,
    36         StreamInterface $target = null
     36        ?StreamInterface $target = null
    3737    ) {
    3838        $this->remoteStream = $stream;
  • moneroo/trunk/vendor/guzzlehttp/psr7/src/HttpFactory.php

    r3015851 r3122743  
    2828    public function createUploadedFile(
    2929        StreamInterface $stream,
    30         int $size = null,
     30        ?int $size = null,
    3131        int $error = \UPLOAD_ERR_OK,
    32         string $clientFilename = null,
    33         string $clientMediaType = null
     32        ?string $clientFilename = null,
     33        ?string $clientMediaType = null
    3434    ): UploadedFileInterface {
    3535        if ($size === null) {
  • moneroo/trunk/vendor/guzzlehttp/psr7/src/MultipartStream.php

    r3015851 r3122743  
    3333     * @throws \InvalidArgumentException
    3434     */
    35     public function __construct(array $elements = [], string $boundary = null)
     35    public function __construct(array $elements = [], ?string $boundary = null)
    3636    {
    3737        $this->boundary = $boundary ?: bin2hex(random_bytes(20));
  • moneroo/trunk/vendor/guzzlehttp/psr7/src/Query.php

    r3015851 r3122743  
    6464     * encountered (like `http_build_query()` would).
    6565     *
    66      * @param array     $params   Query string parameters.
    67      * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
    68      *                            to encode using RFC3986, or PHP_QUERY_RFC1738
    69      *                            to encode using RFC1738.
     66     * @param array     $params           Query string parameters.
     67     * @param int|false $encoding         Set to false to not encode,
     68     *                                    PHP_QUERY_RFC3986 to encode using
     69     *                                    RFC3986, or PHP_QUERY_RFC1738 to
     70     *                                    encode using RFC1738.
     71     * @param bool      $treatBoolsAsInts Set to true to encode as 0/1, and
     72     *                                    false as false/true.
    7073     */
    71     public static function build(array $params, $encoding = PHP_QUERY_RFC3986): string
     74    public static function build(array $params, $encoding = PHP_QUERY_RFC3986, bool $treatBoolsAsInts = true): string
    7275    {
    7376        if (!$params) {
     
    8790        }
    8891
     92        $castBool = $treatBoolsAsInts ? static function ($v) { return (int) $v; } : static function ($v) { return $v ? 'true' : 'false'; };
     93
    8994        $qs = '';
    9095        foreach ($params as $k => $v) {
     
    9297            if (!is_array($v)) {
    9398                $qs .= $k;
    94                 $v = is_bool($v) ? (int) $v : $v;
     99                $v = is_bool($v) ? $castBool($v) : $v;
    95100                if ($v !== null) {
    96101                    $qs .= '='.$encoder((string) $v);
     
    100105                foreach ($v as $vv) {
    101106                    $qs .= $k;
    102                     $vv = is_bool($vv) ? (int) $vv : $vv;
     107                    $vv = is_bool($vv) ? $castBool($vv) : $vv;
    103108                    if ($vv !== null) {
    104109                        $qs .= '='.$encoder((string) $vv);
  • moneroo/trunk/vendor/guzzlehttp/psr7/src/Response.php

    r3015851 r3122743  
    9797        $body = null,
    9898        string $version = '1.1',
    99         string $reason = null
     99        ?string $reason = null
    100100    ) {
    101101        $this->assertStatusCodeRange($status);
  • moneroo/trunk/vendor/guzzlehttp/psr7/src/StreamWrapper.php

    r3015851 r3122743  
    7070    }
    7171
    72     public function stream_open(string $path, string $mode, int $options, string &$opened_path = null): bool
     72    public function stream_open(string $path, string $mode, int $options, ?string &$opened_path = null): bool
    7373    {
    7474        $options = stream_context_get_options($this->context);
     
    120120
    121121        return $resource ?? false;
     122    }
     123
     124    /**
     125     * @return array{
     126     *   dev: int,
     127     *   ino: int,
     128     *   mode: int,
     129     *   nlink: int,
     130     *   uid: int,
     131     *   gid: int,
     132     *   rdev: int,
     133     *   size: int,
     134     *   atime: int,
     135     *   mtime: int,
     136     *   ctime: int,
     137     *   blksize: int,
     138     *   blocks: int
     139     * }|false
     140     */
     141    public function stream_stat()
     142    {
     143        if ($this->stream->getSize() === null) {
     144            return false;
     145        }
     146
     147        static $modeMap = [
     148            'r' => 33060,
     149            'rb' => 33060,
     150            'r+' => 33206,
     151            'w' => 33188,
     152            'wb' => 33188,
     153        ];
     154
     155        return [
     156            'dev' => 0,
     157            'ino' => 0,
     158            'mode' => $modeMap[$this->mode],
     159            'nlink' => 0,
     160            'uid' => 0,
     161            'gid' => 0,
     162            'rdev' => 0,
     163            'size' => $this->stream->getSize() ?: 0,
     164            'atime' => 0,
     165            'mtime' => 0,
     166            'ctime' => 0,
     167            'blksize' => 0,
     168            'blocks' => 0,
     169        ];
    122170    }
    123171
     
    139187     * }
    140188     */
    141     public function stream_stat(): array
    142     {
    143         static $modeMap = [
    144             'r' => 33060,
    145             'rb' => 33060,
    146             'r+' => 33206,
    147             'w' => 33188,
    148             'wb' => 33188,
    149         ];
    150 
    151         return [
    152             'dev' => 0,
    153             'ino' => 0,
    154             'mode' => $modeMap[$this->mode],
    155             'nlink' => 0,
    156             'uid' => 0,
    157             'gid' => 0,
    158             'rdev' => 0,
    159             'size' => $this->stream->getSize() ?: 0,
    160             'atime' => 0,
    161             'mtime' => 0,
    162             'ctime' => 0,
    163             'blksize' => 0,
    164             'blocks' => 0,
    165         ];
    166     }
    167 
    168     /**
    169      * @return array{
    170      *   dev: int,
    171      *   ino: int,
    172      *   mode: int,
    173      *   nlink: int,
    174      *   uid: int,
    175      *   gid: int,
    176      *   rdev: int,
    177      *   size: int,
    178      *   atime: int,
    179      *   mtime: int,
    180      *   ctime: int,
    181      *   blksize: int,
    182      *   blocks: int
    183      * }
    184      */
    185189    public function url_stat(string $path, int $flags): array
    186190    {
  • moneroo/trunk/vendor/guzzlehttp/psr7/src/UploadedFile.php

    r3015851 r3122743  
    6565        ?int $size,
    6666        int $errorStatus,
    67         string $clientFilename = null,
    68         string $clientMediaType = null
     67        ?string $clientFilename = null,
     68        ?string $clientMediaType = null
    6969    ) {
    7070        $this->setError($errorStatus);
  • moneroo/trunk/vendor/guzzlehttp/psr7/src/Uri.php

    r3015851 r3122743  
    280280     * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.4
    281281     */
    282     public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool
     282    public static function isSameDocumentReference(UriInterface $uri, ?UriInterface $base = null): bool
    283283    {
    284284        if ($base !== null) {
  • moneroo/trunk/vendor/guzzlehttp/psr7/src/Utils.php

    r3015851 r3122743  
    232232     * @param int|null        $maxLength Maximum buffer length
    233233     */
    234     public static function readLine(StreamInterface $stream, int $maxLength = null): string
     234    public static function readLine(StreamInterface $stream, ?int $maxLength = null): string
    235235    {
    236236        $buffer = '';
     
    249249
    250250        return $buffer;
     251    }
     252
     253    /**
     254     * Redact the password in the user info part of a URI.
     255     */
     256    public static function redactUserInfo(UriInterface $uri): UriInterface
     257    {
     258        $userInfo = $uri->getUserInfo();
     259
     260        if (false !== ($pos = \strpos($userInfo, ':'))) {
     261            return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***');
     262        }
     263
     264        return $uri;
    251265    }
    252266
  • moneroo/trunk/vendor/psr/http-factory/composer.json

    r3015851 r3122743  
    11{
    22    "name": "psr/http-factory",
    3     "description": "Common interfaces for PSR-7 HTTP message factories",
     3    "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories",
    44    "keywords": [
    55        "psr",
     
    1919        }
    2020    ],
     21    "support": {
     22        "source": "https://github.com/php-fig/http-factory"
     23    },
    2124    "require": {
    22         "php": ">=7.0.0",
     25        "php": ">=7.1",
    2326        "psr/http-message": "^1.0 || ^2.0"
    2427    },
  • moneroo/trunk/vendor/psr/http-factory/src/UploadedFileFactoryInterface.php

    r3015851 r3122743  
    1616     * @param StreamInterface $stream Underlying stream representing the
    1717     *     uploaded file content.
    18      * @param int $size in bytes
     18     * @param int|null $size in bytes
    1919     * @param int $error PHP file upload error
    20      * @param string $clientFilename Filename as provided by the client, if any.
    21      * @param string $clientMediaType Media type as provided by the client, if any.
     20     * @param string|null $clientFilename Filename as provided by the client, if any.
     21     * @param string|null $clientMediaType Media type as provided by the client, if any.
    2222     *
    2323     * @return UploadedFileInterface
     
    2727    public function createUploadedFile(
    2828        StreamInterface $stream,
    29         int $size = null,
     29        ?int $size = null,
    3030        int $error = \UPLOAD_ERR_OK,
    31         string $clientFilename = null,
    32         string $clientMediaType = null
     31        ?string $clientFilename = null,
     32        ?string $clientMediaType = null
    3333    ): UploadedFileInterface;
    3434}
  • moneroo/trunk/vendor/symfony/deprecation-contracts/README.md

    r3057581 r3122743  
    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.
  • moneroo/trunk/vendor/symfony/deprecation-contracts/composer.json

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

    r3057581 r3122743  
    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.