Plugin Directory

Changeset 2955014


Ignore:
Timestamp:
08/17/2023 03:13:07 PM (3 years ago)
Author:
bitfinex
Message:

v3.0.0

Location:
bitfinex-pay
Files:
214 added
4 deleted
76 edited

Legend:

Unmodified
Added
Removed
  • bitfinex-pay/trunk/bfx-pay-woocommerce.php

    r2904091 r2955014  
    55 * Plugin URI:        https://github.com/bitfinexcom/bfx-pay-woocommerce/
    66 * Description:       Allows e-commerce customers to pay for goods and services with crypto currencies. It provides a payment gateway that could be used by any e-commerce to sell their products and services as long as they have an Intermediate-verified (or higher KYC level) Merchant account on the Bitfinex platform.
    7  * Version:           2.0.2
     7 * Version:           3.0.0
    88 * Author:            Bitfinex
    99 * Author URI:        https://www.bitfinex.com/
     
    2424add_action('woocommerce_after_add_to_cart_form', 'bfx_pay_buy_checkout_on_archive');
    2525add_action('template_redirect', 'bfx_pay_addtocart_on_archives_redirect_checkout');
    26 add_action('wp_mail_failed', 'log_mailer_errors', 10, 1);
    2726
    2827add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'bfx_pay_settings_link', 10);
     
    3130
    3231add_filter('pre_option_woocommerce_currency_pos', 'currency_position');
     32
     33
     34// Cron
     35add_filter('cron_schedules', 'bfx_pay_cron_add_fifteen_min');
     36add_action( 'bfx_pay_cron_hook', 'bfx_pay_cron_exec' );
     37add_action('wp', 'bfx_pay_add_cron');
     38
     39
     40function bfx_pay_cron_add_fifteen_min($schedules)
     41{
     42    $schedules['bfx_pay_fifteen_min'] = [
     43        'interval' => 60 * 15,
     44        'display' => 'Every 15 minute',
     45    ];
     46
     47    return $schedules;
     48}
     49
     50function bfx_pay_cron_exec() {
     51    if (class_exists('WC_Bfx_Pay_Gateway')) {
     52        $instance = new WC_Bfx_Pay_Gateway();
     53        $instance->cron_invoice_check();
     54    }
     55}
     56
     57function bfx_pay_add_cron() {
     58    if ( ! wp_next_scheduled( 'bfx_pay_cron_hook' ) ) {
     59        wp_schedule_event( time(), 'bfx_pay_fifteen_min', 'bfx_pay_cron_hook' );
     60    }
     61}
     62
    3363
    3464function currency_position()
  • bitfinex-pay/trunk/composer.json

    r2867137 r2955014  
    22    "require": {
    33        "php": ">=7.4",
    4         "guzzlehttp/guzzle": "^7.5"
     4        "guzzlehttp/guzzle": "^7.7.0"
    55    },
    66    "require-dev": {
    7         "friendsofphp/php-cs-fixer": "^3.14"
     7        "friendsofphp/php-cs-fixer": "^3.20.0"
     8    },
     9    "config": {
     10        "platform": {
     11            "php": "7.4.0"
     12        }
    813    },
    914    "scripts": {
  • bitfinex-pay/trunk/composer.lock

    r2867137 r2955014  
    55        "This file is @generated automatically"
    66    ],
    7     "content-hash": "f475f23b7b053be0d15c146979ea28f9",
     7    "content-hash": "59ef0a171b72ad67283a889090f8cd2d",
    88    "packages": [
    99        {
    1010            "name": "guzzlehttp/guzzle",
    11             "version": "7.5.0",
     11            "version": "7.7.0",
    1212            "source": {
    1313                "type": "git",
    1414                "url": "https://github.com/guzzle/guzzle.git",
    15                 "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba"
    16             },
    17             "dist": {
    18                 "type": "zip",
    19                 "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba",
    20                 "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba",
     15                "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5"
     16            },
     17            "dist": {
     18                "type": "zip",
     19                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5",
     20                "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5",
    2121                "shasum": ""
    2222            },
    2323            "require": {
    2424                "ext-json": "*",
    25                 "guzzlehttp/promises": "^1.5",
    26                 "guzzlehttp/psr7": "^1.9 || ^2.4",
     25                "guzzlehttp/promises": "^1.5.3 || ^2.0",
     26                "guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
    2727                "php": "^7.2.5 || ^8.0",
    2828                "psr/http-client": "^1.0",
     
    3535                "bamarni/composer-bin-plugin": "^1.8.1",
    3636                "ext-curl": "*",
    37                 "php-http/client-integration-tests": "^3.0",
     37                "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
     38                "php-http/message-factory": "^1.1",
    3839                "phpunit/phpunit": "^8.5.29 || ^9.5.23",
    3940                "psr/log": "^1.1 || ^2.0 || ^3.0"
     
    4950                    "bin-links": true,
    5051                    "forward-command": false
    51                 },
    52                 "branch-alias": {
    53                     "dev-master": "7.5-dev"
    5452                }
    5553            },
     
    117115            "support": {
    118116                "issues": "https://github.com/guzzle/guzzle/issues",
    119                 "source": "https://github.com/guzzle/guzzle/tree/7.5.0"
     117                "source": "https://github.com/guzzle/guzzle/tree/7.7.0"
    120118            },
    121119            "funding": [
     
    133131                }
    134132            ],
    135             "time": "2022-08-28T15:39:27+00:00"
     133            "time": "2023-05-21T14:04:53+00:00"
    136134        },
    137135        {
    138136            "name": "guzzlehttp/promises",
    139             "version": "1.5.2",
     137            "version": "2.0.0",
    140138            "source": {
    141139                "type": "git",
    142140                "url": "https://github.com/guzzle/promises.git",
    143                 "reference": "b94b2807d85443f9719887892882d0329d1e2598"
    144             },
    145             "dist": {
    146                 "type": "zip",
    147                 "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598",
    148                 "reference": "b94b2807d85443f9719887892882d0329d1e2598",
    149                 "shasum": ""
    150             },
    151             "require": {
    152                 "php": ">=5.5"
     141                "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6"
     142            },
     143            "dist": {
     144                "type": "zip",
     145                "url": "https://api.github.com/repos/guzzle/promises/zipball/3a494dc7dc1d7d12e511890177ae2d0e6c107da6",
     146                "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6",
     147                "shasum": ""
     148            },
     149            "require": {
     150                "php": "^7.2.5 || ^8.0"
    153151            },
    154152            "require-dev": {
    155                 "symfony/phpunit-bridge": "^4.4 || ^5.1"
     153                "bamarni/composer-bin-plugin": "^1.8.1",
     154                "phpunit/phpunit": "^8.5.29 || ^9.5.23"
    156155            },
    157156            "type": "library",
    158157            "extra": {
    159                 "branch-alias": {
    160                     "dev-master": "1.5-dev"
    161                 }
    162             },
    163             "autoload": {
    164                 "files": [
    165                     "src/functions_include.php"
    166                 ],
     158                "bamarni-bin": {
     159                    "bin-links": true,
     160                    "forward-command": false
     161                }
     162            },
     163            "autoload": {
    167164                "psr-4": {
    168165                    "GuzzleHttp\\Promise\\": "src/"
     
    201198            "support": {
    202199                "issues": "https://github.com/guzzle/promises/issues",
    203                 "source": "https://github.com/guzzle/promises/tree/1.5.2"
     200                "source": "https://github.com/guzzle/promises/tree/2.0.0"
    204201            },
    205202            "funding": [
     
    217214                }
    218215            ],
    219             "time": "2022-08-28T14:55:35+00:00"
     216            "time": "2023-05-21T13:50:22+00:00"
    220217        },
    221218        {
    222219            "name": "guzzlehttp/psr7",
    223             "version": "2.4.3",
     220            "version": "2.5.0",
    224221            "source": {
    225222                "type": "git",
    226223                "url": "https://github.com/guzzle/psr7.git",
    227                 "reference": "67c26b443f348a51926030c83481b85718457d3d"
    228             },
    229             "dist": {
    230                 "type": "zip",
    231                 "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d",
    232                 "reference": "67c26b443f348a51926030c83481b85718457d3d",
     224                "reference": "b635f279edd83fc275f822a1188157ffea568ff6"
     225            },
     226            "dist": {
     227                "type": "zip",
     228                "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6",
     229                "reference": "b635f279edd83fc275f822a1188157ffea568ff6",
    233230                "shasum": ""
    234231            },
     
    236233                "php": "^7.2.5 || ^8.0",
    237234                "psr/http-factory": "^1.0",
    238                 "psr/http-message": "^1.0",
     235                "psr/http-message": "^1.1 || ^2.0",
    239236                "ralouphie/getallheaders": "^3.0"
    240237            },
     
    256253                    "bin-links": true,
    257254                    "forward-command": false
    258                 },
    259                 "branch-alias": {
    260                     "dev-master": "2.4-dev"
    261255                }
    262256            },
     
    320314            "support": {
    321315                "issues": "https://github.com/guzzle/psr7/issues",
    322                 "source": "https://github.com/guzzle/psr7/tree/2.4.3"
     316                "source": "https://github.com/guzzle/psr7/tree/2.5.0"
    323317            },
    324318            "funding": [
     
    336330                }
    337331            ],
    338             "time": "2022-10-26T14:07:24+00:00"
     332            "time": "2023-04-17T16:11:26+00:00"
    339333        },
    340334        {
    341335            "name": "psr/http-client",
    342             "version": "1.0.1",
     336            "version": "1.0.2",
    343337            "source": {
    344338                "type": "git",
    345339                "url": "https://github.com/php-fig/http-client.git",
    346                 "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621"
    347             },
    348             "dist": {
    349                 "type": "zip",
    350                 "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
    351                 "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
     340                "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31"
     341            },
     342            "dist": {
     343                "type": "zip",
     344                "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31",
     345                "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31",
    352346                "shasum": ""
    353347            },
    354348            "require": {
    355349                "php": "^7.0 || ^8.0",
    356                 "psr/http-message": "^1.0"
     350                "psr/http-message": "^1.0 || ^2.0"
    357351            },
    358352            "type": "library",
     
    374368                {
    375369                    "name": "PHP-FIG",
    376                     "homepage": "http://www.php-fig.org/"
     370                    "homepage": "https://www.php-fig.org/"
    377371                }
    378372            ],
     
    386380            ],
    387381            "support": {
    388                 "source": "https://github.com/php-fig/http-client/tree/master"
    389             },
    390             "time": "2020-06-29T06:28:15+00:00"
     382                "source": "https://github.com/php-fig/http-client/tree/1.0.2"
     383            },
     384            "time": "2023-04-10T20:12:12+00:00"
    391385        },
    392386        {
    393387            "name": "psr/http-factory",
    394             "version": "1.0.1",
     388            "version": "1.0.2",
    395389            "source": {
    396390                "type": "git",
    397391                "url": "https://github.com/php-fig/http-factory.git",
    398                 "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be"
    399             },
    400             "dist": {
    401                 "type": "zip",
    402                 "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
    403                 "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
     392                "reference": "e616d01114759c4c489f93b099585439f795fe35"
     393            },
     394            "dist": {
     395                "type": "zip",
     396                "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35",
     397                "reference": "e616d01114759c4c489f93b099585439f795fe35",
    404398                "shasum": ""
    405399            },
    406400            "require": {
    407401                "php": ">=7.0.0",
    408                 "psr/http-message": "^1.0"
     402                "psr/http-message": "^1.0 || ^2.0"
    409403            },
    410404            "type": "library",
     
    426420                {
    427421                    "name": "PHP-FIG",
    428                     "homepage": "http://www.php-fig.org/"
     422                    "homepage": "https://www.php-fig.org/"
    429423                }
    430424            ],
     
    441435            ],
    442436            "support": {
    443                 "source": "https://github.com/php-fig/http-factory/tree/master"
    444             },
    445             "time": "2019-04-30T12:38:16+00:00"
     437                "source": "https://github.com/php-fig/http-factory/tree/1.0.2"
     438            },
     439            "time": "2023-04-10T20:10:41+00:00"
    446440        },
    447441        {
    448442            "name": "psr/http-message",
    449             "version": "1.0.1",
     443            "version": "2.0",
    450444            "source": {
    451445                "type": "git",
    452446                "url": "https://github.com/php-fig/http-message.git",
    453                 "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
    454             },
    455             "dist": {
    456                 "type": "zip",
    457                 "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
    458                 "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
    459                 "shasum": ""
    460             },
    461             "require": {
    462                 "php": ">=5.3.0"
     447                "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
     448            },
     449            "dist": {
     450                "type": "zip",
     451                "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
     452                "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
     453                "shasum": ""
     454            },
     455            "require": {
     456                "php": "^7.2 || ^8.0"
    463457            },
    464458            "type": "library",
    465459            "extra": {
    466460                "branch-alias": {
    467                     "dev-master": "1.0.x-dev"
     461                    "dev-master": "2.0.x-dev"
    468462                }
    469463            },
     
    480474                {
    481475                    "name": "PHP-FIG",
    482                     "homepage": "http://www.php-fig.org/"
     476                    "homepage": "https://www.php-fig.org/"
    483477                }
    484478            ],
     
    494488            ],
    495489            "support": {
    496                 "source": "https://github.com/php-fig/http-message/tree/master"
    497             },
    498             "time": "2016-08-06T14:39:51+00:00"
     490                "source": "https://github.com/php-fig/http-message/tree/2.0"
     491            },
     492            "time": "2023-04-04T09:54:51+00:00"
    499493        },
    500494        {
     
    907901        {
    908902            "name": "doctrine/deprecations",
    909             "version": "v1.0.0",
     903            "version": "v1.1.1",
    910904            "source": {
    911905                "type": "git",
    912906                "url": "https://github.com/doctrine/deprecations.git",
    913                 "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de"
    914             },
    915             "dist": {
    916                 "type": "zip",
    917                 "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de",
    918                 "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de",
    919                 "shasum": ""
    920             },
    921             "require": {
    922                 "php": "^7.1|^8.0"
     907                "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3"
     908            },
     909            "dist": {
     910                "type": "zip",
     911                "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
     912                "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
     913                "shasum": ""
     914            },
     915            "require": {
     916                "php": "^7.1 || ^8.0"
    923917            },
    924918            "require-dev": {
    925919                "doctrine/coding-standard": "^9",
    926                 "phpunit/phpunit": "^7.5|^8.5|^9.5",
    927                 "psr/log": "^1|^2|^3"
     920                "phpstan/phpstan": "1.4.10 || 1.10.15",
     921                "phpstan/phpstan-phpunit": "^1.0",
     922                "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
     923                "psalm/plugin-phpunit": "0.18.4",
     924                "psr/log": "^1 || ^2 || ^3",
     925                "vimeo/psalm": "4.30.0 || 5.12.0"
    928926            },
    929927            "suggest": {
     
    944942            "support": {
    945943                "issues": "https://github.com/doctrine/deprecations/issues",
    946                 "source": "https://github.com/doctrine/deprecations/tree/v1.0.0"
    947             },
    948             "time": "2022-05-02T15:47:09+00:00"
     944                "source": "https://github.com/doctrine/deprecations/tree/v1.1.1"
     945            },
     946            "time": "2023-06-03T09:27:29+00:00"
    949947        },
    950948        {
     
    10281026        {
    10291027            "name": "friendsofphp/php-cs-fixer",
    1030             "version": "v3.14.4",
     1028            "version": "v3.20.0",
    10311029            "source": {
    10321030                "type": "git",
    10331031                "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
    1034                 "reference": "1b3d9dba63d93b8a202c31e824748218781eae6b"
    1035             },
    1036             "dist": {
    1037                 "type": "zip",
    1038                 "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/1b3d9dba63d93b8a202c31e824748218781eae6b",
    1039                 "reference": "1b3d9dba63d93b8a202c31e824748218781eae6b",
     1032                "reference": "0e8249e0b15e2bc022fbbd1090ce29d071481e69"
     1033            },
     1034            "dist": {
     1035                "type": "zip",
     1036                "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/0e8249e0b15e2bc022fbbd1090ce29d071481e69",
     1037                "reference": "0e8249e0b15e2bc022fbbd1090ce29d071481e69",
    10401038                "shasum": ""
    10411039            },
     
    11041102            ],
    11051103            "description": "A tool to automatically fix PHP code style",
     1104            "keywords": [
     1105                "Static code analysis",
     1106                "fixer",
     1107                "standards",
     1108                "static analysis"
     1109            ],
    11061110            "support": {
    11071111                "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
    1108                 "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.14.4"
     1112                "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.20.0"
    11091113            },
    11101114            "funding": [
     
    11141118                }
    11151119            ],
    1116             "time": "2023-02-09T21:49:13+00:00"
     1120            "time": "2023-06-27T20:22:39+00:00"
    11171121        },
    11181122        {
     
    13151319        {
    13161320            "name": "sebastian/diff",
    1317             "version": "4.0.4",
     1321            "version": "4.0.5",
    13181322            "source": {
    13191323                "type": "git",
    13201324                "url": "https://github.com/sebastianbergmann/diff.git",
    1321                 "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d"
    1322             },
    1323             "dist": {
    1324                 "type": "zip",
    1325                 "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d",
    1326                 "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d",
     1325                "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131"
     1326            },
     1327            "dist": {
     1328                "type": "zip",
     1329                "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131",
     1330                "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131",
    13271331                "shasum": ""
    13281332            },
     
    13691373            "support": {
    13701374                "issues": "https://github.com/sebastianbergmann/diff/issues",
    1371                 "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4"
     1375                "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5"
    13721376            },
    13731377            "funding": [
     
    13771381                }
    13781382            ],
    1379             "time": "2020-10-26T13:10:38+00:00"
     1383            "time": "2023-05-07T05:35:17+00:00"
    13801384        },
    13811385        {
    13821386            "name": "symfony/console",
    1383             "version": "v5.4.19",
     1387            "version": "v5.4.24",
    13841388            "source": {
    13851389                "type": "git",
    13861390                "url": "https://github.com/symfony/console.git",
    1387                 "reference": "dccb8d251a9017d5994c988b034d3e18aaabf740"
    1388             },
    1389             "dist": {
    1390                 "type": "zip",
    1391                 "url": "https://api.github.com/repos/symfony/console/zipball/dccb8d251a9017d5994c988b034d3e18aaabf740",
    1392                 "reference": "dccb8d251a9017d5994c988b034d3e18aaabf740",
     1391                "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8"
     1392            },
     1393            "dist": {
     1394                "type": "zip",
     1395                "url": "https://api.github.com/repos/symfony/console/zipball/560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8",
     1396                "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8",
    13931397                "shasum": ""
    13941398            },
     
    14551459            "keywords": [
    14561460                "cli",
    1457                 "command line",
     1461                "command-line",
    14581462                "console",
    14591463                "terminal"
    14601464            ],
    14611465            "support": {
    1462                 "source": "https://github.com/symfony/console/tree/v5.4.19"
     1466                "source": "https://github.com/symfony/console/tree/v5.4.24"
    14631467            },
    14641468            "funding": [
     
    14761480                }
    14771481            ],
    1478             "time": "2023-01-01T08:32:19+00:00"
     1482            "time": "2023-05-26T05:13:16+00:00"
    14791483        },
    14801484        {
    14811485            "name": "symfony/event-dispatcher",
    1482             "version": "v5.4.19",
     1486            "version": "v5.4.22",
    14831487            "source": {
    14841488                "type": "git",
    14851489                "url": "https://github.com/symfony/event-dispatcher.git",
    1486                 "reference": "abf49cc084c087d94b4cb939c3f3672971784e0c"
    1487             },
    1488             "dist": {
    1489                 "type": "zip",
    1490                 "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/abf49cc084c087d94b4cb939c3f3672971784e0c",
    1491                 "reference": "abf49cc084c087d94b4cb939c3f3672971784e0c",
     1490                "reference": "1df20e45d56da29a4b1d8259dd6e950acbf1b13f"
     1491            },
     1492            "dist": {
     1493                "type": "zip",
     1494                "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1df20e45d56da29a4b1d8259dd6e950acbf1b13f",
     1495                "reference": "1df20e45d56da29a4b1d8259dd6e950acbf1b13f",
    14921496                "shasum": ""
    14931497            },
     
    15451549            "homepage": "https://symfony.com",
    15461550            "support": {
    1547                 "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.19"
     1551                "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.22"
    15481552            },
    15491553            "funding": [
     
    15611565                }
    15621566            ],
    1563             "time": "2023-01-01T08:32:19+00:00"
     1567            "time": "2023-03-17T11:31:58+00:00"
    15641568        },
    15651569        {
     
    16441648        {
    16451649            "name": "symfony/filesystem",
    1646             "version": "v5.4.19",
     1650            "version": "v5.4.25",
    16471651            "source": {
    16481652                "type": "git",
    16491653                "url": "https://github.com/symfony/filesystem.git",
    1650                 "reference": "648bfaca6a494f3e22378123bcee2894045dc9d8"
    1651             },
    1652             "dist": {
    1653                 "type": "zip",
    1654                 "url": "https://api.github.com/repos/symfony/filesystem/zipball/648bfaca6a494f3e22378123bcee2894045dc9d8",
    1655                 "reference": "648bfaca6a494f3e22378123bcee2894045dc9d8",
     1654                "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364"
     1655            },
     1656            "dist": {
     1657                "type": "zip",
     1658                "url": "https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364",
     1659                "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364",
    16561660                "shasum": ""
    16571661            },
     
    16881692            "homepage": "https://symfony.com",
    16891693            "support": {
    1690                 "source": "https://github.com/symfony/filesystem/tree/v5.4.19"
     1694                "source": "https://github.com/symfony/filesystem/tree/v5.4.25"
    16911695            },
    16921696            "funding": [
     
    17041708                }
    17051709            ],
    1706             "time": "2023-01-14T19:14:44+00:00"
     1710            "time": "2023-05-31T13:04:02+00:00"
    17071711        },
    17081712        {
    17091713            "name": "symfony/finder",
    1710             "version": "v5.4.19",
     1714            "version": "v5.4.21",
    17111715            "source": {
    17121716                "type": "git",
    17131717                "url": "https://github.com/symfony/finder.git",
    1714                 "reference": "6071aebf810ad13fe8200c224f36103abb37cf1f"
    1715             },
    1716             "dist": {
    1717                 "type": "zip",
    1718                 "url": "https://api.github.com/repos/symfony/finder/zipball/6071aebf810ad13fe8200c224f36103abb37cf1f",
    1719                 "reference": "6071aebf810ad13fe8200c224f36103abb37cf1f",
     1718                "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19"
     1719            },
     1720            "dist": {
     1721                "type": "zip",
     1722                "url": "https://api.github.com/repos/symfony/finder/zipball/078e9a5e1871fcfe6a5ce421b539344c21afef19",
     1723                "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19",
    17201724                "shasum": ""
    17211725            },
     
    17511755            "homepage": "https://symfony.com",
    17521756            "support": {
    1753                 "source": "https://github.com/symfony/finder/tree/v5.4.19"
     1757                "source": "https://github.com/symfony/finder/tree/v5.4.21"
    17541758            },
    17551759            "funding": [
     
    17671771                }
    17681772            ],
    1769             "time": "2023-01-14T19:14:44+00:00"
     1773            "time": "2023-02-16T09:33:00+00:00"
    17701774        },
    17711775        {
    17721776            "name": "symfony/options-resolver",
    1773             "version": "v5.4.19",
     1777            "version": "v5.4.21",
    17741778            "source": {
    17751779                "type": "git",
    17761780                "url": "https://github.com/symfony/options-resolver.git",
    1777                 "reference": "b03c99236445492f20c61666e8f7e5d388b078e5"
    1778             },
    1779             "dist": {
    1780                 "type": "zip",
    1781                 "url": "https://api.github.com/repos/symfony/options-resolver/zipball/b03c99236445492f20c61666e8f7e5d388b078e5",
    1782                 "reference": "b03c99236445492f20c61666e8f7e5d388b078e5",
     1781                "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9"
     1782            },
     1783            "dist": {
     1784                "type": "zip",
     1785                "url": "https://api.github.com/repos/symfony/options-resolver/zipball/4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9",
     1786                "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9",
    17831787                "shasum": ""
    17841788            },
     
    18201824            ],
    18211825            "support": {
    1822                 "source": "https://github.com/symfony/options-resolver/tree/v5.4.19"
     1826                "source": "https://github.com/symfony/options-resolver/tree/v5.4.21"
    18231827            },
    18241828            "funding": [
     
    18361840                }
    18371841            ],
    1838             "time": "2023-01-01T08:32:19+00:00"
     1842            "time": "2023-02-14T08:03:56+00:00"
    18391843        },
    18401844        {
     
    24112415        {
    24122416            "name": "symfony/process",
    2413             "version": "v5.4.19",
     2417            "version": "v5.4.24",
    24142418            "source": {
    24152419                "type": "git",
    24162420                "url": "https://github.com/symfony/process.git",
    2417                 "reference": "c5ba874c9b636dbccf761e22ce750e88ec3f55e1"
    2418             },
    2419             "dist": {
    2420                 "type": "zip",
    2421                 "url": "https://api.github.com/repos/symfony/process/zipball/c5ba874c9b636dbccf761e22ce750e88ec3f55e1",
    2422                 "reference": "c5ba874c9b636dbccf761e22ce750e88ec3f55e1",
     2421                "reference": "e3c46cc5689c8782944274bb30702106ecbe3b64"
     2422            },
     2423            "dist": {
     2424                "type": "zip",
     2425                "url": "https://api.github.com/repos/symfony/process/zipball/e3c46cc5689c8782944274bb30702106ecbe3b64",
     2426                "reference": "e3c46cc5689c8782944274bb30702106ecbe3b64",
    24232427                "shasum": ""
    24242428            },
     
    24532457            "homepage": "https://symfony.com",
    24542458            "support": {
    2455                 "source": "https://github.com/symfony/process/tree/v5.4.19"
     2459                "source": "https://github.com/symfony/process/tree/v5.4.24"
    24562460            },
    24572461            "funding": [
     
    24692473                }
    24702474            ],
    2471             "time": "2023-01-01T08:32:19+00:00"
     2475            "time": "2023-05-17T11:26:05+00:00"
    24722476        },
    24732477        {
     
    25562560        {
    25572561            "name": "symfony/stopwatch",
    2558             "version": "v5.4.19",
     2562            "version": "v5.4.21",
    25592563            "source": {
    25602564                "type": "git",
    25612565                "url": "https://github.com/symfony/stopwatch.git",
    2562                 "reference": "bd2b066090fd6a67039371098fa25a84cb2679ec"
    2563             },
    2564             "dist": {
    2565                 "type": "zip",
    2566                 "url": "https://api.github.com/repos/symfony/stopwatch/zipball/bd2b066090fd6a67039371098fa25a84cb2679ec",
    2567                 "reference": "bd2b066090fd6a67039371098fa25a84cb2679ec",
     2566                "reference": "f83692cd869a6f2391691d40a01e8acb89e76fee"
     2567            },
     2568            "dist": {
     2569                "type": "zip",
     2570                "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f83692cd869a6f2391691d40a01e8acb89e76fee",
     2571                "reference": "f83692cd869a6f2391691d40a01e8acb89e76fee",
    25682572                "shasum": ""
    25692573            },
     
    25982602            "homepage": "https://symfony.com",
    25992603            "support": {
    2600                 "source": "https://github.com/symfony/stopwatch/tree/v5.4.19"
     2604                "source": "https://github.com/symfony/stopwatch/tree/v5.4.21"
    26012605            },
    26022606            "funding": [
     
    26142618                }
    26152619            ],
    2616             "time": "2023-01-01T08:32:19+00:00"
     2620            "time": "2023-02-14T08:03:56+00:00"
    26172621        },
    26182622        {
    26192623            "name": "symfony/string",
    2620             "version": "v5.4.19",
     2624            "version": "v5.4.22",
    26212625            "source": {
    26222626                "type": "git",
    26232627                "url": "https://github.com/symfony/string.git",
    2624                 "reference": "0a01071610fd861cc160dfb7e2682ceec66064cb"
    2625             },
    2626             "dist": {
    2627                 "type": "zip",
    2628                 "url": "https://api.github.com/repos/symfony/string/zipball/0a01071610fd861cc160dfb7e2682ceec66064cb",
    2629                 "reference": "0a01071610fd861cc160dfb7e2682ceec66064cb",
     2628                "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62"
     2629            },
     2630            "dist": {
     2631                "type": "zip",
     2632                "url": "https://api.github.com/repos/symfony/string/zipball/8036a4c76c0dd29e60b6a7cafcacc50cf088ea62",
     2633                "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62",
    26302634                "shasum": ""
    26312635            },
     
    26842688            ],
    26852689            "support": {
    2686                 "source": "https://github.com/symfony/string/tree/v5.4.19"
     2690                "source": "https://github.com/symfony/string/tree/v5.4.22"
    26872691            },
    26882692            "funding": [
     
    27002704                }
    27012705            ],
    2702             "time": "2023-01-01T08:32:19+00:00"
     2706            "time": "2023-03-14T06:11:53+00:00"
    27032707        }
    27042708    ],
     
    27122716    },
    27132717    "platform-dev": [],
     2718    "platform-overrides": {
     2719        "php": "7.4.0"
     2720    },
    27142721    "plugin-api-version": "2.3.0"
    27152722}
  • bitfinex-pay/trunk/includes/class-wc-bfx-pay-gateway.php

    r2904091 r2955014  
    1111 * @extends     WC_Payment_Gateway
    1212 *
    13  * @version     2.0.2
     13 * @version     3.0.0
    1414 */
    1515class WC_Bfx_Pay_Gateway extends WC_Payment_Gateway
     
    7575        $this->icon = ('Light' === $this->buttonType) ? apply_filters('woocommerce_bfx_icon', plugins_url('../assets/img/bfx-pay-white.svg', __FILE__)) : apply_filters('woocommerce_bfx_icon', plugins_url('../assets/img/bfx-pay-dark.svg', __FILE__));
    7676        add_action('woocommerce_update_options_payment_gateways_'.$this->id, [$this, 'process_admin_options']);
    77         add_filter('woocommerce_payment_complete_order_status', [$this, 'change_payment_complete_order_status'], 10, 3);
    7877        // Customer Emails.
    7978        add_action('woocommerce_email_order_details', [$this, 'remove_order_details'], 1, 4);
     
    8180        add_action('woocommerce_api_bitfinex', [$this, 'webhook']);
    8281
    83         // Cron
    84         add_filter('cron_schedules', [$this, 'cron_add_fifteen_min']);
    8582        add_filter('woocommerce_add_error', [$this, 'woocommerce_add_error']);
    86         add_action('wp', [$this, 'bitfinex_cron_activation']);
    87         add_action('bitfinex_fifteen_min_event', [$this, 'cron_invoice_check']);
    8883
    8984        $baseUrl = $this->baseApiUrl;
     
    126121
    127122    /**
    128      * Cron.
    129      */
    130     public function cron_add_fifteen_min($schedules)
    131     {
    132         $schedules['fifteen_min'] = [
    133             'interval' => 60 * 15,
    134             'display' => 'Bitfinex cron',
    135         ];
    136 
    137         return $schedules;
    138     }
    139 
    140     public function bitfinex_cron_activation()
    141     {
    142         if (!wp_next_scheduled('bitfinex_fifteen_min_event')) {
    143             wp_schedule_event(time(), 'fifteen_min', 'bitfinex_fifteen_min_event');
    144         }
    145     }
    146 
    147     /**
    148123     * Setup general properties for the gateway.
    149124     */
     
    155130        $this->method_description = __('Bitfinex Payment', 'bitfinex-pay');
    156131        $this->has_fields = true;
     132    }
     133    /**
     134     * General function to update order status
     135     *
     136     * @param object $order WC Order
     137     * @param string $payment_status Status of the payment
     138     *
     139     * @return bool true if known status, false for unknown status
     140     */
     141    protected function update_order_status($order, $payment_status)
     142    {
     143        if ('COMPLETED' === $payment_status) {
     144            ob_start();
     145            $order->payment_complete();
     146            ob_clean();
     147            return true;
     148        }
     149
     150        if ('PENDING' === $payment_status) {
     151            $order->update_status('on-hold');
     152            return true;
     153        }
     154
     155        if ('EXPIRED' === $payment_status) {
     156            $order->update_status('failed');
     157            return true;
     158        }
     159
     160        return false;
     161    }
     162
     163    protected function bfx_request($path, $body) {
     164        $apiKey = $this->apiKey;
     165        $apiSecret = $this->apiSecret;
     166        $nonce = (string) (time() * 1000 * 1000); // epoch in ms * 1000
     167        $bodyJsonin = json_encode($body, JSON_UNESCAPED_SLASHES);
     168        $signaturein = "/api/{$path}{$nonce}{$bodyJsonin}";
     169        $sigin = hash_hmac('sha384', $signaturein, $apiSecret);
     170        $headersin = [
     171            'Content-Type' => 'application/json',
     172            'Accept' => 'application/json',
     173            'bfx-nonce' => $nonce,
     174            'bfx-apikey' => $apiKey,
     175            'bfx-signature' => $sigin,
     176        ];
     177        $rin = $this->client->post($path, [
     178            'headers' => $headersin,
     179            'body' => $bodyJsonin,
     180        ]);
     181        $responsein = $rin->getBody()->getContents();
     182        return $responsein;
     183    }
     184
     185    protected function get_bfx_invoices($start, $end)
     186    {
     187        $apiPathin = 'v2/auth/r/ext/pay/invoices';
     188        $bodyin = [
     189            'start' => $start,
     190            'end' => $end,
     191            'limit' => 100,
     192        ];
     193
     194        return $this->bfx_request($apiPathin, $bodyin);
     195    }
     196
     197    protected function get_bfx_invoice($id)
     198    {
     199        $apiPathin = 'v2/auth/r/ext/pay/invoices';
     200        $body = [
     201            'id' => $id
     202        ];
     203        $response = $this->bfx_request($apiPathin, $body);
     204        $data = json_decode($response, true);
     205        return $data[0];
    157206    }
    158207
     
    338387            throw new Exception(sprintf('This payment method is currently unavailable. Try again later or choose another one'));
    339388        }
    340         $apiKey = $this->apiKey;
    341         $apiSecret = $this->apiSecret;
    342389        $url = $this->get_return_url($order);
    343390        $hook = get_site_url().'?wc-api=bitfinex';
     
    347394        $duration = $this->get_option('duration');
    348395        $apiPath = 'v2/auth/w/ext/pay/invoice/create';
    349         $nonce = (string) (time() * 1000 * 1000); // epoch in ms * 1000
     396
    350397        $body = [
    351398            'amount' => $totalSum,
     
    368415        ];
    369416
    370         $bodyJson = json_encode($body, JSON_UNESCAPED_SLASHES);
    371         $signature = "/api/{$apiPath}{$nonce}{$bodyJson}";
    372 
    373         $sig = hash_hmac('sha384', $signature, $apiSecret);
    374 
    375         $headers = [
    376             'Content-Type' => 'application/json',
    377             'Accept' => 'application/json',
    378             'bfx-nonce' => $nonce,
    379             'bfx-apikey' => $apiKey,
    380             'bfx-signature' => $sig,
    381         ];
    382 
    383417        try {
    384             $r = $this->client->post($apiPath, [
    385                 'headers' => $headers,
    386                 'body' => $bodyJson,
    387             ]);
    388             $response = $r->getBody()->getContents();
     418            $response = $this->bfx_request($apiPath, $body);
    389419            if ($this->debug) {
    390420                $logger = wc_get_logger();
     
    434464    public function cron_invoice_check()
    435465    {
    436         $apiPathin = 'v2/auth/r/ext/pay/invoices';
    437         $apiKey = $this->apiKey;
    438         $apiSecret = $this->apiSecret;
    439         $nonce = (string) (time() * 1000 * 1000); // epoch in ms * 1000
     466        if ($this->debug) {
     467            $logger = wc_get_logger();
     468            $logger->info('BEGIN CRON INVOICE CHECK', ['source' => 'bitfinex-pay']);
     469        }
    440470        $now = round(microtime(true) * 1000);
    441471        $end = $now;
    442472        while ($end > $now - (60 * 60000) * 25) {
    443473            $start = $end - (60 * 60000) * 2;
    444             $bodyin = [
    445                 'start' => $start,
    446                 'end' => $end,
    447                 'limit' => 100,
    448             ];
    449             $bodyJsonin = json_encode($bodyin, JSON_UNESCAPED_SLASHES);
    450             $signaturein = "/api/{$apiPathin}{$nonce}{$bodyJsonin}";
    451             $sigin = hash_hmac('sha384', $signaturein, $apiSecret);
    452             $headersin = [
    453                 'Content-Type' => 'application/json',
    454                 'Accept' => 'application/json',
    455                 'bfx-nonce' => $nonce,
    456                 'bfx-apikey' => $apiKey,
    457                 'bfx-signature' => $sigin,
    458             ];
     474
    459475            try {
    460                 $rin = $this->client->post($apiPathin, [
    461                     'headers' => $headersin,
    462                     'body' => $bodyJsonin,
    463                 ]);
    464                 $responsein = $rin->getBody()->getContents();
     476                $responsein = $this->get_bfx_invoices($start, $end);
    465477                if ($this->debug) {
    466                     wc_add_notice($responsein, 'notice');
    467478                    $logger = wc_get_logger();
    468479                    $logger->info('CRON READ INVOICE CALL >> '.wc_print_r($responsein, true), ['source' => 'bitfinex-pay']);
     
    475486                    }
    476487                    if ('on-hold' === $order->get_status()) {
    477                         if ('COMPLETED' === $invoice->status) {
    478                             $order->payment_complete();
    479                         } elseif ('PENDING' === $invoice->status) {
    480                             $order->update_status('on-hold');
    481                         } else {
    482                             $order->update_status('failed');
    483                         }
     488                        $this->update_order_status($order, $invoice->status);
    484489                    }
    485490                }
     
    502507        $data = json_decode($payload, true);
    503508        $order = wc_get_order($data['orderId']);
    504         if ('COMPLETED' !== $data['status']) {
    505             $order->update_status('failed');
    506 
    507             return;
    508         }
    509         ob_start();
    510 
    511         $order->payment_complete();
     509
     510        if (!$order) {
     511            exit();
     512        }
    512513
    513514        if ($this->debug) {
    514             update_option('webhook_debug', $payload);
    515515            $logger = wc_get_logger();
    516516            $logger->info('WEBHOOK CALL >> '.wc_print_r($payload, true), ['source' => 'bitfinex-pay']);
    517517        }
    518         ob_clean();
    519         status_header(200);
    520         echo 'true';
     518
     519        $invoice_id = get_post_meta($order->id, 'bitfinex_invoice_id', true);
     520        $invoice_data = $this->get_bfx_invoice($invoice_id);
     521
     522        if ($this->debug) {
     523            $logger = wc_get_logger();
     524            $logger->info('WEBHOOK INVOICE DATA >> '.wc_print_r($invoice_data, true), ['source' => 'bitfinex-pay']);
     525        }
     526
     527        $is_success = $this->update_order_status($order, $invoice_data['status']);
     528
     529        if ($is_success) {
     530            status_header(200);
     531            echo 'true';
     532        }
     533
    521534        exit();
    522     }
    523 
    524     /**
    525      * Change payment complete order status to completed for Вitfinex payments method orders.
    526      *
    527      * @param string         $status   current order status
    528      * @param int            $order_id order ID
    529      * @param WC_Order|false $order    order object
    530      *
    531      * @return string
    532      */
    533     public function change_payment_complete_order_status($status, $order_id = 0, $order = false)
    534     {
    535         if ($order && 'bfx_payment' === $order->get_payment_method()) {
    536             $status = 'completed';
    537         }
    538 
    539         return $status;
    540535    }
    541536
     
    555550    {
    556551        $order->read_meta_data(true);
    557         $metadata = $order->get_meta_data();
    558         $invoiceId = null;
    559         foreach ($metadata as &$entry) {
    560             $data = $entry->get_data();
    561 
    562             if ($data['key'] === 'bitfinex_invoice_id') {
    563                 $invoiceId = $data['value'];
    564             }
    565         }
     552        $invoiceId = get_post_meta($order->id, 'bitfinex_invoice_id', true);
     553
    566554        if (!$invoiceId) {
    567555            return;
    568556        }
    569557
    570         $body = [
    571             'id' => $invoiceId
    572         ];
    573         $bodyJson = json_encode($body, JSON_UNESCAPED_SLASHES);
    574 
    575         $headers = [
    576             'Content-Type' => 'application/json',
    577             'Accept' => 'application/json',
    578         ];
    579         $r = $this->client->post('v2/ext/pay/invoice', [
    580             'headers' => $headers,
    581             'body' => $bodyJson,
    582         ]);
    583         $response = $r->getBody()->getContents();
    584         $data = json_decode($response, true);
     558        $data = $this->get_bfx_invoice($invoiceId);
    585559
    586560        $payment = null;
  • bitfinex-pay/trunk/readme.txt

    r2904091 r2955014  
    55Tested up to: 6.1.1
    66Requires PHP: 7.4
    7 Stable tag: 2.0.2
     7Stable tag: 3.0.0
    88License: GPLv3
    99License URI: https://github.com/bitfinexcom/bfx-pay-woocommerce/blob/main/LICENSE
     
    2828- **No additional processing fees** - Bitfinex Pay services come with no additional processing or hidden fees. Check out Bitfinex Pay terms for incurring transaction fees on the network that merchants should be aware of.
    2929- **Swift process** - Upon successful transactions, you will generally receive the payment in your wallet within minutes.
    30 - **Very intuitive** - Bitfinex Pay’s interface is very intuitive, making it easy to navigate by all kinds of customers. 
    31 - **Backed with Bitfinex’s technology & reputation** - As one of the pioneers in the industry, Bitfinex has an impeccable track record of providing services to our users and the crypto community at large. 
     30- **Very intuitive** - Bitfinex Pay’s interface is very intuitive, making it easy to navigate by all kinds of customers.
     31- **Backed with Bitfinex’s technology & reputation** - As one of the pioneers in the industry, Bitfinex has an impeccable track record of providing services to our users and the crypto community at large.
    3232
    3333
     
    4242- Your customers click the Bitfinex Pay button on your product page when checking out.
    4343- Upon clicking, they will be directed to the Bitfinex payment gateway page. (This page contains your customers’ order details.)
    44 - The countdown shows the remaining amount of time to complete the payment. 
     44- The countdown shows the remaining amount of time to complete the payment.
    4545- Your customers will be redirected back to your website upon successful payment.
    4646
     
    7474- Expired: An invoice payment time has expired, meaning that the funds were not deposited in the required countdown period provided.
    7575
     76= Why my order status is set to completed/processing after payment completed? =
     77This is a standard behaviour from WooCommerce.
     78Most of the time payment completed should mark an order as 'processing' so that admin can process/post the items. If the cart contains only downloadable items then the order is 'completed' since the admin needs to take no action.
     79Additional information can be found in https://woocommerce.wp-a2z.org/oik_api/wc_orderpayment_complete/
     80
    7681= What are the invoice limitation amounts? =
    7782
     
    8691
    8792== Changelog ==
     93= 3.0.0 =
     94* Adjusted payment completion to follow default behaviour of woocommerce
     95* Fixed issue with cron schedule
     96* Updated dependencies with security issues
     97* Added safety check for invoice status on webhook calls
     98
    8899= 2.0.2 =
    89100* Fixed issue with loading debug flag before initialising form fields
  • bitfinex-pay/trunk/vendor/autoload.php

    r2904091 r2955014  
    33// autoload.php @generated by Composer
    44
     5if (PHP_VERSION_ID < 50600) {
     6    if (!headers_sent()) {
     7        header('HTTP/1.1 500 Internal Server Error');
     8    }
     9    $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
     10    if (!ini_get('display_errors')) {
     11        if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
     12            fwrite(STDERR, $err);
     13        } elseif (!headers_sent()) {
     14            echo $err;
     15        }
     16    }
     17    trigger_error(
     18        $err,
     19        E_USER_ERROR
     20    );
     21}
     22
    523require_once __DIR__ . '/composer/autoload_real.php';
    624
    7 return ComposerAutoloaderInit670d59c1e8b39bbe6a8a38fe1b1f611a::getLoader();
     25return ComposerAutoloaderInit5b6802600d5981fe38be608127331a9f::getLoader();
  • bitfinex-pay/trunk/vendor/composer/ClassLoader.php

    r2706025 r2955014  
    4343class ClassLoader
    4444{
     45    /** @var \Closure(string):void */
     46    private static $includeFile;
     47
    4548    /** @var ?string */
    4649    private $vendorDir;
     
    107110    {
    108111        $this->vendorDir = $vendorDir;
     112        self::initializeIncludeClosure();
    109113    }
    110114
     
    426430    {
    427431        if ($file = $this->findFile($class)) {
    428             includeFile($file);
     432            $includeFile = self::$includeFile;
     433            $includeFile($file);
    429434
    430435            return true;
     
    556561        return false;
    557562    }
     563
     564    /**
     565     * @return void
     566     */
     567    private static function initializeIncludeClosure()
     568    {
     569        if (self::$includeFile !== null) {
     570            return;
     571        }
     572
     573        /**
     574         * Scope isolated include.
     575         *
     576         * Prevents access to $this/self from included files.
     577         *
     578         * @param  string $file
     579         * @return void
     580         */
     581        self::$includeFile = \Closure::bind(static function($file) {
     582            include $file;
     583        }, null, null);
     584    }
    558585}
    559 
    560 /**
    561  * Scope isolated include.
    562  *
    563  * Prevents access to $this/self from included files.
    564  *
    565  * @param  string $file
    566  * @return void
    567  * @private
    568  */
    569 function includeFile($file)
    570 {
    571     include $file;
    572 }
  • bitfinex-pay/trunk/vendor/composer/InstalledVersions.php

    r2706025 r2955014  
    2929    /**
    3030     * @var mixed[]|null
    31      * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
     31     * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
    3232     */
    3333    private static $installed;
     
    4040    /**
    4141     * @var array[]
    42      * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
     42     * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
    4343     */
    4444    private static $installedByVendor = array();
     
    9999        foreach (self::getInstalled() as $installed) {
    100100            if (isset($installed['versions'][$packageName])) {
    101                 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
     101                return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
    102102            }
    103103        }
     
    120120    public static function satisfies(VersionParser $parser, $packageName, $constraint)
    121121    {
    122         $constraint = $parser->parseConstraints($constraint);
     122        $constraint = $parser->parseConstraints((string) $constraint);
    123123        $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
    124124
     
    244244    /**
    245245     * @return array
    246      * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
     246     * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
    247247     */
    248248    public static function getRootPackage()
     
    258258     * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
    259259     * @return array[]
    260      * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
     260     * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
    261261     */
    262262    public static function getRawData()
     
    281281     *
    282282     * @return array[]
    283      * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
     283     * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
    284284     */
    285285    public static function getAllRawData()
     
    304304     * @return void
    305305     *
    306      * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
     306     * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
    307307     */
    308308    public static function reload($data)
     
    314314    /**
    315315     * @return array[]
    316      * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
     316     * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
    317317     */
    318318    private static function getInstalled()
     
    329329                    $installed[] = self::$installedByVendor[$vendorDir];
    330330                } elseif (is_file($vendorDir.'/composer/installed.php')) {
    331                     $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
     331                    /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
     332                    $required = require $vendorDir.'/composer/installed.php';
     333                    $installed[] = self::$installedByVendor[$vendorDir] = $required;
    332334                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    333335                        self::$installed = $installed[count($installed) - 1];
     
    341343            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
    342344            if (substr(__DIR__, -8, 1) !== 'C') {
    343                 self::$installed = require __DIR__ . '/installed.php';
     345                /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
     346                $required = require __DIR__ . '/installed.php';
     347                self::$installed = $required;
    344348            } else {
    345349                self::$installed = array();
    346350            }
    347351        }
    348         $installed[] = self::$installed;
     352
     353        if (self::$installed !== array()) {
     354            $installed[] = self::$installed;
     355        }
    349356
    350357        return $installed;
  • bitfinex-pay/trunk/vendor/composer/autoload_files.php

    r2866500 r2955014  
    88return array(
    99    '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
    10     'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
    1110    '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
    1211    '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
  • bitfinex-pay/trunk/vendor/composer/autoload_real.php

    r2904091 r2955014  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit670d59c1e8b39bbe6a8a38fe1b1f611a
     5class ComposerAutoloaderInit5b6802600d5981fe38be608127331a9f
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit670d59c1e8b39bbe6a8a38fe1b1f611a', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInit5b6802600d5981fe38be608127331a9f', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit670d59c1e8b39bbe6a8a38fe1b1f611a', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInit5b6802600d5981fe38be608127331a9f', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         \Composer\Autoload\ComposerStaticInit670d59c1e8b39bbe6a8a38fe1b1f611a::getInitializer($loader)();
     32        call_user_func(\Composer\Autoload\ComposerStaticInit5b6802600d5981fe38be608127331a9f::getInitializer($loader));
    3333
    3434        $loader->register(true);
    3535
    36         $includeFiles = \Composer\Autoload\ComposerStaticInit670d59c1e8b39bbe6a8a38fe1b1f611a::$files;
    37         foreach ($includeFiles as $fileIdentifier => $file) {
    38             composerRequire670d59c1e8b39bbe6a8a38fe1b1f611a($fileIdentifier, $file);
     36        $filesToLoad = \Composer\Autoload\ComposerStaticInit5b6802600d5981fe38be608127331a9f::$files;
     37        $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
     38            if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
     39                $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
     40
     41                require $file;
     42            }
     43        }, null, null);
     44        foreach ($filesToLoad as $fileIdentifier => $file) {
     45            $requireFile($fileIdentifier, $file);
    3946        }
    4047
     
    4249    }
    4350}
    44 
    45 /**
    46  * @param string $fileIdentifier
    47  * @param string $file
    48  * @return void
    49  */
    50 function composerRequire670d59c1e8b39bbe6a8a38fe1b1f611a($fileIdentifier, $file)
    51 {
    52     if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
    53         $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
    54 
    55         require $file;
    56     }
    57 }
  • bitfinex-pay/trunk/vendor/composer/autoload_static.php

    r2904091 r2955014  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit670d59c1e8b39bbe6a8a38fe1b1f611a
     7class ComposerStaticInit5b6802600d5981fe38be608127331a9f
    88{
    99    public static $files = array (
    1010        '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
    11         'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
    1211        '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
    1312        '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
     
    5958    {
    6059        return \Closure::bind(function () use ($loader) {
    61             $loader->prefixLengthsPsr4 = ComposerStaticInit670d59c1e8b39bbe6a8a38fe1b1f611a::$prefixLengthsPsr4;
    62             $loader->prefixDirsPsr4 = ComposerStaticInit670d59c1e8b39bbe6a8a38fe1b1f611a::$prefixDirsPsr4;
    63             $loader->classMap = ComposerStaticInit670d59c1e8b39bbe6a8a38fe1b1f611a::$classMap;
     60            $loader->prefixLengthsPsr4 = ComposerStaticInit5b6802600d5981fe38be608127331a9f::$prefixLengthsPsr4;
     61            $loader->prefixDirsPsr4 = ComposerStaticInit5b6802600d5981fe38be608127331a9f::$prefixDirsPsr4;
     62            $loader->classMap = ComposerStaticInit5b6802600d5981fe38be608127331a9f::$classMap;
    6463
    6564        }, null, ClassLoader::class);
  • bitfinex-pay/trunk/vendor/composer/installed.json

    r2867137 r2955014  
    33        {
    44            "name": "guzzlehttp/guzzle",
    5             "version": "7.5.0",
    6             "version_normalized": "7.5.0.0",
     5            "version": "7.7.0",
     6            "version_normalized": "7.7.0.0",
    77            "source": {
    88                "type": "git",
    99                "url": "https://github.com/guzzle/guzzle.git",
    10                 "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba"
    11             },
    12             "dist": {
    13                 "type": "zip",
    14                 "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba",
    15                 "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba",
     10                "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5"
     11            },
     12            "dist": {
     13                "type": "zip",
     14                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5",
     15                "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5",
    1616                "shasum": ""
    1717            },
    1818            "require": {
    1919                "ext-json": "*",
    20                 "guzzlehttp/promises": "^1.5",
    21                 "guzzlehttp/psr7": "^1.9 || ^2.4",
     20                "guzzlehttp/promises": "^1.5.3 || ^2.0",
     21                "guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
    2222                "php": "^7.2.5 || ^8.0",
    2323                "psr/http-client": "^1.0",
     
    3030                "bamarni/composer-bin-plugin": "^1.8.1",
    3131                "ext-curl": "*",
    32                 "php-http/client-integration-tests": "^3.0",
     32                "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
     33                "php-http/message-factory": "^1.1",
    3334                "phpunit/phpunit": "^8.5.29 || ^9.5.23",
    3435                "psr/log": "^1.1 || ^2.0 || ^3.0"
     
    3940                "psr/log": "Required for using the Log middleware"
    4041            },
    41             "time": "2022-08-28T15:39:27+00:00",
     42            "time": "2023-05-21T14:04:53+00:00",
    4243            "type": "library",
    4344            "extra": {
     
    4546                    "bin-links": true,
    4647                    "forward-command": false
    47                 },
    48                 "branch-alias": {
    49                     "dev-master": "7.5-dev"
    5048                }
    5149            },
     
    114112            "support": {
    115113                "issues": "https://github.com/guzzle/guzzle/issues",
    116                 "source": "https://github.com/guzzle/guzzle/tree/7.5.0"
     114                "source": "https://github.com/guzzle/guzzle/tree/7.7.0"
    117115            },
    118116            "funding": [
     
    134132        {
    135133            "name": "guzzlehttp/promises",
    136             "version": "1.5.2",
    137             "version_normalized": "1.5.2.0",
     134            "version": "2.0.0",
     135            "version_normalized": "2.0.0.0",
    138136            "source": {
    139137                "type": "git",
    140138                "url": "https://github.com/guzzle/promises.git",
    141                 "reference": "b94b2807d85443f9719887892882d0329d1e2598"
    142             },
    143             "dist": {
    144                 "type": "zip",
    145                 "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598",
    146                 "reference": "b94b2807d85443f9719887892882d0329d1e2598",
    147                 "shasum": ""
    148             },
    149             "require": {
    150                 "php": ">=5.5"
     139                "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6"
     140            },
     141            "dist": {
     142                "type": "zip",
     143                "url": "https://api.github.com/repos/guzzle/promises/zipball/3a494dc7dc1d7d12e511890177ae2d0e6c107da6",
     144                "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6",
     145                "shasum": ""
     146            },
     147            "require": {
     148                "php": "^7.2.5 || ^8.0"
    151149            },
    152150            "require-dev": {
    153                 "symfony/phpunit-bridge": "^4.4 || ^5.1"
    154             },
    155             "time": "2022-08-28T14:55:35+00:00",
     151                "bamarni/composer-bin-plugin": "^1.8.1",
     152                "phpunit/phpunit": "^8.5.29 || ^9.5.23"
     153            },
     154            "time": "2023-05-21T13:50:22+00:00",
    156155            "type": "library",
    157156            "extra": {
    158                 "branch-alias": {
    159                     "dev-master": "1.5-dev"
    160                 }
    161             },
    162             "installation-source": "dist",
    163             "autoload": {
    164                 "files": [
    165                     "src/functions_include.php"
    166                 ],
     157                "bamarni-bin": {
     158                    "bin-links": true,
     159                    "forward-command": false
     160                }
     161            },
     162            "installation-source": "dist",
     163            "autoload": {
    167164                "psr-4": {
    168165                    "GuzzleHttp\\Promise\\": "src/"
     
    201198            "support": {
    202199                "issues": "https://github.com/guzzle/promises/issues",
    203                 "source": "https://github.com/guzzle/promises/tree/1.5.2"
     200                "source": "https://github.com/guzzle/promises/tree/2.0.0"
    204201            },
    205202            "funding": [
     
    221218        {
    222219            "name": "guzzlehttp/psr7",
    223             "version": "2.4.3",
    224             "version_normalized": "2.4.3.0",
     220            "version": "2.5.0",
     221            "version_normalized": "2.5.0.0",
    225222            "source": {
    226223                "type": "git",
    227224                "url": "https://github.com/guzzle/psr7.git",
    228                 "reference": "67c26b443f348a51926030c83481b85718457d3d"
    229             },
    230             "dist": {
    231                 "type": "zip",
    232                 "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d",
    233                 "reference": "67c26b443f348a51926030c83481b85718457d3d",
     225                "reference": "b635f279edd83fc275f822a1188157ffea568ff6"
     226            },
     227            "dist": {
     228                "type": "zip",
     229                "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6",
     230                "reference": "b635f279edd83fc275f822a1188157ffea568ff6",
    234231                "shasum": ""
    235232            },
     
    237234                "php": "^7.2.5 || ^8.0",
    238235                "psr/http-factory": "^1.0",
    239                 "psr/http-message": "^1.0",
     236                "psr/http-message": "^1.1 || ^2.0",
    240237                "ralouphie/getallheaders": "^3.0"
    241238            },
     
    252249                "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
    253250            },
    254             "time": "2022-10-26T14:07:24+00:00",
     251            "time": "2023-04-17T16:11:26+00:00",
    255252            "type": "library",
    256253            "extra": {
     
    258255                    "bin-links": true,
    259256                    "forward-command": false
    260                 },
    261                 "branch-alias": {
    262                     "dev-master": "2.4-dev"
    263257                }
    264258            },
     
    323317            "support": {
    324318                "issues": "https://github.com/guzzle/psr7/issues",
    325                 "source": "https://github.com/guzzle/psr7/tree/2.4.3"
     319                "source": "https://github.com/guzzle/psr7/tree/2.5.0"
    326320            },
    327321            "funding": [
     
    343337        {
    344338            "name": "psr/http-client",
    345             "version": "1.0.1",
    346             "version_normalized": "1.0.1.0",
     339            "version": "1.0.2",
     340            "version_normalized": "1.0.2.0",
    347341            "source": {
    348342                "type": "git",
    349343                "url": "https://github.com/php-fig/http-client.git",
    350                 "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621"
    351             },
    352             "dist": {
    353                 "type": "zip",
    354                 "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
    355                 "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
     344                "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31"
     345            },
     346            "dist": {
     347                "type": "zip",
     348                "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31",
     349                "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31",
    356350                "shasum": ""
    357351            },
    358352            "require": {
    359353                "php": "^7.0 || ^8.0",
    360                 "psr/http-message": "^1.0"
    361             },
    362             "time": "2020-06-29T06:28:15+00:00",
     354                "psr/http-message": "^1.0 || ^2.0"
     355            },
     356            "time": "2023-04-10T20:12:12+00:00",
    363357            "type": "library",
    364358            "extra": {
     
    380374                {
    381375                    "name": "PHP-FIG",
    382                     "homepage": "http://www.php-fig.org/"
     376                    "homepage": "https://www.php-fig.org/"
    383377                }
    384378            ],
     
    392386            ],
    393387            "support": {
    394                 "source": "https://github.com/php-fig/http-client/tree/master"
     388                "source": "https://github.com/php-fig/http-client/tree/1.0.2"
    395389            },
    396390            "install-path": "../psr/http-client"
     
    398392        {
    399393            "name": "psr/http-factory",
    400             "version": "1.0.1",
    401             "version_normalized": "1.0.1.0",
     394            "version": "1.0.2",
     395            "version_normalized": "1.0.2.0",
    402396            "source": {
    403397                "type": "git",
    404398                "url": "https://github.com/php-fig/http-factory.git",
    405                 "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be"
    406             },
    407             "dist": {
    408                 "type": "zip",
    409                 "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
    410                 "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
     399                "reference": "e616d01114759c4c489f93b099585439f795fe35"
     400            },
     401            "dist": {
     402                "type": "zip",
     403                "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35",
     404                "reference": "e616d01114759c4c489f93b099585439f795fe35",
    411405                "shasum": ""
    412406            },
    413407            "require": {
    414408                "php": ">=7.0.0",
    415                 "psr/http-message": "^1.0"
    416             },
    417             "time": "2019-04-30T12:38:16+00:00",
     409                "psr/http-message": "^1.0 || ^2.0"
     410            },
     411            "time": "2023-04-10T20:10:41+00:00",
    418412            "type": "library",
    419413            "extra": {
     
    435429                {
    436430                    "name": "PHP-FIG",
    437                     "homepage": "http://www.php-fig.org/"
     431                    "homepage": "https://www.php-fig.org/"
    438432                }
    439433            ],
     
    450444            ],
    451445            "support": {
    452                 "source": "https://github.com/php-fig/http-factory/tree/master"
     446                "source": "https://github.com/php-fig/http-factory/tree/1.0.2"
    453447            },
    454448            "install-path": "../psr/http-factory"
     
    456450        {
    457451            "name": "psr/http-message",
    458             "version": "1.0.1",
    459             "version_normalized": "1.0.1.0",
     452            "version": "2.0",
     453            "version_normalized": "2.0.0.0",
    460454            "source": {
    461455                "type": "git",
    462456                "url": "https://github.com/php-fig/http-message.git",
    463                 "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
    464             },
    465             "dist": {
    466                 "type": "zip",
    467                 "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
    468                 "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
    469                 "shasum": ""
    470             },
    471             "require": {
    472                 "php": ">=5.3.0"
    473             },
    474             "time": "2016-08-06T14:39:51+00:00",
     457                "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
     458            },
     459            "dist": {
     460                "type": "zip",
     461                "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
     462                "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
     463                "shasum": ""
     464            },
     465            "require": {
     466                "php": "^7.2 || ^8.0"
     467            },
     468            "time": "2023-04-04T09:54:51+00:00",
    475469            "type": "library",
    476470            "extra": {
    477471                "branch-alias": {
    478                     "dev-master": "1.0.x-dev"
     472                    "dev-master": "2.0.x-dev"
    479473                }
    480474            },
     
    492486                {
    493487                    "name": "PHP-FIG",
    494                     "homepage": "http://www.php-fig.org/"
     488                    "homepage": "https://www.php-fig.org/"
    495489                }
    496490            ],
     
    506500            ],
    507501            "support": {
    508                 "source": "https://github.com/php-fig/http-message/tree/master"
     502                "source": "https://github.com/php-fig/http-message/tree/2.0"
    509503            },
    510504            "install-path": "../psr/http-message"
  • bitfinex-pay/trunk/vendor/composer/installed.php

    r2904088 r2955014  
    11<?php return array(
    22    'root' => array(
     3        'name' => '__root__',
    34        'pretty_version' => 'dev-main',
    45        'version' => 'dev-main',
     6        'reference' => '78913cd562843fe3cb4ef87b3b3f3dbeb6f8b109',
    57        'type' => 'library',
    68        'install_path' => __DIR__ . '/../../',
    79        'aliases' => array(),
    8         'reference' => '77d1ead1a71987b5c4b50a40eec57b1276e84748',
    9         'name' => '__root__',
    1010        'dev' => false,
    1111    ),
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
     16            'reference' => '78913cd562843fe3cb4ef87b3b3f3dbeb6f8b109',
    1617            'type' => 'library',
    1718            'install_path' => __DIR__ . '/../../',
    1819            'aliases' => array(),
    19             'reference' => '77d1ead1a71987b5c4b50a40eec57b1276e84748',
    2020            'dev_requirement' => false,
    2121        ),
    2222        'guzzlehttp/guzzle' => array(
    23             'pretty_version' => '7.5.0',
    24             'version' => '7.5.0.0',
     23            'pretty_version' => '7.7.0',
     24            'version' => '7.7.0.0',
     25            'reference' => 'fb7566caccf22d74d1ab270de3551f72a58399f5',
    2526            'type' => 'library',
    2627            'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
    2728            'aliases' => array(),
    28             'reference' => 'b50a2a1251152e43f6a37f0fa053e730a67d25ba',
    2929            'dev_requirement' => false,
    3030        ),
    3131        'guzzlehttp/promises' => array(
    32             'pretty_version' => '1.5.2',
    33             'version' => '1.5.2.0',
     32            'pretty_version' => '2.0.0',
     33            'version' => '2.0.0.0',
     34            'reference' => '3a494dc7dc1d7d12e511890177ae2d0e6c107da6',
    3435            'type' => 'library',
    3536            'install_path' => __DIR__ . '/../guzzlehttp/promises',
    3637            'aliases' => array(),
    37             'reference' => 'b94b2807d85443f9719887892882d0329d1e2598',
    3838            'dev_requirement' => false,
    3939        ),
    4040        'guzzlehttp/psr7' => array(
    41             'pretty_version' => '2.4.3',
    42             'version' => '2.4.3.0',
     41            'pretty_version' => '2.5.0',
     42            'version' => '2.5.0.0',
     43            'reference' => 'b635f279edd83fc275f822a1188157ffea568ff6',
    4344            'type' => 'library',
    4445            'install_path' => __DIR__ . '/../guzzlehttp/psr7',
    4546            'aliases' => array(),
    46             'reference' => '67c26b443f348a51926030c83481b85718457d3d',
    4747            'dev_requirement' => false,
    4848        ),
    4949        'psr/http-client' => array(
    50             'pretty_version' => '1.0.1',
    51             'version' => '1.0.1.0',
     50            'pretty_version' => '1.0.2',
     51            'version' => '1.0.2.0',
     52            'reference' => '0955afe48220520692d2d09f7ab7e0f93ffd6a31',
    5253            'type' => 'library',
    5354            'install_path' => __DIR__ . '/../psr/http-client',
    5455            'aliases' => array(),
    55             'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621',
    5656            'dev_requirement' => false,
    5757        ),
     
    6363        ),
    6464        'psr/http-factory' => array(
    65             'pretty_version' => '1.0.1',
    66             'version' => '1.0.1.0',
     65            'pretty_version' => '1.0.2',
     66            'version' => '1.0.2.0',
     67            'reference' => 'e616d01114759c4c489f93b099585439f795fe35',
    6768            'type' => 'library',
    6869            'install_path' => __DIR__ . '/../psr/http-factory',
    6970            'aliases' => array(),
    70             'reference' => '12ac7fcd07e5b077433f5f2bee95b3a771bf61be',
    7171            'dev_requirement' => false,
    7272        ),
     
    7878        ),
    7979        'psr/http-message' => array(
    80             'pretty_version' => '1.0.1',
    81             'version' => '1.0.1.0',
     80            'pretty_version' => '2.0',
     81            'version' => '2.0.0.0',
     82            'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71',
    8283            'type' => 'library',
    8384            'install_path' => __DIR__ . '/../psr/http-message',
    8485            'aliases' => array(),
    85             'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
    8686            'dev_requirement' => false,
    8787        ),
     
    9595            'pretty_version' => '3.0.3',
    9696            'version' => '3.0.3.0',
     97            'reference' => '120b605dfeb996808c31b6477290a714d356e822',
    9798            'type' => 'library',
    9899            'install_path' => __DIR__ . '/../ralouphie/getallheaders',
    99100            'aliases' => array(),
    100             'reference' => '120b605dfeb996808c31b6477290a714d356e822',
    101101            'dev_requirement' => false,
    102102        ),
     
    104104            'pretty_version' => 'v2.5.2',
    105105            'version' => '2.5.2.0',
     106            'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66',
    106107            'type' => 'library',
    107108            'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
    108109            'aliases' => array(),
    109             'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66',
    110110            'dev_requirement' => false,
    111111        ),
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/CHANGELOG.md

    r2866500 r2955014  
    22
    33Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version.
     4
     5
     6## 7.7.0 - 2023-05-21
     7
     8### Added
     9
     10- Support `guzzlehttp/promises` v2
     11
     12
     13## 7.6.1 - 2023-05-15
     14
     15### Fixed
     16
     17- Fix `SetCookie::fromString` MaxAge deprecation warning and skip invalid MaxAge values
     18
     19
     20## 7.6.0 - 2023-05-14
     21
     22### Added
     23
     24- Support for setting the minimum TLS version in a unified way
     25- Apply on request the version set in options parameters
     26
     27
     28## 7.5.2 - 2023-05-14
     29
     30### Fixed
     31
     32- Fixed set cookie constructor validation
     33- Fixed handling of files with `'0'` body
     34
     35### Changed
     36
     37- Corrected docs and default connect timeout value to 300 seconds
     38
     39
     40## 7.5.1 - 2023-04-17
     41
     42### Fixed
     43
     44- Fixed `NO_PROXY` settings so that setting the `proxy` option to `no` overrides the env variable
     45
     46### Changed
     47
     48- Adjusted `guzzlehttp/psr7` version constraint to `^1.9.1 || ^2.4.5`
     49
    450
    551## 7.5.0 - 2022-08-28
     
    1056- Add request to delay closure params
    1157
     58
    1259## 7.4.5 - 2022-06-20
     60
     61### Fixed
    1362
    1463* Fix change in port should be considered a change in origin
    1564* Fix `CURLOPT_HTTPAUTH` option not cleared on change of origin
    1665
     66
    1767## 7.4.4 - 2022-06-09
     68
     69### Fixed
    1870
    1971* Fix failure to strip Authorization header on HTTP downgrade
    2072* Fix failure to strip the Cookie header on change in host or HTTP downgrade
    2173
     74
    2275## 7.4.3 - 2022-05-25
    2376
     77### Fixed
     78
    2479* Fix cross-domain cookie leakage
     80
    2581
    2682## 7.4.2 - 2022-03-20
     
    3288- Set a default ssl.peer_name context in StreamHandler to allow `force_ip_resolve`
    3389
     90
    3491## 7.4.1 - 2021-12-06
    3592
     
    4299
    43100- Only close curl handle if it's done [#2950](https://github.com/guzzle/guzzle/pull/2950)
     101
    44102
    45103## 7.4.0 - 2021-10-18
     
    60118- Be more strict with types [#2914](https://github.com/guzzle/guzzle/pull/2914), [#2917](https://github.com/guzzle/guzzle/pull/2917), [#2919](https://github.com/guzzle/guzzle/pull/2919), [#2945](https://github.com/guzzle/guzzle/pull/2945)
    61119
     120
    62121## 7.3.0 - 2021-03-23
    63122
     
    72131- Handle exceptions on invalid header consistently between PHP versions and handlers [#2872](https://github.com/guzzle/guzzle/pull/2872)
    73132
     133
    74134## 7.2.0 - 2020-10-10
    75135
     
    94154- Using environment variable GUZZLE_CURL_SELECT_TIMEOUT [#2786](https://github.com/guzzle/guzzle/pull/2786)
    95155
     156
    96157## 7.1.1 - 2020-09-30
    97158
     
    104165- We dont connect curl `sink` on HEAD requests.
    105166- Removed some PHP 5 workarounds
     167
    106168
    107169## 7.1.0 - 2020-09-22
     
    127189- `CurlFactory::LOW_CURL_VERSION_NUMBER`
    128190
     191
    129192## 7.0.1 - 2020-06-27
    130193
    131194* Fix multiply defined functions fatal error [#2699](https://github.com/guzzle/guzzle/pull/2699)
    132195
     196
    133197## 7.0.0 - 2020-06-27
    134198
    135199No changes since 7.0.0-rc1.
     200
    136201
    137202## 7.0.0-rc1 - 2020-06-15
     
    141206* Use error level for logging errors in Middleware [#2629](https://github.com/guzzle/guzzle/pull/2629)
    142207* Disabled IDN support by default and require ext-intl to use it [#2675](https://github.com/guzzle/guzzle/pull/2675)
     208
    143209
    144210## 7.0.0-beta2 - 2020-05-25
     
    167233* Pool option `pool_size` [#2528](https://github.com/guzzle/guzzle/pull/2528)
    168234
     235
    169236## 7.0.0-beta1 - 2019-12-30
    170237
     
    200267* Request options `save_to` and `exceptions` [#2464](https://github.com/guzzle/guzzle/pull/2464)
    201268
     269
    202270## 6.5.2 - 2019-12-23
    203271
    204272* idn_to_ascii() fix for old PHP versions [#2489](https://github.com/guzzle/guzzle/pull/2489)
     273
    205274
    206275## 6.5.1 - 2019-12-21
     
    208277* Better defaults for PHP installations with old ICU lib [#2454](https://github.com/guzzle/guzzle/pull/2454)
    209278* IDN support for redirects [#2424](https://github.com/guzzle/guzzle/pull/2424)
     279
    210280
    211281## 6.5.0 - 2019-12-07
     
    218288* Deprecated `ClientInterface::VERSION`
    219289
     290
    220291## 6.4.1 - 2019-10-23
    221292
    222293* No `guzzle.phar` was created in 6.4.0 due expired API token. This release will fix that
    223294* Added `parent::__construct()` to `FileCookieJar` and `SessionCookieJar`
     295
    224296
    225297## 6.4.0 - 2019-10-23
     
    234306* Fix: Prevent concurrent writes to file when saving `CookieJar` [#2335](https://github.com/guzzle/guzzle/pull/2335)
    235307* Improvement: Update `MockHandler` so we can test transfer time [#2362](https://github.com/guzzle/guzzle/pull/2362)
     308
    236309
    237310## 6.3.3 - 2018-04-22
     
    276349* Improvement:      Use `\GuzzleHttp\Promise\rejection_for` function instead of object init [#1827](https://github.com/guzzle/guzzle/pull/1827)
    277350
    278 
    279351+ Minor code cleanups, documentation fixes and clarifications.
    280352
     353
    281354## 6.2.3 - 2017-02-28
    282355
    283356* Fix deprecations with guzzle/psr7 version 1.4
     357
    284358
    285359## 6.2.2 - 2016-10-08
     
    289363* Fix drain case where content-length is the literal string zero
    290364* Obfuscate in-URL credentials in exceptions
     365
    291366
    292367## 6.2.1 - 2016-07-18
     
    299374  a server does not honor `Connection: close`.
    300375* Ignore URI fragment when sending requests.
     376
    301377
    302378## 6.2.0 - 2016-03-21
     
    319395  https://github.com/guzzle/guzzle/pull/1367
    320396
     397
    321398## 6.1.1 - 2015-11-22
    322399
     
    333410* Bug fix: fixed regression where MockHandler was not using `sink`.
    334411  https://github.com/guzzle/guzzle/pull/1292
     412
    335413
    336414## 6.1.0 - 2015-09-08
     
    368446  https://github.com/guzzle/guzzle/pull/1189
    369447
     448
    370449## 6.0.2 - 2015-07-04
    371450
     
    385464  indirection to help with global Composer installations.
    386465
     466
    387467## 6.0.1 - 2015-05-27
    388468
     
    392472  use `form_params` or `multipart` instead.
    393473* Various doc fixes.
     474
    394475
    395476## 6.0.0 - 2015-05-26
     
    417498* `MultipartPostBody` is now part of the `guzzlehttp/psr7` package.
    418499
     500
    419501## 5.3.0 - 2015-05-19
    420502
     
    426508* Marked `GuzzleHttp\Client::getDefaultUserAgent` as deprecated.
    427509* URL scheme is now always lowercased.
     510
    428511
    429512## 6.0.0-beta.1
     
    479562  `GuzzleHttp\Psr7\parse_query`.
    480563
     564
    481565## 5.2.0 - 2015-01-27
    482566
     
    488572  RingBridge.
    489573* Added a guard in the Pool class to not use recursion for request retries.
     574
    490575
    491576## 5.1.0 - 2014-12-19
     
    509594  specific exceptions if necessary.
    510595
     596
    511597## 5.0.3 - 2014-11-03
    512598
     
    523609object).
    524610
     611
    525612## 5.0.2 - 2014-10-30
    526613
     
    544631    query string without being percent encoded. See https://tools.ietf.org/html/rfc3986#appendix-A
    545632
     633
    546634## 5.0.1 - 2014-10-16
    547635
     
    554642* Fixed an issue where transfer statistics were not being populated in the
    555643  RingBridge. https://github.com/guzzle/guzzle/issues/866
     644
    556645
    557646## 5.0.0 - 2014-10-12
     
    635724      argument. They now accept an associative array of options, including the
    636725      "size" key and "metadata" key which can be used to provide custom metadata.
     726
    637727
    638728## 4.2.2 - 2014-09-08
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/README.md

    r2866500 r2955014  
    6161## Version Guidance
    6262
    63 | Version | Status         | Packagist           | Namespace    | Repo                | Docs                | PSR-7 | PHP Version  |
    64 |---------|----------------|---------------------|--------------|---------------------|---------------------|-------|--------------|
    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 | `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.2 |
     63| Version | Status              | Packagist           | Namespace    | Repo                | Docs                | PSR-7 | PHP Version  |
     64|---------|---------------------|---------------------|--------------|---------------------|---------------------|-------|--------------|
     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.3 |
    7070
    7171[guzzle-3-repo]: https://github.com/guzzle/guzzle3
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/composer.json

    r2866500 r2955014  
    5454        "php": "^7.2.5 || ^8.0",
    5555        "ext-json": "*",
    56         "guzzlehttp/promises": "^1.5",
    57         "guzzlehttp/psr7": "^1.9 || ^2.4",
     56        "guzzlehttp/promises": "^1.5.3 || ^2.0",
     57        "guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
    5858        "psr/http-client": "^1.0",
    5959        "symfony/deprecation-contracts": "^2.2 || ^3.0"
     
    6565        "ext-curl": "*",
    6666        "bamarni/composer-bin-plugin": "^1.8.1",
    67         "php-http/client-integration-tests": "^3.0",
     67        "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
     68        "php-http/message-factory": "^1.1",
    6869        "phpunit/phpunit": "^8.5.29 || ^9.5.23",
    6970        "psr/log": "^1.1 || ^2.0 || ^3.0"
     
    8586            "bin-links": true,
    8687            "forward-command": false
    87         },
    88         "branch-alias": {
    89             "dev-master": "7.5-dev"
    9088        }
    9189    },
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/Client.php

    r2866500 r2955014  
    121121    {
    122122        $options[RequestOptions::SYNCHRONOUS] = true;
     123
    123124        return $this->sendAsync($request, $options)->wait();
    124125    }
     
    127128     * The HttpClient PSR (PSR-18) specify this method.
    128129     *
    129      * @inheritDoc
     130     * {@inheritDoc}
    130131     */
    131132    public function sendRequest(RequestInterface $request): ResponseInterface
     
    185186    {
    186187        $options[RequestOptions::SYNCHRONOUS] = true;
     188
    187189        return $this->requestAsync($method, $uri, $options)->wait();
    188190    }
     
    229231        $defaults = [
    230232            'allow_redirects' => RedirectMiddleware::$defaultSettings,
    231             'http_errors'     => true,
    232             'decode_content'  => true,
    233             'verify'          => true,
    234             'cookies'         => false,
    235             'idn_conversion'  => false,
     233            'http_errors' => true,
     234            'decode_content' => true,
     235            'verify' => true,
     236            'cookies' => false,
     237            'idn_conversion' => false,
    236238        ];
    237239
     
    355357            if (isset($options['multipart'])) {
    356358                throw new InvalidArgumentException('You cannot use '
    357                     . 'form_params and multipart at the same time. Use the '
    358                     . 'form_params option if you want to send application/'
    359                     . 'x-www-form-urlencoded requests, and the multipart '
    360                     . 'option to send multipart/form-data requests.');
     359                    .'form_params and multipart at the same time. Use the '
     360                    .'form_params option if you want to send application/'
     361                    .'x-www-form-urlencoded requests, and the multipart '
     362                    .'option to send multipart/form-data requests.');
    361363            }
    362364            $options['body'] = \http_build_query($options['form_params'], '', '&');
     
    404406                    $modify['set_headers'] = Psr7\Utils::caselessRemove(['Authorization'], $modify['set_headers']);
    405407                    $modify['set_headers']['Authorization'] = 'Basic '
    406                         . \base64_encode("$value[0]:$value[1]");
     408                        .\base64_encode("$value[0]:$value[1]");
    407409                    break;
    408410                case 'digest':
     
    438440        }
    439441
     442        if (isset($options['version'])) {
     443            $modify['version'] = $options['version'];
     444        }
     445
    440446        $request = Psr7\Utils::modifyRequest($request, $modify);
    441447        if ($request->getBody() instanceof Psr7\MultipartStream) {
     
    444450            $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']);
    445451            $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary='
    446                 . $request->getBody()->getBoundary();
     452                .$request->getBody()->getBoundary();
    447453        }
    448454
     
    470476    {
    471477        return new InvalidArgumentException('Passing in the "body" request '
    472             . 'option as an array to send a request is not supported. '
    473             . 'Please use the "form_params" request option to send a '
    474             . 'application/x-www-form-urlencoded request, or the "multipart" '
    475             . 'request option to send a multipart/form-data request.');
     478            .'option as an array to send a request is not supported. '
     479            .'Please use the "form_params" request option to send a '
     480            .'application/x-www-form-urlencoded request, or the "multipart" '
     481            .'request option to send a multipart/form-data request.');
    476482    }
    477483}
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php

    r2866500 r2955014  
    5151        foreach ($cookies as $name => $value) {
    5252            $cookieJar->setCookie(new SetCookie([
    53                 'Domain'  => $domain,
    54                 'Name'    => $name,
    55                 'Value'   => $value,
    56                 'Discard' => true
     53                'Domain' => $domain,
     54                'Name' => $name,
     55                'Value' => $value,
     56                'Discard' => true,
    5757            ]));
    5858        }
     
    9898
    9999    /**
    100      * @inheritDoc
     100     * {@inheritDoc}
    101101     */
    102102    public function toArray(): array
     
    108108
    109109    /**
    110      * @inheritDoc
     110     * {@inheritDoc}
    111111     */
    112112    public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void
     
    114114        if (!$domain) {
    115115            $this->cookies = [];
     116
    116117            return;
    117118        } elseif (!$path) {
     
    143144
    144145    /**
    145      * @inheritDoc
     146     * {@inheritDoc}
    146147     */
    147148    public function clearSessionCookies(): void
     
    156157
    157158    /**
    158      * @inheritDoc
     159     * {@inheritDoc}
    159160     */
    160161    public function setCookie(SetCookie $cookie): bool
     
    171172        if ($result !== true) {
    172173            if ($this->strictMode) {
    173                 throw new \RuntimeException('Invalid cookie: ' . $result);
     174                throw new \RuntimeException('Invalid cookie: '.$result);
    174175            }
    175176            $this->removeCookieIfEmpty($cookie);
     177
    176178            return false;
    177179        }
     
    254256     * Computes cookie path following RFC 6265 section 5.1.4
    255257     *
    256      * @link https://tools.ietf.org/html/rfc6265#section-5.1.4
     258     * @see https://tools.ietf.org/html/rfc6265#section-5.1.4
    257259     */
    258260    private function getCookiePathFromRequest(RequestInterface $request): string
     
    290292                (!$cookie->getSecure() || $scheme === 'https')
    291293            ) {
    292                 $values[] = $cookie->getName() . '='
    293                     . $cookie->getValue();
     294                $values[] = $cookie->getName().'='
     295                    .$cookie->getValue();
    294296            }
    295297        }
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php

    r2866500 r2955014  
    1414 * cookies from a file, database, etc.
    1515 *
    16  * @link https://docs.python.org/2/library/cookielib.html Inspiration
     16 * @see https://docs.python.org/2/library/cookielib.html Inspiration
    1717 * @extends \IteratorAggregate<SetCookie>
    1818 */
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php

    r2706025 r2955014  
    7272            }
    7373        } elseif (\strlen($data)) {
    74             throw new \RuntimeException("Invalid cookie data");
     74            throw new \RuntimeException('Invalid cookie data');
    7575        }
    7676    }
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php

    r2866500 r2955014  
    1212     */
    1313    private static $defaults = [
    14         'Name'     => null,
    15         'Value'    => null,
    16         'Domain'   => null,
    17         'Path'     => '/',
    18         'Max-Age'  => null,
    19         'Expires'  => null,
    20         'Secure'   => false,
    21         'Discard'  => false,
    22         'HttpOnly' => false
     14        'Name' => null,
     15        'Value' => null,
     16        'Domain' => null,
     17        'Path' => '/',
     18        'Max-Age' => null,
     19        'Expires' => null,
     20        'Secure' => false,
     21        'Discard' => false,
     22        'HttpOnly' => false,
    2323    ];
    2424
     
    5959                foreach (\array_keys(self::$defaults) as $search) {
    6060                    if (!\strcasecmp($search, $key)) {
    61                         $data[$search] = $value;
     61                        if ($search === 'Max-Age') {
     62                            if (is_numeric($value)) {
     63                                $data[$search] = (int) $value;
     64                            }
     65                        } else {
     66                            $data[$search] = $value;
     67                        }
    6268                        continue 2;
    6369                    }
     
    7581    public function __construct(array $data = [])
    7682    {
    77         /** @var array|null $replaced will be null in case of replace error */
    78         $replaced = \array_replace(self::$defaults, $data);
    79         if ($replaced === null) {
    80             throw new \InvalidArgumentException('Unable to replace the default values for the Cookie.');
    81         }
    82 
    83         $this->data = $replaced;
     83        $this->data = self::$defaults;
     84
     85        if (isset($data['Name'])) {
     86            $this->setName($data['Name']);
     87        }
     88
     89        if (isset($data['Value'])) {
     90            $this->setValue($data['Value']);
     91        }
     92
     93        if (isset($data['Domain'])) {
     94            $this->setDomain($data['Domain']);
     95        }
     96
     97        if (isset($data['Path'])) {
     98            $this->setPath($data['Path']);
     99        }
     100
     101        if (isset($data['Max-Age'])) {
     102            $this->setMaxAge($data['Max-Age']);
     103        }
     104
     105        if (isset($data['Expires'])) {
     106            $this->setExpires($data['Expires']);
     107        }
     108
     109        if (isset($data['Secure'])) {
     110            $this->setSecure($data['Secure']);
     111        }
     112
     113        if (isset($data['Discard'])) {
     114            $this->setDiscard($data['Discard']);
     115        }
     116
     117        if (isset($data['HttpOnly'])) {
     118            $this->setHttpOnly($data['HttpOnly']);
     119        }
     120
     121        // Set the remaining values that don't have extra validation logic
     122        foreach (array_diff(array_keys($data), array_keys(self::$defaults)) as $key) {
     123            $this->data[$key] = $data[$key];
     124        }
     125
    84126        // Extract the Expires value and turn it into a UNIX timestamp if needed
    85127        if (!$this->getExpires() && $this->getMaxAge()) {
     
    93135    public function __toString()
    94136    {
    95         $str = $this->data['Name'] . '=' . ($this->data['Value'] ?? '') . '; ';
     137        $str = $this->data['Name'].'='.($this->data['Value'] ?? '').'; ';
    96138        foreach ($this->data as $k => $v) {
    97139            if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) {
    98140                if ($k === 'Expires') {
    99                     $str .= 'Expires=' . \gmdate('D, d M Y H:i:s \G\M\T', $v) . '; ';
     141                    $str .= 'Expires='.\gmdate('D, d M Y H:i:s \G\M\T', $v).'; ';
    100142                } else {
    101                     $str .= ($v === true ? $k : "{$k}={$v}") . '; ';
     143                    $str .= ($v === true ? $k : "{$k}={$v}").'; ';
    102144                }
    103145            }
     
    395437        }
    396438
    397         return (bool) \preg_match('/\.' . \preg_quote($cookieDomain, '/') . '$/', $domain);
     439        return (bool) \preg_match('/\.'.\preg_quote($cookieDomain, '/').'$/', $domain);
    398440    }
    399441
     
    424466        )) {
    425467            return 'Cookie name must not contain invalid characters: ASCII '
    426                 . 'Control characters (0-31;127), space, tab and the '
    427                 . 'following characters: ()<>@,;:\"/?={}';
     468                .'Control characters (0-31;127), space, tab and the '
     469                .'following characters: ()<>@,;:\"/?={}';
    428470        }
    429471
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php

    r2866500 r2955014  
    5252        }
    5353
    54         $easy = new EasyHandle;
     54        $easy = new EasyHandle();
    5555        $easy->request = $request;
    5656        $easy->options = $options;
     
    162162    {
    163163        static $connectionErrors = [
    164             \CURLE_OPERATION_TIMEOUTED  => true,
     164            \CURLE_OPERATION_TIMEOUTED => true,
    165165            \CURLE_COULDNT_RESOLVE_HOST => true,
    166             \CURLE_COULDNT_CONNECT      => true,
    167             \CURLE_SSL_CONNECT_ERROR    => true,
    168             \CURLE_GOT_NOTHING          => true,
     166            \CURLE_COULDNT_CONNECT => true,
     167            \CURLE_SSL_CONNECT_ERROR => true,
     168            \CURLE_GOT_NOTHING => true,
    169169        ];
    170170
     
    220220    {
    221221        $conf = [
    222             '_headers'              => $easy->request->getHeaders(),
    223             \CURLOPT_CUSTOMREQUEST  => $easy->request->getMethod(),
    224             \CURLOPT_URL            => (string) $easy->request->getUri()->withFragment(''),
     222            '_headers' => $easy->request->getHeaders(),
     223            \CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(),
     224            \CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''),
    225225            \CURLOPT_RETURNTRANSFER => false,
    226             \CURLOPT_HEADER         => false,
    227             \CURLOPT_CONNECTTIMEOUT => 150,
     226            \CURLOPT_HEADER => false,
     227            \CURLOPT_CONNECTTIMEOUT => 300,
    228228        ];
    229229
     
    251251        if ($size === null || $size > 0) {
    252252            $this->applyBody($easy->request, $easy->options, $conf);
     253
    253254            return;
    254255        }
     
    342343            if (!\strcasecmp($key, $name)) {
    343344                unset($options['_headers'][$key]);
     345
    344346                return;
    345347            }
     
    444446                if (isset($options['proxy'][$scheme])) {
    445447                    $host = $easy->request->getUri()->getHost();
    446                     if (!isset($options['proxy']['no']) || !Utils::isHostInNoProxy($host, $options['proxy']['no'])) {
     448                    if (isset($options['proxy']['no']) && Utils::isHostInNoProxy($host, $options['proxy']['no'])) {
     449                        unset($conf[\CURLOPT_PROXY]);
     450                    } else {
    447451                        $conf[\CURLOPT_PROXY] = $options['proxy'][$scheme];
    448452                    }
    449453                }
     454            }
     455        }
     456
     457        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                }
     462                $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_0;
     463            } 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                }
     467                $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_1;
     468            } elseif (\STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method']) {
     469                if (!defined('CURL_SSLVERSION_TLSv1_2')) {
     470                    throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.2 not supported by your version of cURL');
     471                }
     472                $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2;
     473            } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) {
     474                if (!defined('CURL_SSLVERSION_TLSv1_3')) {
     475                    throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL');
     476                }
     477                $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_3;
     478            } else {
     479                throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided');
    450480            }
    451481        }
     
    460490                throw new \InvalidArgumentException("SSL certificate not found: {$cert}");
    461491            }
    462             # OpenSSL (versions 0.9.3 and later) also support "P12" for PKCS#12-encoded files.
    463             # see https://curl.se/libcurl/c/CURLOPT_SSLCERTTYPE.html
     492            // OpenSSL (versions 0.9.3 and later) also support "P12" for PKCS#12-encoded files.
     493            // see https://curl.se/libcurl/c/CURLOPT_SSLCERTTYPE.html
    464494            $ext = pathinfo($cert, \PATHINFO_EXTENSION);
    465495            if (preg_match('#^(der|p12)$#i', $ext)) {
     
    524554        } catch (\RuntimeException $e) {
    525555            $ctx['error'] = 'The connection unexpectedly failed without '
    526                 . 'providing an error. The request would have been retried, '
    527                 . 'but attempting to rewind the request body failed. '
    528                 . 'Exception: ' . $e;
     556                .'providing an error. The request would have been retried, '
     557                .'but attempting to rewind the request body failed. '
     558                .'Exception: '.$e;
     559
    529560            return self::createRejection($easy, $ctx);
    530561        }
     
    535566        } elseif ($easy->options['_curl_retries'] == 2) {
    536567            $ctx['error'] = 'The cURL request was retried 3 times '
    537                 . 'and did not succeed. The most likely reason for the failure '
    538                 . 'is that cURL was unable to rewind the body of the request '
    539                 . 'and subsequent retries resulted in the same error. Turn on '
    540                 . 'the debug option to see what went wrong. See '
    541                 . 'https://bugs.php.net/bug.php?id=47204 for more information.';
     568                .'and did not succeed. The most likely reason for the failure '
     569                .'is that cURL was unable to rewind the body of the request '
     570                .'and subsequent retries resulted in the same error. Turn on '
     571                .'the debug option to see what went wrong. See '
     572                .'https://bugs.php.net/bug.php?id=47204 for more information.';
     573
    542574            return self::createRejection($easy, $ctx);
    543575        } else {
    544             $easy->options['_curl_retries']++;
     576            ++$easy->options['_curl_retries'];
    545577        }
    546578
     
    572604                } catch (\Exception $e) {
    573605                    $easy->createResponseException = $e;
     606
    574607                    return -1;
    575608                }
     
    581614                        // a curl header write error by returning 0.
    582615                        $easy->onHeadersException = $e;
     616
    583617                        return -1;
    584618                    }
     
    590624                $easy->headers[] = $value;
    591625            }
     626
    592627            return \strlen($h);
    593628        };
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php

    r2866500 r2955014  
    165165        }
    166166
    167         while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM);
     167        while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) {
     168        }
    168169
    169170        $this->processMessages();
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php

    r2866500 r2955014  
    107107    public function __get($name)
    108108    {
    109         $msg = $name === 'handle' ? 'The EasyHandle has been released' : 'Invalid property: ' . $name;
     109        $msg = $name === 'handle' ? 'The EasyHandle has been released' : 'Invalid property: '.$name;
    110110        throw new \BadMethodCallException($msg);
    111111    }
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php

    r2867137 r2955014  
    1515     * @param string[] $headers
    1616     *
     17     * @return array{0:string, 1:int, 2:?string, 3:array}
     18     *
    1719     * @throws \RuntimeException
    18      *
    19      * @return array{0:string, 1:int, 2:?string, 3:array}
    2020     */
    2121    public static function parseHeaders(array $headers): array
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php

    r2866500 r2955014  
    139139                    ($this->onRejected)($reason);
    140140                }
     141
    141142                return P\Create::rejectionFor($reason);
    142143            }
     
    160161                $this->queue[] = $value;
    161162            } else {
    162                 throw new \TypeError('Expected a Response, Promise, Throwable or callable. Found ' . Utils::describeType($value));
     163                throw new \TypeError('Expected a Response, Promise, Throwable or callable. Found '.Utils::describeType($value));
    163164            }
    164165        }
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php

    r2866500 r2955014  
    6868                || false !== \strpos($message, 'Connection refused')
    6969                || false !== \strpos($message, "couldn't connect to host") // error on HHVM
    70                 || false !== \strpos($message, "connection attempt failed")
     70                || false !== \strpos($message, 'connection attempt failed')
    7171            ) {
    7272                $e = new ConnectException($e->getMessage(), $request, $e);
     
    232232            $errors[] = [
    233233                'message' => $msg,
    234                 'file'    => $file,
    235                 'line'    => $line
     234                'file' => $file,
     235                'line' => $line,
    236236            ];
     237
    237238            return true;
    238239        });
     
    248249            foreach ($errors as $err) {
    249250                foreach ($err as $key => $value) {
    250                     $message .= "[$key] $value" . \PHP_EOL;
     251                    $message .= "[$key] $value".\PHP_EOL;
    251252                }
    252253            }
     
    351352                    throw new ConnectException(\sprintf("Could not resolve IPv4 address for host '%s'", $uri->getHost()), $request);
    352353                }
     354
    353355                return $uri->withHost($records[0]['ip']);
    354356            }
     
    358360                    throw new ConnectException(\sprintf("Could not resolve IPv6 address for host '%s'", $uri->getHost()), $request);
    359361                }
    360                 return $uri->withHost('[' . $records[0]['ipv6'] . ']');
     362
     363                return $uri->withHost('['.$records[0]['ipv6'].']');
    361364            }
    362365        }
     
    376379        $context = [
    377380            'http' => [
    378                 'method'           => $request->getMethod(),
    379                 'header'           => $headers,
     381                'method' => $request->getMethod(),
     382                'header' => $headers,
    380383                'protocol_version' => $request->getProtocolVersion(),
    381                 'ignore_errors'    => true,
    382                 'follow_location'  => 0,
     384                'ignore_errors' => true,
     385                'follow_location' => 0,
    383386            ],
    384387            'ssl' => [
     
    389392        $body = (string) $request->getBody();
    390393
    391         if (!empty($body)) {
     394        if ('' !== $body) {
    392395            $context['http']['content'] = $body;
    393396            // Prevent the HTTP handler from adding a Content-Type header.
     
    476479     * @param mixed $value as passed via Request transfer options.
    477480     */
     481    private function add_crypto_method(RequestInterface $request, array &$options, $value, array &$params): void
     482    {
     483        if (
     484            $value === \STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT
     485            || $value === \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT
     486            || $value === \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT
     487            || (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && $value === \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT)
     488        ) {
     489            $options['http']['crypto_method'] = $value;
     490
     491            return;
     492        }
     493
     494        throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided');
     495    }
     496
     497    /**
     498     * @param mixed $value as passed via Request transfer options.
     499     */
    478500    private function add_verify(RequestInterface $request, array &$options, $value, array &$params): void
    479501    {
     
    543565
    544566        static $map = [
    545             \STREAM_NOTIFY_CONNECT       => 'CONNECT',
     567            \STREAM_NOTIFY_CONNECT => 'CONNECT',
    546568            \STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED',
    547             \STREAM_NOTIFY_AUTH_RESULT   => 'AUTH_RESULT',
    548             \STREAM_NOTIFY_MIME_TYPE_IS  => 'MIME_TYPE_IS',
    549             \STREAM_NOTIFY_FILE_SIZE_IS  => 'FILE_SIZE_IS',
    550             \STREAM_NOTIFY_REDIRECTED    => 'REDIRECTED',
    551             \STREAM_NOTIFY_PROGRESS      => 'PROGRESS',
    552             \STREAM_NOTIFY_FAILURE       => 'FAILURE',
    553             \STREAM_NOTIFY_COMPLETED     => 'COMPLETED',
    554             \STREAM_NOTIFY_RESOLVE       => 'RESOLVE',
     569            \STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT',
     570            \STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS',
     571            \STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS',
     572            \STREAM_NOTIFY_REDIRECTED => 'REDIRECTED',
     573            \STREAM_NOTIFY_PROGRESS => 'PROGRESS',
     574            \STREAM_NOTIFY_FAILURE => 'FAILURE',
     575            \STREAM_NOTIFY_COMPLETED => 'COMPLETED',
     576            \STREAM_NOTIFY_RESOLVE => 'RESOLVE',
    555577        ];
    556578        static $args = ['severity', 'message', 'message_code', 'bytes_transferred', 'bytes_max'];
    557579
    558580        $value = Utils::debugResource($value);
    559         $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment('');
     581        $ident = $request->getMethod().' '.$request->getUri()->withFragment('');
    560582        self::addNotification(
    561583            $params,
     
    563585                \fprintf($value, '<%s> [%s] ', $ident, $map[$code]);
    564586                foreach (\array_filter($passed) as $i => $v) {
    565                     \fwrite($value, $args[$i] . ': "' . $v . '" ');
     587                    \fwrite($value, $args[$i].': "'.$v.'" ');
    566588                }
    567589                \fwrite($value, "\n");
     
    578600            $params['notification'] = self::callArray([
    579601                $params['notification'],
    580                 $notify
     602                $notify,
    581603            ]);
    582604        }
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/HandlerStack.php

    r2866500 r2955014  
    8787
    8888        if ($this->handler !== null) {
    89             $stack[] = "0) Handler: " . $this->debugCallable($this->handler);
     89            $stack[] = '0) Handler: '.$this->debugCallable($this->handler);
    9090        }
    9191
    9292        $result = '';
    9393        foreach (\array_reverse($this->stack) as $tuple) {
    94             $depth++;
     94            ++$depth;
    9595            $str = "{$depth}) Name: '{$tuple[1]}', ";
    96             $str .= "Function: " . $this->debugCallable($tuple[0]);
     96            $str .= 'Function: '.$this->debugCallable($tuple[0]);
    9797            $result = "> {$str}\n{$result}";
    9898            $stack[] = $str;
     
    123123    public function hasHandler(): bool
    124124    {
    125         return $this->handler !== null ;
     125        return $this->handler !== null;
    126126    }
    127127
     
    267267            return \is_string($fn[0])
    268268                ? "callable({$fn[0]}::{$fn[1]})"
    269                 : "callable(['" . \get_class($fn[0]) . "', '{$fn[1]}'])";
     269                : "callable(['".\get_class($fn[0])."', '{$fn[1]}'])";
    270270        }
    271271
    272272        /** @var object $fn */
    273         return 'callable(' . \spl_object_hash($fn) . ')';
     273        return 'callable('.\spl_object_hash($fn).')';
    274274    }
    275275}
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/MessageFormatter.php

    r2866500 r2955014  
    4141     * Apache Common Log Format.
    4242     *
    43      * @link https://httpd.apache.org/docs/2.4/logs.html#common
     43     * @see https://httpd.apache.org/docs/2.4/logs.html#common
    4444     *
    4545     * @var string
    4646     */
    47     public const CLF = "{hostname} {req_header_User-Agent} - [{date_common_log}] \"{method} {target} HTTP/{version}\" {code} {res_header_Content-Length}";
     47    public const CLF = '{hostname} {req_header_User-Agent} - [{date_common_log}] "{method} {target} HTTP/{version}" {code} {res_header_Content-Length}';
    4848    public const DEBUG = ">>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}";
    4949    public const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}';
     
    9191                    case 'req_headers':
    9292                        $result = \trim($request->getMethod()
    93                                 . ' ' . $request->getRequestTarget())
    94                             . ' HTTP/' . $request->getProtocolVersion() . "\r\n"
    95                             . $this->headers($request);
     93                                .' '.$request->getRequestTarget())
     94                            .' HTTP/'.$request->getProtocolVersion()."\r\n"
     95                            .$this->headers($request);
    9696                        break;
    9797                    case 'res_headers':
     
    102102                                $response->getStatusCode(),
    103103                                $response->getReasonPhrase()
    104                             ) . "\r\n" . $this->headers($response)
     104                            )."\r\n".$this->headers($response)
    105105                            : 'NULL';
    106106                        break;
     
    178178
    179179                $cache[$matches[1]] = $result;
     180
    180181                return $result;
    181182            },
     
    191192        $result = '';
    192193        foreach ($message->getHeaders() as $name => $values) {
    193             $result .= $name . ': ' . \implode(', ', $values) . "\r\n";
     194            $result .= $name.': '.\implode(', ', $values)."\r\n";
    194195        }
    195196
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/Middleware.php

    r2866500 r2955014  
    3535                $cookieJar = $options['cookies'];
    3636                $request = $cookieJar->withCookieHeader($request);
     37
    3738                return $handler($request, $options)
    3839                    ->then(
    3940                        static function (ResponseInterface $response) use ($cookieJar, $request): ResponseInterface {
    4041                            $cookieJar->extractCookies($request, $response);
     42
    4143                            return $response;
    4244                        }
     
    6163                    return $handler($request, $options);
    6264                }
     65
    6366                return $handler($request, $options)->then(
    6467                    static function (ResponseInterface $response) use ($request, $bodySummarizer) {
     
    9497                    static function ($value) use ($request, &$container, $options) {
    9598                        $container[] = [
    96                             'request'  => $request,
     99                            'request' => $request,
    97100                            'response' => $value,
    98                             'error'    => null,
    99                             'options'  => $options
     101                            'error' => null,
     102                            'options' => $options,
    100103                        ];
     104
    101105                        return $value;
    102106                    },
    103107                    static function ($reason) use ($request, &$container, $options) {
    104108                        $container[] = [
    105                             'request'  => $request,
     109                            'request' => $request,
    106110                            'response' => null,
    107                             'error'    => $reason,
    108                             'options'  => $options
     111                            'error' => $reason,
     112                            'options' => $options,
    109113                        ];
     114
    110115                        return P\Create::rejectionFor($reason);
    111116                    }
     
    139144                    $after($request, $options, $response);
    140145                }
     146
    141147                return $response;
    142148            };
     
    203209                        $message = $formatter->format($request, $response);
    204210                        $logger->log($logLevel, $message);
     211
    205212                        return $response;
    206213                    },
     
    209216                        $message = $formatter->format($request, $response, P\Create::exceptionFor($reason));
    210217                        $logger->error($message);
     218
    211219                        return P\Create::rejectionFor($reason);
    212220                    }
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php

    r2866500 r2955014  
    8585        if ($expect === true) {
    8686            $modify['set_headers']['Expect'] = '100-Continue';
     87
    8788            return;
    8889        }
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php

    r2866500 r2955014  
    2828     */
    2929    public static $defaultSettings = [
    30         'max'             => 5,
    31         'protocols'       => ['http', 'https'],
    32         'strict'          => false,
    33         'referer'         => false,
     30        'max' => 5,
     31        'protocols' => ['http', 'https'],
     32        'strict' => false,
     33        'referer' => false,
    3434        'track_redirects' => false,
    3535    ];
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/RequestOptions.php

    r2706025 r2955014  
    88 * More documentation for each option can be found at http://guzzlephp.org/.
    99 *
    10  * @link http://docs.guzzlephp.org/en/v6/request-options.html
     10 * @see http://docs.guzzlephp.org/en/v6/request-options.html
    1111 */
    1212final class RequestOptions
     
    7171     * connect_timeout: (float, default=0) Float describing the number of
    7272     * seconds to wait while trying to connect to a server. Use 0 to wait
    73      * indefinitely (the default behavior).
     73     * 300 seconds (the default behavior).
    7474     */
    7575    public const CONNECT_TIMEOUT = 'connect_timeout';
     76
     77    /**
     78     * crypto_method: (int) A value describing the minimum TLS protocol
     79     * version to use.
     80     *
     81     * This setting must be set to one of the
     82     * ``STREAM_CRYPTO_METHOD_TLS*_CLIENT`` constants. PHP 7.4 or higher is
     83     * required in order to use TLS 1.3, and cURL 7.34.0 or higher is required
     84     * in order to specify a crypto method, with cURL 7.52.0 or higher being
     85     * required to use TLS 1.3.
     86     */
     87    public const CRYPTO_METHOD = 'crypto_method';
    7688
    7789    /**
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php

    r2866500 r2955014  
    4545        $this->decider = $decider;
    4646        $this->nextHandler = $nextHandler;
    47         $this->delay = $delay ?: __CLASS__ . '::exponentialDelay';
     47        $this->delay = $delay ?: __CLASS__.'::exponentialDelay';
    4848    }
    4949
     
    5555    public static function exponentialDelay(int $retries): int
    5656    {
    57         return (int) \pow(2, $retries - 1) * 1000;
     57        return (int) 2 ** ($retries - 1) * 1000;
    5858    }
    5959
     
    6565
    6666        $fn = $this->nextHandler;
     67
    6768        return $fn($request, $options)
    6869            ->then(
     
    8687                return $value;
    8788            }
     89
    8890            return $this->doRetry($request, $options, $value);
    8991        };
     
    104106                return P\Create::rejectionFor($reason);
    105107            }
     108
    106109            return $this->doRetry($req, $options);
    107110        };
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/Utils.php

    r2866500 r2955014  
    2424        switch (\gettype($input)) {
    2525            case 'object':
    26                 return 'object(' . \get_class($input) . ')';
     26                return 'object('.\get_class($input).')';
    2727            case 'array':
    28                 return 'array(' . \count($input) . ')';
     28                return 'array('.\count($input).')';
    2929            default:
    3030                \ob_start();
     
    8080     * The returned handler is not wrapped by any default middlewares.
    8181     *
     82     * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.
     83     *
    8284     * @throws \RuntimeException if no viable Handler is available.
    83      *
    84      * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.
    8585     */
    8686    public static function chooseHandler(): callable
     
    248248            // Special match if the area when prefixed with ".". Remove any
    249249            // existing leading "." and add a new leading ".".
    250             $area = '.' . \ltrim($area, '.');
    251             if (\substr($host, -(\strlen($area))) === $area) {
     250            $area = '.'.\ltrim($area, '.');
     251            if (\substr($host, -\strlen($area)) === $area) {
    252252                return true;
    253253            }
     
    270270     * @throws InvalidArgumentException if the JSON cannot be decoded.
    271271     *
    272      * @link https://www.php.net/manual/en/function.json-decode.php
     272     * @see https://www.php.net/manual/en/function.json-decode.php
    273273     */
    274274    public static function jsonDecode(string $json, bool $assoc = false, int $depth = 512, int $options = 0)
     
    276276        $data = \json_decode($json, $assoc, $depth, $options);
    277277        if (\JSON_ERROR_NONE !== \json_last_error()) {
    278             throw new InvalidArgumentException('json_decode error: ' . \json_last_error_msg());
     278            throw new InvalidArgumentException('json_decode error: '.\json_last_error_msg());
    279279        }
    280280
     
    291291     * @throws InvalidArgumentException if the JSON cannot be encoded.
    292292     *
    293      * @link https://www.php.net/manual/en/function.json-encode.php
     293     * @see https://www.php.net/manual/en/function.json-encode.php
    294294     */
    295295    public static function jsonEncode($value, int $options = 0, int $depth = 512): string
     
    297297        $json = \json_encode($value, $options, $depth);
    298298        if (\JSON_ERROR_NONE !== \json_last_error()) {
    299             throw new InvalidArgumentException('json_encode error: ' . \json_last_error_msg());
     299            throw new InvalidArgumentException('json_encode error: '.\json_last_error_msg());
    300300        }
    301301
     
    342342                $errorMessage = 'IDN conversion failed';
    343343                if ($errors) {
    344                     $errorMessage .= ' (errors: ' . implode(', ', $errors) . ')';
     344                    $errorMessage .= ' (errors: '.implode(', ', $errors).')';
    345345                }
    346346
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/functions.php

    r2866500 r2955014  
    5151 * The returned handler is not wrapped by any default middlewares.
    5252 *
     53 * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.
     54 *
    5355 * @throws \RuntimeException if no viable Handler is available.
    54  *
    55  * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.
    5656 *
    5757 * @deprecated choose_handler will be removed in guzzlehttp/guzzle:8.0. Use Utils::chooseHandler instead.
     
    142142 * @throws Exception\InvalidArgumentException if the JSON cannot be decoded.
    143143 *
    144  * @link https://www.php.net/manual/en/function.json-decode.php
     144 * @see https://www.php.net/manual/en/function.json-decode.php
    145145 * @deprecated json_decode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonDecode instead.
    146146 */
     
    159159 * @throws Exception\InvalidArgumentException if the JSON cannot be encoded.
    160160 *
    161  * @link https://www.php.net/manual/en/function.json-encode.php
     161 * @see https://www.php.net/manual/en/function.json-encode.php
    162162 * @deprecated json_encode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonEncode instead.
    163163 */
  • bitfinex-pay/trunk/vendor/guzzlehttp/guzzle/src/functions_include.php

    r2866500 r2955014  
    33// Don't redefine the functions if included multiple times.
    44if (!\function_exists('GuzzleHttp\describe_type')) {
    5     require __DIR__ . '/functions.php';
     5    require __DIR__.'/functions.php';
    66}
  • bitfinex-pay/trunk/vendor/guzzlehttp/promises/CHANGELOG.md

    r2866500 r2955014  
    11# CHANGELOG
     2
     3
     4## 2.0.0 - TBC
     5
     6### Added
     7
     8- Added PHP 7 type hints
     9
     10### Changed
     11
     12- All previously non-final non-exception classes have been marked as soft-final
     13
     14### Removed
     15
     16- Dropped PHP < 7.2 support
     17- All functions in the `GuzzleHttp\Promise` namespace
     18
     19
     20## 1.5.3 - 2023-05-21
     21
     22### Changed
     23
     24- Removed remaining usage of deprecated functions
     25
    226
    327## 1.5.2 - 2022-08-07
     
    731- Officially support PHP 8.2
    832
     33
    934## 1.5.1 - 2021-10-22
    1035
     
    1338- Revert "Call handler when waiting on fulfilled/rejected Promise"
    1439- Fix pool memory leak when empty array of promises provided
     40
    1541
    1642## 1.5.0 - 2021-10-07
     
    2551- Fix manually settle promises generated with `Utils::task`
    2652
     53
    2754## 1.4.1 - 2021-02-18
    2855
     
    3057
    3158- Fixed `each_limit` skipping promises and failing
     59
    3260
    3361## 1.4.0 - 2020-09-30
  • bitfinex-pay/trunk/vendor/guzzlehttp/promises/README.md

    r2866500 r2955014  
    3030
    3131
     32## Installation
     33
     34```shell
     35composer require guzzlehttp/promises
     36```
     37
     38
     39## Version Guidance
     40
     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.3 |
     45
     46
    3247## Quick Start
    3348
     
    431446```
    432447
    433 *TODO*: Perhaps adding a `futureTick()` on each tick would be faster?
    434 
    435448
    436449## Implementation Notes
     
    502515A static API was first introduced in 1.4.0, in order to mitigate problems with
    503516functions conflicting between global and local copies of the package. The
    504 function API will be removed in 2.0.0. A migration table has been provided here
    505 for your convenience:
     517function API was removed in 2.0.0. A migration table has been provided here for
     518your convenience:
    506519
    507520| Original Function | Replacement Method |
  • bitfinex-pay/trunk/vendor/guzzlehttp/promises/composer.json

    r2706025 r2955014  
    2727    ],
    2828    "require": {
    29         "php": ">=5.5"
     29        "php": "^7.2.5 || ^8.0"
    3030    },
    3131    "require-dev": {
    32         "symfony/phpunit-bridge": "^4.4 || ^5.1"
     32        "bamarni/composer-bin-plugin": "^1.8.1",
     33        "phpunit/phpunit": "^8.5.29 || ^9.5.23"
    3334    },
    3435    "autoload": {
    3536        "psr-4": {
    3637            "GuzzleHttp\\Promise\\": "src/"
    37         },
    38         "files": ["src/functions_include.php"]
     38        }
    3939    },
    4040    "autoload-dev": {
     
    4343        }
    4444    },
    45     "scripts": {
    46         "test": "vendor/bin/simple-phpunit",
    47         "test-ci": "vendor/bin/simple-phpunit --coverage-text"
    48     },
    4945    "extra": {
    50         "branch-alias": {
    51             "dev-master": "1.5-dev"
     46        "bamarni-bin": {
     47            "bin-links": true,
     48            "forward-command": false
    5249        }
    5350    },
    5451    "config": {
     52        "allow-plugins": {
     53            "bamarni/composer-bin-plugin": true
     54        },
    5555        "preferred-install": "dist",
    5656        "sort-packages": true
  • bitfinex-pay/trunk/vendor/guzzlehttp/promises/src/AggregateException.php

    r2706025 r2955014  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace GuzzleHttp\Promise;
     
    810class AggregateException extends RejectionException
    911{
    10     public function __construct($msg, array $reasons)
     12    public function __construct(string $msg, array $reasons)
    1113    {
    1214        parent::__construct(
  • bitfinex-pay/trunk/vendor/guzzlehttp/promises/src/CancellationException.php

    r2706025 r2955014  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace GuzzleHttp\Promise;
  • bitfinex-pay/trunk/vendor/guzzlehttp/promises/src/Coroutine.php

    r2706025 r2955014  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace GuzzleHttp\Promise;
    46
    5 use Exception;
    67use Generator;
    78use Throwable;
     
    2829 *         try {
    2930 *             $value = (yield createPromise($value . 'b'));
    30  *         } catch (\Exception $e) {
     31 *         } catch (\Throwable $e) {
    3132 *             // The promise was rejected.
    3233 *         }
     
    4142 * @return Promise
    4243 *
    43  * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration
     44 * @see https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration
    4445 */
    4546final class Coroutine implements PromiseInterface
     
    6364    {
    6465        $this->generator = $generatorFn();
    65         $this->result = new Promise(function () {
     66        $this->result = new Promise(function (): void {
    6667            while (isset($this->currentPromise)) {
    6768                $this->currentPromise->wait();
     
    7071        try {
    7172            $this->nextCoroutine($this->generator->current());
    72         } catch (\Exception $exception) {
    73             $this->result->reject($exception);
    7473        } catch (Throwable $throwable) {
    7574            $this->result->reject($throwable);
     
    7978    /**
    8079     * Create a new coroutine.
    81      *
    82      * @return self
    8380     */
    84     public static function of(callable $generatorFn)
     81    public static function of(callable $generatorFn): self
    8582    {
    8683        return new self($generatorFn);
     
    9087        callable $onFulfilled = null,
    9188        callable $onRejected = null
    92     ) {
     89    ): PromiseInterface {
    9390        return $this->result->then($onFulfilled, $onRejected);
    9491    }
    9592
    96     public function otherwise(callable $onRejected)
     93    public function otherwise(callable $onRejected): PromiseInterface
    9794    {
    9895        return $this->result->otherwise($onRejected);
    9996    }
    10097
    101     public function wait($unwrap = true)
     98    public function wait(bool $unwrap = true)
    10299    {
    103100        return $this->result->wait($unwrap);
    104101    }
    105102
    106     public function getState()
     103    public function getState(): string
    107104    {
    108105        return $this->result->getState();
    109106    }
    110107
    111     public function resolve($value)
     108    public function resolve($value): void
    112109    {
    113110        $this->result->resolve($value);
    114111    }
    115112
    116     public function reject($reason)
     113    public function reject($reason): void
    117114    {
    118115        $this->result->reject($reason);
    119116    }
    120117
    121     public function cancel()
     118    public function cancel(): void
    122119    {
    123120        $this->currentPromise->cancel();
     
    125122    }
    126123
    127     private function nextCoroutine($yielded)
     124    private function nextCoroutine($yielded): void
    128125    {
    129126        $this->currentPromise = Create::promiseFor($yielded)
     
    134131     * @internal
    135132     */
    136     public function _handleSuccess($value)
     133    public function _handleSuccess($value): void
    137134    {
    138135        unset($this->currentPromise);
     
    144141                $this->result->resolve($value);
    145142            }
    146         } catch (Exception $exception) {
    147             $this->result->reject($exception);
    148143        } catch (Throwable $throwable) {
    149144            $this->result->reject($throwable);
     
    154149     * @internal
    155150     */
    156     public function _handleFailure($reason)
     151    public function _handleFailure($reason): void
    157152    {
    158153        unset($this->currentPromise);
     
    161156            // The throw was caught, so keep iterating on the coroutine
    162157            $this->nextCoroutine($nextYield);
    163         } catch (Exception $exception) {
    164             $this->result->reject($exception);
    165158        } catch (Throwable $throwable) {
    166159            $this->result->reject($throwable);
  • bitfinex-pay/trunk/vendor/guzzlehttp/promises/src/Create.php

    r2706025 r2955014  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace GuzzleHttp\Promise;
     
    911     *
    1012     * @param mixed $value Promise or value.
    11      *
    12      * @return PromiseInterface
    1313     */
    14     public static function promiseFor($value)
     14    public static function promiseFor($value): PromiseInterface
    1515    {
    1616        if ($value instanceof PromiseInterface) {
     
    2424            $promise = new Promise($wfn, $cfn);
    2525            $value->then([$promise, 'resolve'], [$promise, 'reject']);
     26
    2627            return $promise;
    2728        }
     
    3536     *
    3637     * @param mixed $reason Promise or reason.
    37      *
    38      * @return PromiseInterface
    3938     */
    40     public static function rejectionFor($reason)
     39    public static function rejectionFor($reason): PromiseInterface
    4140    {
    4241        if ($reason instanceof PromiseInterface) {
     
    5150     *
    5251     * @param mixed $reason
    53      *
    54      * @return \Exception|\Throwable
    5552     */
    56     public static function exceptionFor($reason)
     53    public static function exceptionFor($reason): \Throwable
    5754    {
    58         if ($reason instanceof \Exception || $reason instanceof \Throwable) {
     55        if ($reason instanceof \Throwable) {
    5956            return $reason;
    6057        }
     
    6764     *
    6865     * @param mixed $value
    69      *
    70      * @return \Iterator
    7166     */
    72     public static function iterFor($value)
     67    public static function iterFor($value): \Iterator
    7368    {
    7469        if ($value instanceof \Iterator) {
  • bitfinex-pay/trunk/vendor/guzzlehttp/promises/src/Each.php

    r2706025 r2955014  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace GuzzleHttp\Promise;
     
    2123     * @param callable $onFulfilled
    2224     * @param callable $onRejected
    23      *
    24      * @return PromiseInterface
    2525     */
    2626    public static function of(
     
    2828        callable $onFulfilled = null,
    2929        callable $onRejected = null
    30     ) {
     30    ): PromiseInterface {
    3131        return (new EachPromise($iterable, [
    3232            'fulfilled' => $onFulfilled,
    33             'rejected'  => $onRejected
     33            'rejected' => $onRejected,
    3434        ]))->promise();
    3535    }
     
    4747     * @param callable     $onFulfilled
    4848     * @param callable     $onRejected
    49      *
    50      * @return PromiseInterface
    5149     */
    5250    public static function ofLimit(
     
    5553        callable $onFulfilled = null,
    5654        callable $onRejected = null
    57     ) {
     55    ): PromiseInterface {
    5856        return (new EachPromise($iterable, [
    59             'fulfilled'   => $onFulfilled,
    60             'rejected'    => $onRejected,
    61             'concurrency' => $concurrency
     57            'fulfilled' => $onFulfilled,
     58            'rejected' => $onRejected,
     59            'concurrency' => $concurrency,
    6260        ]))->promise();
    6361    }
     
    7169     * @param int|callable $concurrency
    7270     * @param callable     $onFulfilled
    73      *
    74      * @return PromiseInterface
    7571     */
    7672    public static function ofLimitAll(
     
    7874        $concurrency,
    7975        callable $onFulfilled = null
    80     ) {
    81         return each_limit(
     76    ): PromiseInterface {
     77        return self::ofLimit(
    8278            $iterable,
    8379            $concurrency,
    8480            $onFulfilled,
    85             function ($reason, $idx, PromiseInterface $aggregate) {
     81            function ($reason, $idx, PromiseInterface $aggregate): void {
    8682                $aggregate->reject($reason);
    8783            }
  • bitfinex-pay/trunk/vendor/guzzlehttp/promises/src/EachPromise.php

    r2866500 r2955014  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace GuzzleHttp\Promise;
     
    68 * Represents a promise that iterates over many promises and invokes
    79 * side-effect functions in the process.
     10 *
     11 * @final
    812 */
    913class EachPromise implements PromisorInterface
     
    7074
    7175    /** @psalm-suppress InvalidNullableReturnType */
    72     public function promise()
     76    public function promise(): PromiseInterface
    7377    {
    7478        if ($this->aggregate) {
     
    8387        } catch (\Throwable $e) {
    8488            $this->aggregate->reject($e);
    85         } catch (\Exception $e) {
    86             $this->aggregate->reject($e);
    8789        }
    8890
    8991        /**
    9092         * @psalm-suppress NullableReturnStatement
    91          * @phpstan-ignore-next-line
    9293         */
    9394        return $this->aggregate;
    9495    }
    9596
    96     private function createPromise()
     97    private function createPromise(): void
    9798    {
    9899        $this->mutex = false;
    99         $this->aggregate = new Promise(function () {
     100        $this->aggregate = new Promise(function (): void {
    100101            if ($this->checkIfFinished()) {
    101102                return;
     
    114115
    115116        // Clear the references when the promise is resolved.
    116         $clearFn = function () {
     117        $clearFn = function (): void {
    117118            $this->iterable = $this->concurrency = $this->pending = null;
    118119            $this->onFulfilled = $this->onRejected = null;
     
    123124    }
    124125
    125     private function refillPending()
     126    private function refillPending(): void
    126127    {
    127128        if (!$this->concurrency) {
    128129            // Add all pending promises.
    129             while ($this->addPending() && $this->advanceIterator());
     130            while ($this->addPending() && $this->advanceIterator()) {
     131            }
     132
    130133            return;
    131134        }
     
    148151        while (--$concurrency
    149152            && $this->advanceIterator()
    150             && $this->addPending());
    151     }
    152 
    153     private function addPending()
     153            && $this->addPending()) {
     154        }
     155    }
     156
     157    private function addPending(): bool
    154158    {
    155159        if (!$this->iterable || !$this->iterable->valid()) {
     
    165169
    166170        $this->pending[$idx] = $promise->then(
    167             function ($value) use ($idx, $key) {
     171            function ($value) use ($idx, $key): void {
    168172                if ($this->onFulfilled) {
    169173                    call_user_func(
     
    176180                $this->step($idx);
    177181            },
    178             function ($reason) use ($idx, $key) {
     182            function ($reason) use ($idx, $key): void {
    179183                if ($this->onRejected) {
    180184                    call_user_func(
     
    192196    }
    193197
    194     private function advanceIterator()
     198    private function advanceIterator(): bool
    195199    {
    196200        // Place a lock on the iterator so that we ensure to not recurse,
     
    205209            $this->iterable->next();
    206210            $this->mutex = false;
     211
    207212            return true;
    208213        } catch (\Throwable $e) {
    209214            $this->aggregate->reject($e);
    210215            $this->mutex = false;
     216
    211217            return false;
    212         } catch (\Exception $e) {
    213             $this->aggregate->reject($e);
    214             $this->mutex = false;
    215             return false;
    216         }
    217     }
    218 
    219     private function step($idx)
     218        }
     219    }
     220
     221    private function step(int $idx): void
    220222    {
    221223        // If the promise was already resolved, then ignore this step.
     
    235237    }
    236238
    237     private function checkIfFinished()
     239    private function checkIfFinished(): bool
    238240    {
    239241        if (!$this->pending && !$this->iterable->valid()) {
    240242            // Resolve the promise if there's nothing left to do.
    241243            $this->aggregate->resolve(null);
     244
    242245            return true;
    243246        }
  • bitfinex-pay/trunk/vendor/guzzlehttp/promises/src/FulfilledPromise.php

    r2706025 r2955014  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace GuzzleHttp\Promise;
     
    810 * Thenning off of this promise will invoke the onFulfilled callback
    911 * immediately and ignore other callbacks.
     12 *
     13 * @final
    1014 */
    1115class FulfilledPromise implements PromiseInterface
     
    1317    private $value;
    1418
     19    /**
     20     * @param mixed $value
     21     */
    1522    public function __construct($value)
    1623    {
     
    2734        callable $onFulfilled = null,
    2835        callable $onRejected = null
    29     ) {
     36    ): PromiseInterface {
    3037        // Return itself if there is no onFulfilled function.
    3138        if (!$onFulfilled) {
     
    3643        $p = new Promise([$queue, 'run']);
    3744        $value = $this->value;
    38         $queue->add(static function () use ($p, $value, $onFulfilled) {
     45        $queue->add(static function () use ($p, $value, $onFulfilled): void {
    3946            if (Is::pending($p)) {
    4047                try {
    4148                    $p->resolve($onFulfilled($value));
    4249                } catch (\Throwable $e) {
    43                     $p->reject($e);
    44                 } catch (\Exception $e) {
    4550                    $p->reject($e);
    4651                }
     
    5156    }
    5257
    53     public function otherwise(callable $onRejected)
     58    public function otherwise(callable $onRejected): PromiseInterface
    5459    {
    5560        return $this->then(null, $onRejected);
    5661    }
    5762
    58     public function wait($unwrap = true, $defaultDelivery = null)
     63    public function wait(bool $unwrap = true)
    5964    {
    6065        return $unwrap ? $this->value : null;
    6166    }
    6267
    63     public function getState()
     68    public function getState(): string
    6469    {
    6570        return self::FULFILLED;
    6671    }
    6772
    68     public function resolve($value)
     73    public function resolve($value): void
    6974    {
    7075        if ($value !== $this->value) {
    71             throw new \LogicException("Cannot resolve a fulfilled promise");
     76            throw new \LogicException('Cannot resolve a fulfilled promise');
    7277        }
    7378    }
    7479
    75     public function reject($reason)
     80    public function reject($reason): void
    7681    {
    77         throw new \LogicException("Cannot reject a fulfilled promise");
     82        throw new \LogicException('Cannot reject a fulfilled promise');
    7883    }
    7984
    80     public function cancel()
     85    public function cancel(): void
    8186    {
    8287        // pass
  • bitfinex-pay/trunk/vendor/guzzlehttp/promises/src/Is.php

    r2706025 r2955014  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace GuzzleHttp\Promise;
     
    79    /**
    810     * Returns true if a promise is pending.
    9      *
    10      * @return bool
    1111     */
    12     public static function pending(PromiseInterface $promise)
     12    public static function pending(PromiseInterface $promise): bool
    1313    {
    1414        return $promise->getState() === PromiseInterface::PENDING;
     
    1717    /**
    1818     * Returns true if a promise is fulfilled or rejected.
    19      *
    20      * @return bool
    2119     */
    22     public static function settled(PromiseInterface $promise)
     20    public static function settled(PromiseInterface $promise): bool
    2321    {
    2422        return $promise->getState() !== PromiseInterface::PENDING;
     
    2725    /**
    2826     * Returns true if a promise is fulfilled.
    29      *
    30      * @return bool
    3127     */
    32     public static function fulfilled(PromiseInterface $promise)
     28    public static function fulfilled(PromiseInterface $promise): bool
    3329    {
    3430        return $promise->getState() === PromiseInterface::FULFILLED;
     
    3733    /**
    3834     * Returns true if a promise is rejected.
    39      *
    40      * @return bool
    4135     */
    42     public static function rejected(PromiseInterface $promise)
     36    public static function rejected(PromiseInterface $promise): bool
    4337    {
    4438        return $promise->getState() === PromiseInterface::REJECTED;
  • bitfinex-pay/trunk/vendor/guzzlehttp/promises/src/Promise.php

    r2706025 r2955014  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace GuzzleHttp\Promise;
     
    68 * Promises/A+ implementation that avoids recursion when possible.
    79 *
    8  * @link https://promisesaplus.com/
     10 * @see https://promisesaplus.com/
     11 *
     12 * @final
    913 */
    1014class Promise implements PromiseInterface
     
    3236        callable $onFulfilled = null,
    3337        callable $onRejected = null
    34     ) {
     38    ): PromiseInterface {
    3539        if ($this->state === self::PENDING) {
    3640            $p = new Promise(null, [$this, 'cancel']);
     
    3842            $p->waitList = $this->waitList;
    3943            $p->waitList[] = $this;
     44
    4045            return $p;
    4146        }
     
    4449        if ($this->state === self::FULFILLED) {
    4550            $promise = Create::promiseFor($this->result);
     51
    4652            return $onFulfilled ? $promise->then($onFulfilled) : $promise;
    4753        }
     
    5056        // and immediately invoke any callbacks.
    5157        $rejection = Create::rejectionFor($this->result);
     58
    5259        return $onRejected ? $rejection->then(null, $onRejected) : $rejection;
    5360    }
    5461
    55     public function otherwise(callable $onRejected)
     62    public function otherwise(callable $onRejected): PromiseInterface
    5663    {
    5764        return $this->then(null, $onRejected);
    5865    }
    5966
    60     public function wait($unwrap = true)
     67    public function wait(bool $unwrap = true)
    6168    {
    6269        $this->waitIfPending();
     
    7481    }
    7582
    76     public function getState()
     83    public function getState(): string
    7784    {
    7885        return $this->state;
    7986    }
    8087
    81     public function cancel()
     88    public function cancel(): void
    8289    {
    8390        if ($this->state !== self::PENDING) {
     
    94101            } catch (\Throwable $e) {
    95102                $this->reject($e);
    96             } catch (\Exception $e) {
    97                 $this->reject($e);
    98103            }
    99104        }
     
    106111    }
    107112
    108     public function resolve($value)
     113    public function resolve($value): void
    109114    {
    110115        $this->settle(self::FULFILLED, $value);
    111116    }
    112117
    113     public function reject($reason)
     118    public function reject($reason): void
    114119    {
    115120        $this->settle(self::REJECTED, $reason);
    116121    }
    117122
    118     private function settle($state, $value)
     123    private function settle(string $state, $value): void
    119124    {
    120125        if ($this->state !== self::PENDING) {
     
    149154            $id = $state === self::FULFILLED ? 1 : 2;
    150155            // It's a success, so resolve the handlers in the queue.
    151             Utils::queue()->add(static function () use ($id, $value, $handlers) {
     156            Utils::queue()->add(static function () use ($id, $value, $handlers): void {
    152157                foreach ($handlers as $handler) {
    153158                    self::callHandler($id, $value, $handler);
     
    160165            // Resolve the handlers when the forwarded promise is resolved.
    161166            $value->then(
    162                 static function ($value) use ($handlers) {
     167                static function ($value) use ($handlers): void {
    163168                    foreach ($handlers as $handler) {
    164169                        self::callHandler(1, $value, $handler);
    165170                    }
    166171                },
    167                 static function ($reason) use ($handlers) {
     172                static function ($reason) use ($handlers): void {
    168173                    foreach ($handlers as $handler) {
    169174                        self::callHandler(2, $reason, $handler);
     
    181186     * @param array $handler Array of handler data (promise and callbacks).
    182187     */
    183     private static function callHandler($index, $value, array $handler)
     188    private static function callHandler(int $index, $value, array $handler): void
    184189    {
    185190        /** @var PromiseInterface $promise */
     
    212217        } catch (\Throwable $reason) {
    213218            $promise->reject($reason);
    214         } catch (\Exception $reason) {
    215             $promise->reject($reason);
    216         }
    217     }
    218 
    219     private function waitIfPending()
     219        }
     220    }
     221
     222    private function waitIfPending(): void
    220223    {
    221224        if ($this->state !== self::PENDING) {
     
    228231            // If there's no wait function, then reject the promise.
    229232            $this->reject('Cannot wait on a promise that has '
    230                 . 'no internal wait function. You must provide a wait '
    231                 . 'function when constructing the promise to be able to '
    232                 . 'wait on a promise.');
     233                .'no internal wait function. You must provide a wait '
     234                .'function when constructing the promise to be able to '
     235                .'wait on a promise.');
    233236        }
    234237
     
    241244    }
    242245
    243     private function invokeWaitFn()
     246    private function invokeWaitFn(): void
    244247    {
    245248        try {
     
    247250            $this->waitFn = null;
    248251            $wfn(true);
    249         } catch (\Exception $reason) {
     252        } catch (\Throwable $reason) {
    250253            if ($this->state === self::PENDING) {
    251254                // The promise has not been resolved yet, so reject the promise
     
    260263    }
    261264
    262     private function invokeWaitList()
     265    private function invokeWaitList(): void
    263266    {
    264267        $waitList = $this->waitList;
  • bitfinex-pay/trunk/vendor/guzzlehttp/promises/src/PromiseInterface.php

    r2706025 r2955014  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace GuzzleHttp\Promise;
     
    1012 * the reason why the promise cannot be fulfilled.
    1113 *
    12  * @link https://promisesaplus.com/
     14 * @see https://promisesaplus.com/
    1315 */
    1416interface PromiseInterface
    1517{
    16     const PENDING = 'pending';
    17     const FULFILLED = 'fulfilled';
    18     const REJECTED = 'rejected';
     18    public const PENDING = 'pending';
     19    public const FULFILLED = 'fulfilled';
     20    public const REJECTED = 'rejected';
    1921
    2022    /**
     
    2426     * @param callable $onFulfilled Invoked when the promise fulfills.
    2527     * @param callable $onRejected  Invoked when the promise is rejected.
    26      *
    27      * @return PromiseInterface
    2828     */
    2929    public function then(
    3030        callable $onFulfilled = null,
    3131        callable $onRejected = null
    32     );
     32    ): PromiseInterface;
    3333
    3434    /**
     
    3939     *
    4040     * @param callable $onRejected Invoked when the promise is rejected.
    41      *
    42      * @return PromiseInterface
    4341     */
    44     public function otherwise(callable $onRejected);
     42    public function otherwise(callable $onRejected): PromiseInterface;
    4543
    4644    /**
     
    4947     * The three states can be checked against the constants defined on
    5048     * PromiseInterface: PENDING, FULFILLED, and REJECTED.
    51      *
    52      * @return string
    5349     */
    54     public function getState();
     50    public function getState(): string;
    5551
    5652    /**
     
    6157     * @throws \RuntimeException if the promise is already resolved.
    6258     */
    63     public function resolve($value);
     59    public function resolve($value): void;
    6460
    6561    /**
     
    7066     * @throws \RuntimeException if the promise is already resolved.
    7167     */
    72     public function reject($reason);
     68    public function reject($reason): void;
    7369
    7470    /**
    7571     * Cancels the promise if possible.
    7672     *
    77      * @link https://github.com/promises-aplus/cancellation-spec/issues/7
     73     * @see https://github.com/promises-aplus/cancellation-spec/issues/7
    7874     */
    79     public function cancel();
     75    public function cancel(): void;
    8076
    8177    /**
     
    8783     * If the promise cannot be waited on, then the promise will be rejected.
    8884     *
    89      * @param bool $unwrap
    90      *
    9185     * @return mixed
    9286     *
     
    9488     *                         promise does not settle after waiting.
    9589     */
    96     public function wait($unwrap = true);
     90    public function wait(bool $unwrap = true);
    9791}
  • bitfinex-pay/trunk/vendor/guzzlehttp/promises/src/PromisorInterface.php

    r2706025 r2955014  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace GuzzleHttp\Promise;
     
    1012    /**
    1113     * Returns a promise.
    12      *
    13      * @return PromiseInterface
    1414     */
    15     public function promise();
     15    public function promise(): PromiseInterface;
    1616}
  • bitfinex-pay/trunk/vendor/guzzlehttp/promises/src/RejectedPromise.php

    r2706025 r2955014  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace GuzzleHttp\Promise;
     
    810 * Thenning off of this promise will invoke the onRejected callback
    911 * immediately and ignore other callbacks.
     12 *
     13 * @final
    1014 */
    1115class RejectedPromise implements PromiseInterface
     
    1317    private $reason;
    1418
     19    /**
     20     * @param mixed $reason
     21     */
    1522    public function __construct($reason)
    1623    {
     
    2734        callable $onFulfilled = null,
    2835        callable $onRejected = null
    29     ) {
     36    ): PromiseInterface {
    3037        // If there's no onRejected callback then just return self.
    3138        if (!$onRejected) {
     
    3643        $reason = $this->reason;
    3744        $p = new Promise([$queue, 'run']);
    38         $queue->add(static function () use ($p, $reason, $onRejected) {
     45        $queue->add(static function () use ($p, $reason, $onRejected): void {
    3946            if (Is::pending($p)) {
    4047                try {
     
    4249                    $p->resolve($onRejected($reason));
    4350                } catch (\Throwable $e) {
    44                     // onRejected threw, so return a rejected promise.
    45                     $p->reject($e);
    46                 } catch (\Exception $e) {
    4751                    // onRejected threw, so return a rejected promise.
    4852                    $p->reject($e);
     
    5458    }
    5559
    56     public function otherwise(callable $onRejected)
     60    public function otherwise(callable $onRejected): PromiseInterface
    5761    {
    5862        return $this->then(null, $onRejected);
    5963    }
    6064
    61     public function wait($unwrap = true, $defaultDelivery = null)
     65    public function wait(bool $unwrap = true)
    6266    {
    6367        if ($unwrap) {
     
    6872    }
    6973
    70     public function getState()
     74    public function getState(): string
    7175    {
    7276        return self::REJECTED;
    7377    }
    7478
    75     public function resolve($value)
     79    public function resolve($value): void
    7680    {
    77         throw new \LogicException("Cannot resolve a rejected promise");
     81        throw new \LogicException('Cannot resolve a rejected promise');
    7882    }
    7983
    80     public function reject($reason)
     84    public function reject($reason): void
    8185    {
    8286        if ($reason !== $this->reason) {
    83             throw new \LogicException("Cannot reject a rejected promise");
     87            throw new \LogicException('Cannot reject a rejected promise');
    8488        }
    8589    }
    8690
    87     public function cancel()
     91    public function cancel(): void
    8892    {
    8993        // pass
  • bitfinex-pay/trunk/vendor/guzzlehttp/promises/src/RejectionException.php

    r2706025 r2955014  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace GuzzleHttp\Promise;
     
    1416
    1517    /**
    16      * @param mixed  $reason      Rejection reason.
    17      * @param string $description Optional description
     18     * @param mixed       $reason      Rejection reason.
     19     * @param string|null $description Optional description.
    1820     */
    1921    public function __construct($reason, $description = null)
     
    2426
    2527        if ($description) {
    26             $message .= ' with reason: ' . $description;
     28            $message .= ' with reason: '.$description;
    2729        } elseif (is_string($reason)
    2830            || (is_object($reason) && method_exists($reason, '__toString'))
    2931        ) {
    30             $message .= ' with reason: ' . $this->reason;
     32            $message .= ' with reason: '.$this->reason;
    3133        } elseif ($reason instanceof \JsonSerializable) {
    32             $message .= ' with reason: '
    33                 . json_encode($this->reason, JSON_PRETTY_PRINT);
     34            $message .= ' with reason: '.json_encode($this->reason, JSON_PRETTY_PRINT);
    3435        }
    3536
  • bitfinex-pay/trunk/vendor/guzzlehttp/promises/src/TaskQueue.php

    r2706025 r2955014  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace GuzzleHttp\Promise;
     
    1113 *
    1214 *     GuzzleHttp\Promise\Utils::queue()->run();
     15 *
     16 * @final
    1317 */
    1418class TaskQueue implements TaskQueueInterface
     
    1721    private $queue = [];
    1822
    19     public function __construct($withShutdown = true)
     23    public function __construct(bool $withShutdown = true)
    2024    {
    2125        if ($withShutdown) {
    22             register_shutdown_function(function () {
     26            register_shutdown_function(function (): void {
    2327                if ($this->enableShutdown) {
    2428                    // Only run the tasks if an E_ERROR didn't occur.
     
    3236    }
    3337
    34     public function isEmpty()
     38    public function isEmpty(): bool
    3539    {
    3640        return !$this->queue;
    3741    }
    3842
    39     public function add(callable $task)
     43    public function add(callable $task): void
    4044    {
    4145        $this->queue[] = $task;
    4246    }
    4347
    44     public function run()
     48    public function run(): void
    4549    {
    4650        while ($task = array_shift($this->queue)) {
     
    6165     * Note: This shutdown will occur before any destructors are triggered.
    6266     */
    63     public function disableShutdown()
     67    public function disableShutdown(): void
    6468    {
    6569        $this->enableShutdown = false;
  • bitfinex-pay/trunk/vendor/guzzlehttp/promises/src/TaskQueueInterface.php

    r2706025 r2955014  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace GuzzleHttp\Promise;
     
    79    /**
    810     * Returns true if the queue is empty.
    9      *
    10      * @return bool
    1111     */
    12     public function isEmpty();
     12    public function isEmpty(): bool;
    1313
    1414    /**
     
    1616     * called.
    1717     */
    18     public function add(callable $task);
     18    public function add(callable $task): void;
    1919
    2020    /**
    2121     * Execute all of the pending task in the queue.
    2222     */
    23     public function run();
     23    public function run(): void;
    2424}
  • bitfinex-pay/trunk/vendor/guzzlehttp/promises/src/Utils.php

    r2706025 r2955014  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace GuzzleHttp\Promise;
     
    1820     * </code>
    1921     *
    20      * @param TaskQueueInterface $assign Optionally specify a new queue instance.
    21      *
    22      * @return TaskQueueInterface
    23      */
    24     public static function queue(TaskQueueInterface $assign = null)
     22     * @param TaskQueueInterface|null $assign Optionally specify a new queue instance.
     23     */
     24    public static function queue(TaskQueueInterface $assign = null): TaskQueueInterface
    2525    {
    2626        static $queue;
     
    4040     *
    4141     * @param callable $task Task function to run.
    42      *
    43      * @return PromiseInterface
    44      */
    45     public static function task(callable $task)
     42     */
     43    public static function task(callable $task): PromiseInterface
    4644    {
    4745        $queue = self::queue();
    4846        $promise = new Promise([$queue, 'run']);
    49         $queue->add(function () use ($task, $promise) {
     47        $queue->add(function () use ($task, $promise): void {
    5048            try {
    5149                if (Is::pending($promise)) {
     
    5351                }
    5452            } catch (\Throwable $e) {
    55                 $promise->reject($e);
    56             } catch (\Exception $e) {
    5753                $promise->reject($e);
    5854            }
     
    7369     *
    7470     * @param PromiseInterface $promise Promise or value.
    75      *
    76      * @return array
    77      */
    78     public static function inspect(PromiseInterface $promise)
     71     */
     72    public static function inspect(PromiseInterface $promise): array
    7973    {
    8074        try {
    8175            return [
    8276                'state' => PromiseInterface::FULFILLED,
    83                 'value' => $promise->wait()
     77                'value' => $promise->wait(),
    8478            ];
    8579        } catch (RejectionException $e) {
     
    8781        } catch (\Throwable $e) {
    8882            return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
    89         } catch (\Exception $e) {
    90             return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
    9183        }
    9284    }
     
    10193     *
    10294     * @param PromiseInterface[] $promises Traversable of promises to wait upon.
    103      *
    104      * @return array
    105      */
    106     public static function inspectAll($promises)
     95     */
     96    public static function inspectAll($promises): array
    10797    {
    10898        $results = [];
    10999        foreach ($promises as $key => $promise) {
    110             $results[$key] = inspect($promise);
     100            $results[$key] = self::inspect($promise);
    111101        }
    112102
     
    123113     * @param iterable<PromiseInterface> $promises Iterable of PromiseInterface objects to wait on.
    124114     *
    125      * @return array
    126      *
    127      * @throws \Exception on error
    128      * @throws \Throwable on error in PHP >=7
    129      */
    130     public static function unwrap($promises)
     115     * @throws \Throwable on error
     116     */
     117    public static function unwrap($promises): array
    131118    {
    132119        $results = [];
     
    148135     * @param mixed $promises  Promises or values.
    149136     * @param bool  $recursive If true, resolves new promises that might have been added to the stack during its own resolution.
    150      *
    151      * @return PromiseInterface
    152      */
    153     public static function all($promises, $recursive = false)
     137     */
     138    public static function all($promises, bool $recursive = false): PromiseInterface
    154139    {
    155140        $results = [];
    156141        $promise = Each::of(
    157142            $promises,
    158             function ($value, $idx) use (&$results) {
     143            function ($value, $idx) use (&$results): void {
    159144                $results[$idx] = $value;
    160145            },
    161             function ($reason, $idx, Promise $aggregate) {
     146            function ($reason, $idx, Promise $aggregate): void {
    162147                $aggregate->reject($reason);
    163148            }
    164149        )->then(function () use (&$results) {
    165150            ksort($results);
     151
    166152            return $results;
    167153        });
     
    174160                    }
    175161                }
     162
    176163                return $results;
    177164            });
     
    194181     * @param int   $count    Total number of promises.
    195182     * @param mixed $promises Promises or values.
    196      *
    197      * @return PromiseInterface
    198      */
    199     public static function some($count, $promises)
     183     */
     184    public static function some(int $count, $promises): PromiseInterface
    200185    {
    201186        $results = [];
     
    204189        return Each::of(
    205190            $promises,
    206             function ($value, $idx, PromiseInterface $p) use (&$results, $count) {
     191            function ($value, $idx, PromiseInterface $p) use (&$results, $count): void {
    207192                if (Is::settled($p)) {
    208193                    return;
     
    213198                }
    214199            },
    215             function ($reason) use (&$rejections) {
     200            function ($reason) use (&$rejections): void {
    216201                $rejections[] = $reason;
    217202            }
     
    225210                }
    226211                ksort($results);
     212
    227213                return array_values($results);
    228214            }
     
    235221     *
    236222     * @param mixed $promises Promises or values.
    237      *
    238      * @return PromiseInterface
    239      */
    240     public static function any($promises)
     223     */
     224    public static function any($promises): PromiseInterface
    241225    {
    242226        return self::some(1, $promises)->then(function ($values) {
     
    254238     *
    255239     * @param mixed $promises Promises or values.
    256      *
    257      * @return PromiseInterface
    258      */
    259     public static function settle($promises)
     240     */
     241    public static function settle($promises): PromiseInterface
    260242    {
    261243        $results = [];
     
    263245        return Each::of(
    264246            $promises,
    265             function ($value, $idx) use (&$results) {
     247            function ($value, $idx) use (&$results): void {
    266248                $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value];
    267249            },
    268             function ($reason, $idx) use (&$results) {
     250            function ($reason, $idx) use (&$results): void {
    269251                $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason];
    270252            }
    271253        )->then(function () use (&$results) {
    272254            ksort($results);
     255
    273256            return $results;
    274257        });
  • bitfinex-pay/trunk/vendor/guzzlehttp/psr7/CHANGELOG.md

    r2866500 r2955014  
    77
    88## Unreleased
     9
     10## 2.5.0 - 2023-04-17
     11
     12### Changed
     13
     14- Adjusted `psr/http-message` version constraint to `^1.1 || ^2.0`
     15
     16## 2.4.5 - 2023-04-17
     17
     18### Fixed
     19
     20- Prevent possible warnings on unset variables in `ServerRequest::normalizeNestedFileSpec`
     21- Fixed `Message::bodySummary` when `preg_match` fails
     22- Fixed header validation issue
     23
     24## 2.4.4 - 2023-03-09
     25
     26### Changed
     27
     28- Removed the need for `AllowDynamicProperties` in `LazyOpenStream`
    929
    1030## 2.4.3 - 2022-10-26
  • bitfinex-pay/trunk/vendor/guzzlehttp/psr7/README.md

    r2866500 r2955014  
    88![Static analysis](https://github.com/guzzle/psr7/workflows/Static%20analysis/badge.svg)
    99
     10
     11# Installation
     12
     13```shell
     14composer require guzzlehttp/psr7
     15```
    1016
    1117# Stream implementation
     
    245251
    246252    private $callback;
     253
     254    private $stream;
    247255
    248256    public function __construct(StreamInterface $stream, callable $cb)
  • bitfinex-pay/trunk/vendor/guzzlehttp/psr7/composer.json

    r2866500 r2955014  
    5353        "php": "^7.2.5 || ^8.0",
    5454        "psr/http-factory": "^1.0",
    55         "psr/http-message": "^1.0",
     55        "psr/http-message": "^1.1 || ^2.0",
    5656        "ralouphie/getallheaders": "^3.0"
    5757    },
     
    8282            "bin-links": true,
    8383            "forward-command": false
    84         },
    85         "branch-alias": {
    86             "dev-master": "2.4-dev"
    8784        }
    8885    },
  • bitfinex-pay/trunk/vendor/guzzlehttp/psr7/src/LazyOpenStream.php

    r2866500 r2955014  
    1111 * take place on the stream.
    1212 */
    13 #[\AllowDynamicProperties]
    1413final class LazyOpenStream implements StreamInterface
    1514{
     
    2322
    2423    /**
     24     * @var StreamInterface
     25     */
     26    private $stream;
     27
     28    /**
    2529     * @param string $filename File to lazily open
    2630     * @param string $mode     fopen mode to use when opening the stream
     
    3034        $this->filename = $filename;
    3135        $this->mode = $mode;
     36
     37        // unsetting the property forces the first access to go through
     38        // __get().
     39        unset($this->stream);
    3240    }
    3341
  • bitfinex-pay/trunk/vendor/guzzlehttp/psr7/src/Message.php

    r2866500 r2955014  
    7878        // Matches any printable character, including unicode characters:
    7979        // letters, marks, numbers, punctuation, spacing, and separators.
    80         if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary)) {
     80        if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary) !== 0) {
    8181            return null;
    8282        }
  • bitfinex-pay/trunk/vendor/guzzlehttp/psr7/src/MessageTrait.php

    r2866500 r2955014  
    225225        }
    226226
    227         if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/', $header)) {
     227        if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/D', $header)) {
    228228            throw new \InvalidArgumentException(
    229                 sprintf(
    230                     '"%s" is not valid header name',
    231                     $header
    232                 )
     229                sprintf('"%s" is not valid header name.', $header)
    233230            );
    234231        }
     
    258255        // likely very rare. Line folding is a fairly obscure feature of HTTP/1.1 and thus not accepting
    259256        // folding is not likely to break any legitimate use case.
    260         if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/', $value)) {
    261             throw new \InvalidArgumentException(sprintf('"%s" is not valid header value', $value));
     257        if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/D', $value)) {
     258            throw new \InvalidArgumentException(
     259                sprintf('"%s" is not valid header value.', $value)
     260            );
    262261        }
    263262    }
  • bitfinex-pay/trunk/vendor/guzzlehttp/psr7/src/ServerRequest.php

    r2866500 r2955014  
    145145            $spec = [
    146146                'tmp_name' => $files['tmp_name'][$key],
    147                 'size'     => $files['size'][$key],
    148                 'error'    => $files['error'][$key],
    149                 'name'     => $files['name'][$key],
    150                 'type'     => $files['type'][$key],
     147                'size'     => $files['size'][$key] ?? null,
     148                'error'    => $files['error'][$key] ?? null,
     149                'name'     => $files['name'][$key] ?? null,
     150                'type'     => $files['type'][$key] ?? null,
    151151            ];
    152152            $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec);
  • bitfinex-pay/trunk/vendor/psr/http-client/README.md

    r2706025 r2955014  
    88The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist.
    99
    10 [psr-url]: http://www.php-fig.org/psr/psr-18
     10[psr-url]: https://www.php-fig.org/psr/psr-18
    1111[package-url]: https://packagist.org/packages/psr/http-client
    1212[implementation-url]: https://packagist.org/providers/psr/http-client-implementation
  • bitfinex-pay/trunk/vendor/psr/http-client/composer.json

    r2706025 r2955014  
    88        {
    99            "name": "PHP-FIG",
    10             "homepage": "http://www.php-fig.org/"
     10            "homepage": "https://www.php-fig.org/"
    1111        }
    1212    ],
    1313    "require": {
    1414        "php": "^7.0 || ^8.0",
    15         "psr/http-message": "^1.0"
     15        "psr/http-message": "^1.0 || ^2.0"
    1616    },
    1717    "autoload": {
  • bitfinex-pay/trunk/vendor/psr/http-factory/README.md

    r2867137 r2955014  
    22==============
    33
    4 This repository holds all interfaces related to [PSR-17 (HTTP Message Factories)][psr-17].
    5 Please refer to the specification for a description.
     4This repository holds all interfaces related to [PSR-17 (HTTP Factories)][psr-url].
    65
    7 You can find implementations of the specification by looking for packages providing the
    8 [psr/http-factory-implementation](https://packagist.org/providers/psr/http-factory-implementation) virtual package.
     6Note that this is not a HTTP Factory implementation of its own. It is merely interfaces that describe the components of a HTTP Factory.
    97
    10 [psr-17]: https://www.php-fig.org/psr/psr-17/
     8The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist.
     9
     10[psr-url]: https://www.php-fig.org/psr/psr-17/
     11[package-url]: https://packagist.org/packages/psr/http-factory
     12[implementation-url]: https://packagist.org/providers/psr/http-factory-implementation
  • bitfinex-pay/trunk/vendor/psr/http-factory/composer.json

    r2867137 r2955014  
    1616        {
    1717            "name": "PHP-FIG",
    18             "homepage": "http://www.php-fig.org/"
     18            "homepage": "https://www.php-fig.org/"
    1919        }
    2020    ],
    2121    "require": {
    2222        "php": ">=7.0.0",
    23         "psr/http-message": "^1.0"
     23        "psr/http-message": "^1.0 || ^2.0"
    2424    },
    2525    "autoload": {
  • bitfinex-pay/trunk/vendor/psr/http-message/README.md

    r2706025 r2955014  
    1111-----
    1212
    13 We'll certainly need some stuff in here.
     13Before reading the usage guide we recommend reading the PSR-7 interfaces method list:
     14
     15* [`PSR-7 Interfaces Method List`](docs/PSR7-Interfaces.md)
     16* [`PSR-7 Usage Guide`](docs/PSR7-Usage.md)
  • bitfinex-pay/trunk/vendor/psr/http-message/composer.json

    r2706025 r2955014  
    88        {
    99            "name": "PHP-FIG",
    10             "homepage": "http://www.php-fig.org/"
     10            "homepage": "https://www.php-fig.org/"
    1111        }
    1212    ],
    1313    "require": {
    14         "php": ">=5.3.0"
     14        "php": "^7.2 || ^8.0"
    1515    },
    1616    "autoload": {
     
    2121    "extra": {
    2222        "branch-alias": {
    23             "dev-master": "1.0.x-dev"
     23            "dev-master": "2.0.x-dev"
    2424        }
    2525    }
  • bitfinex-pay/trunk/vendor/psr/http-message/src/MessageInterface.php

    r2706025 r2955014  
    2424     * @return string HTTP protocol version.
    2525     */
    26     public function getProtocolVersion();
     26    public function getProtocolVersion(): string;
    2727
    2828    /**
     
    3939     * @return static
    4040     */
    41     public function withProtocolVersion($version);
     41    public function withProtocolVersion(string $version): MessageInterface;
    4242
    4343    /**
     
    6666     *     for that header.
    6767     */
    68     public function getHeaders();
     68    public function getHeaders(): array;
    6969
    7070    /**
     
    7676     *     no matching header name is found in the message.
    7777     */
    78     public function hasHeader($name);
     78    public function hasHeader(string $name): bool;
    7979
    8080    /**
     
    9292     *    return an empty array.
    9393     */
    94     public function getHeader($name);
     94    public function getHeader(string $name): array;
    9595
    9696    /**
     
    113113     *    the message, this method MUST return an empty string.
    114114     */
    115     public function getHeaderLine($name);
     115    public function getHeaderLine(string $name): string;
    116116
    117117    /**
     
    130130     * @throws \InvalidArgumentException for invalid header names or values.
    131131     */
    132     public function withHeader($name, $value);
     132    public function withHeader(string $name, $value): MessageInterface;
    133133
    134134    /**
     
    148148     * @throws \InvalidArgumentException for invalid header names or values.
    149149     */
    150     public function withAddedHeader($name, $value);
     150    public function withAddedHeader(string $name, $value): MessageInterface;
    151151
    152152    /**
     
    162162     * @return static
    163163     */
    164     public function withoutHeader($name);
     164    public function withoutHeader(string $name): MessageInterface;
    165165
    166166    /**
     
    169169     * @return StreamInterface Returns the body as a stream.
    170170     */
    171     public function getBody();
     171    public function getBody(): StreamInterface;
    172172
    173173    /**
     
    184184     * @throws \InvalidArgumentException When the body is not valid.
    185185     */
    186     public function withBody(StreamInterface $body);
     186    public function withBody(StreamInterface $body): MessageInterface;
    187187}
  • bitfinex-pay/trunk/vendor/psr/http-message/src/RequestInterface.php

    r2706025 r2955014  
    4040     * @return string
    4141     */
    42     public function getRequestTarget();
     42    public function getRequestTarget(): string;
    4343
    4444    /**
     
    5656     * @link http://tools.ietf.org/html/rfc7230#section-5.3 (for the various
    5757     *     request-target forms allowed in request messages)
    58      * @param mixed $requestTarget
     58     * @param string $requestTarget
    5959     * @return static
    6060     */
    61     public function withRequestTarget($requestTarget);
     61    public function withRequestTarget(string $requestTarget): RequestInterface;
     62
    6263
    6364    /**
     
    6667     * @return string Returns the request method.
    6768     */
    68     public function getMethod();
     69    public function getMethod(): string;
    6970
    7071    /**
     
    8384     * @throws \InvalidArgumentException for invalid HTTP methods.
    8485     */
    85     public function withMethod($method);
     86    public function withMethod(string $method): RequestInterface;
    8687
    8788    /**
     
    9495     *     representing the URI of the request.
    9596     */
    96     public function getUri();
     97    public function getUri(): UriInterface;
    9798
    9899    /**
     
    126127     * @return static
    127128     */
    128     public function withUri(UriInterface $uri, $preserveHost = false);
     129    public function withUri(UriInterface $uri, bool $preserveHost = false): RequestInterface;
    129130}
  • bitfinex-pay/trunk/vendor/psr/http-message/src/ResponseInterface.php

    r2706025 r2955014  
    2828     * @return int Status code.
    2929     */
    30     public function getStatusCode();
     30    public function getStatusCode(): int;
    3131
    3232    /**
     
    5050     * @throws \InvalidArgumentException For invalid status code arguments.
    5151     */
    52     public function withStatus($code, $reasonPhrase = '');
     52    public function withStatus(int $code, string $reasonPhrase = ''): ResponseInterface;
    5353
    5454    /**
     
    6565     * @return string Reason phrase; must return an empty string if none present.
    6666     */
    67     public function getReasonPhrase();
     67    public function getReasonPhrase(): string;
    6868}
  • bitfinex-pay/trunk/vendor/psr/http-message/src/ServerRequestInterface.php

    r2706025 r2955014  
    5252     * @return array
    5353     */
    54     public function getServerParams();
     54    public function getServerParams(): array;
    5555
    5656    /**
     
    6464     * @return array
    6565     */
    66     public function getCookieParams();
     66    public function getCookieParams(): array;
    6767
    6868    /**
     
    8383     * @return static
    8484     */
    85     public function withCookieParams(array $cookies);
     85    public function withCookieParams(array $cookies): ServerRequestInterface;
    8686
    8787    /**
     
    9797     * @return array
    9898     */
    99     public function getQueryParams();
     99    public function getQueryParams(): array;
    100100
    101101    /**
     
    121121     * @return static
    122122     */
    123     public function withQueryParams(array $query);
     123    public function withQueryParams(array $query): ServerRequestInterface;
    124124
    125125    /**
     
    135135     *     array MUST be returned if no data is present.
    136136     */
    137     public function getUploadedFiles();
     137    public function getUploadedFiles(): array;
    138138
    139139    /**
     
    148148     * @throws \InvalidArgumentException if an invalid structure is provided.
    149149     */
    150     public function withUploadedFiles(array $uploadedFiles);
     150    public function withUploadedFiles(array $uploadedFiles): ServerRequestInterface;
    151151
    152152    /**
     
    195195     *     provided.
    196196     */
    197     public function withParsedBody($data);
     197    public function withParsedBody($data): ServerRequestInterface;
    198198
    199199    /**
     
    208208     * @return array Attributes derived from the request.
    209209     */
    210     public function getAttributes();
     210    public function getAttributes(): array;
    211211
    212212    /**
     
    225225     * @return mixed
    226226     */
    227     public function getAttribute($name, $default = null);
     227    public function getAttribute(string $name, $default = null);
    228228
    229229    /**
     
    242242     * @return static
    243243     */
    244     public function withAttribute($name, $value);
     244    public function withAttribute(string $name, $value): ServerRequestInterface;
    245245
    246246    /**
     
    258258     * @return static
    259259     */
    260     public function withoutAttribute($name);
     260    public function withoutAttribute(string $name): ServerRequestInterface;
    261261}
  • bitfinex-pay/trunk/vendor/psr/http-message/src/StreamInterface.php

    r2706025 r2955014  
    2626     * @return string
    2727     */
    28     public function __toString();
     28    public function __toString(): string;
    2929
    3030    /**
     
    3333     * @return void
    3434     */
    35     public function close();
     35    public function close(): void;
    3636
    3737    /**
     
    4949     * @return int|null Returns the size in bytes if known, or null if unknown.
    5050     */
    51     public function getSize();
     51    public function getSize(): ?int;
    5252
    5353    /**
     
    5757     * @throws \RuntimeException on error.
    5858     */
    59     public function tell();
     59    public function tell(): int;
    6060
    6161    /**
     
    6464     * @return bool
    6565     */
    66     public function eof();
     66    public function eof(): bool;
    6767
    6868    /**
     
    7171     * @return bool
    7272     */
    73     public function isSeekable();
     73    public function isSeekable(): bool;
    7474
    7575    /**
     
    8585     * @throws \RuntimeException on failure.
    8686     */
    87     public function seek($offset, $whence = SEEK_SET);
     87    public function seek(int $offset, int $whence = SEEK_SET): void;
    8888
    8989    /**
     
    9797     * @throws \RuntimeException on failure.
    9898     */
    99     public function rewind();
     99    public function rewind(): void;
    100100
    101101    /**
     
    104104     * @return bool
    105105     */
    106     public function isWritable();
     106    public function isWritable(): bool;
    107107
    108108    /**
     
    113113     * @throws \RuntimeException on failure.
    114114     */
    115     public function write($string);
     115    public function write(string $string): int;
    116116
    117117    /**
     
    120120     * @return bool
    121121     */
    122     public function isReadable();
     122    public function isReadable(): bool;
    123123
    124124    /**
     
    132132     * @throws \RuntimeException if an error occurs.
    133133     */
    134     public function read($length);
     134    public function read(int $length): string;
    135135
    136136    /**
     
    141141     *     reading.
    142142     */
    143     public function getContents();
     143    public function getContents(): string;
    144144
    145145    /**
     
    150150     *
    151151     * @link http://php.net/manual/en/function.stream-get-meta-data.php
    152      * @param string $key Specific metadata to retrieve.
     152     * @param string|null $key Specific metadata to retrieve.
    153153     * @return array|mixed|null Returns an associative array if no key is
    154154     *     provided. Returns a specific key value if a key is provided and the
    155155     *     value is found, or null if the key is not found.
    156156     */
    157     public function getMetadata($key = null);
     157    public function getMetadata(?string $key = null);
    158158}
  • bitfinex-pay/trunk/vendor/psr/http-message/src/UploadedFileInterface.php

    r2706025 r2955014  
    2929     *     created.
    3030     */
    31     public function getStream();
     31    public function getStream(): StreamInterface;
    3232
    3333    /**
     
    6363     *     the second or subsequent call to the method.
    6464     */
    65     public function moveTo($targetPath);
     65    public function moveTo(string $targetPath): void;
    6666   
    6767    /**
     
    7474     * @return int|null The file size in bytes or null if unknown.
    7575     */
    76     public function getSize();
     76    public function getSize(): ?int;
    7777   
    7878    /**
     
    9090     * @return int One of PHP's UPLOAD_ERR_XXX constants.
    9191     */
    92     public function getError();
     92    public function getError(): int;
    9393   
    9494    /**
     
    105105     *     was provided.
    106106     */
    107     public function getClientFilename();
     107    public function getClientFilename(): ?string;
    108108   
    109109    /**
     
    120120     *     was provided.
    121121     */
    122     public function getClientMediaType();
     122    public function getClientMediaType(): ?string;
    123123}
  • bitfinex-pay/trunk/vendor/psr/http-message/src/UriInterface.php

    r2706025 r2955014  
    11<?php
     2
    23namespace Psr\Http\Message;
    34
     
    3839     * @return string The URI scheme.
    3940     */
    40     public function getScheme();
     41    public function getScheme(): string;
    4142
    4243    /**
     
    5859     * @return string The URI authority, in "[user-info@]host[:port]" format.
    5960     */
    60     public function getAuthority();
     61    public function getAuthority(): string;
    6162
    6263    /**
     
    7576     * @return string The URI user information, in "username[:password]" format.
    7677     */
    77     public function getUserInfo();
     78    public function getUserInfo(): string;
    7879
    7980    /**
     
    8889     * @return string The URI host.
    8990     */
    90     public function getHost();
     91    public function getHost(): string;
    9192
    9293    /**
     
    105106     * @return null|int The URI port.
    106107     */
    107     public function getPort();
     108    public function getPort(): ?int;
    108109
    109110    /**
     
    132133     * @return string The URI path.
    133134     */
    134     public function getPath();
     135    public function getPath(): string;
    135136
    136137    /**
     
    154155     * @return string The URI query string.
    155156     */
    156     public function getQuery();
     157    public function getQuery(): string;
    157158
    158159    /**
     
    172173     * @return string The URI fragment.
    173174     */
    174     public function getFragment();
     175    public function getFragment(): string;
    175176
    176177    /**
     
    189190     * @throws \InvalidArgumentException for invalid or unsupported schemes.
    190191     */
    191     public function withScheme($scheme);
     192    public function withScheme(string $scheme): UriInterface;
    192193
    193194    /**
     
    205206     * @return static A new instance with the specified user information.
    206207     */
    207     public function withUserInfo($user, $password = null);
     208    public function withUserInfo(string $user, ?string $password = null): UriInterface;
    208209
    209210    /**
     
    219220     * @throws \InvalidArgumentException for invalid hostnames.
    220221     */
    221     public function withHost($host);
     222    public function withHost(string $host): UriInterface;
    222223
    223224    /**
     
    238239     * @throws \InvalidArgumentException for invalid ports.
    239240     */
    240     public function withPort($port);
     241    public function withPort(?int $port): UriInterface;
    241242
    242243    /**
     
    262263     * @throws \InvalidArgumentException for invalid paths.
    263264     */
    264     public function withPath($path);
     265    public function withPath(string $path): UriInterface;
    265266
    266267    /**
     
    279280     * @throws \InvalidArgumentException for invalid query strings.
    280281     */
    281     public function withQuery($query);
     282    public function withQuery(string $query): UriInterface;
    282283
    283284    /**
     
    295296     * @return static A new instance with the specified fragment.
    296297     */
    297     public function withFragment($fragment);
     298    public function withFragment(string $fragment): UriInterface;
    298299
    299300    /**
     
    320321     * @return string
    321322     */
    322     public function __toString();
     323    public function __toString(): string;
    323324}
Note: See TracChangeset for help on using the changeset viewer.