aporat / store-receipt-validator

PHP receipt validator for Apple iTunes, Google Play and Amazon App Store
Apache License 2.0
633 stars 153 forks source link

Uncaught Error: Call to undefined method GuzzleHttp\Client::getConfig() #157

Closed sjoukedv closed 2 years ago

sjoukedv commented 2 years ago

Tried different PHP (7.4, 8.0, 8.1) and package (3.4.1, 3.5, 4.1 latest) versions

2022/01/05 06:44:38 [error] 58278#58278: *3825 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined method GuzzleHttp\Client::getConfig() in <dir>/vendor/aporat/store-receipt-validator/src/iTunes/Validator.php:274
Stack trace:
#0 /<dir>/vendor/aporat/store-receipt-validator/src/iTunes/Validator.php(261): ReceiptValidator\iTunes\Validator->sendRequestUsingClient(Object(GuzzleHttp\Client))
#1 <dir>/appstore-processor.php(261): ReceiptValidator\iTunes\Validator->validate()
#2 <dir>/appstore-processor.php(1037): AppStoreProcessor->validateReceipt('MIIXPgYJKoZIhvc...', true)
#3 <dir>/appstore-processor.php(360): AppStoreProcessor->measure(Array, Array)

$client instanceof ClientInterface seems to be false.

Isn't this the proper way to instantiate a client $client = new GuzzleHttp\Client();?

Stafox commented 2 years ago

Hi. Could you share the code of AppStoreProcessor->validateReceipt method?

sjoukedv commented 2 years ago

Yes:

require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php';
use ReceiptValidator\iTunes\Validator as iTunesValidator;
......

class AppStoreProcessor {
   ........
    function validateReceipt($receipt, $production = false) {

        // echo "validating on " . ($production ? "production" : "sandbox") . PHP_EOL;
        // echo $receipt;
        $validator = new iTunesValidator($production ? iTunesValidator::ENDPOINT_PRODUCTION : iTunesValidator::ENDPOINT_SANDBOX); // Or iTunesValidator::ENDPOINT_SANDBOX if sandbox testing
        $receiptBase64Data = $receipt;
        try {
          $response = $validator->setReceiptData($receiptBase64Data)->validate();
          $sharedSecret = '.......';
          $response = $validator->setSharedSecret($sharedSecret)->setReceiptData($receiptBase64Data)->validate();

        } catch (Exception $e) {
          echo 'got error = ' . $e->getMessage() . PHP_EOL;
          return false;
        }

        if ($response->isValid()) {
            // $this->write_receipt_log($response);
            return $response;
        } else {
            if($production == false) {
                return $this->validateReceipt($receipt, true);
            }
            // echo "Nothing to be done";
            return false;
        }
    }
}

Note, that this takes place inside a Wordpress environment.

I appreciate your help!

Stafox commented 2 years ago

Could you also share a version of guzzle in composer.lock?

sjoukedv commented 2 years ago

composer.json

{
    "require": {
        "aporat/store-receipt-validator": "^3.4.1",
        "psr/log": "1.1.4",
        "psr/cache": "1.0.1"
    },
    "scripts": {
        "post-install-cmd": [
            "Google_Task_Composer::cleanup"
        ],
        "post-update-cmd": [
            "Google_Task_Composer::cleanup"
        ]
    },
    "extra": {
        "google/apiclient-services": [
            "AndroidPublisher"
        ]
    }
}
sjoukedv commented 2 years ago

composer.lock

View ```{ "_readme": [ "This file locks the dependencies of your project to a known state", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], "content-hash": "2b5a4ea9725f7baef6d4f4498c4701e6", "packages": [ { "name": "aporat/store-receipt-validator", "version": "3.5.0", "source": { "type": "git", "url": "https://github.com/aporat/store-receipt-validator.git", "reference": "b88a5fb09757669dfbe866abd5ff6292c4a97a3d" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/aporat/store-receipt-validator/zipball/b88a5fb09757669dfbe866abd5ff6292c4a97a3d", "reference": "b88a5fb09757669dfbe866abd5ff6292c4a97a3d", "shasum": "" }, "require": { "ext-json": "*", "google/apiclient": "^2.0", "guzzlehttp/guzzle": "^6.3", "nesbot/carbon": "^1.0|^2.0", "php": "^7.1", "robrichards/xmlseclibs": "^3.0.4" }, "require-dev": { "phpunit/phpunit": "^7.0" }, "type": "library", "autoload": { "psr-4": { "ReceiptValidator\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "Apache-2.0" ], "authors": [ { "name": "Adar Porat", "email": "adar.porat@gmail.com", "homepage": "https://github.com/aporat" }, { "name": "Stanimir Kukudov", "email": "stanimir.kukudov@gmail.com", "homepage": "https://github.com/stanimir-kukudov" } ], "description": "PHP receipt validator for Apple iTunes, Google Play and Amazon App Store", "homepage": "https://github.com/aporat/store-receipt-validator", "keywords": [ "apple", "in app", "itunes", "purchase", "receipt" ], "time": "2020-08-03T14:47:24+00:00" }, { "name": "firebase/php-jwt", "version": "v5.5.1", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", "reference": "83b609028194aa042ea33b5af2d41a7427de80e6" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/firebase/php-jwt/zipball/83b609028194aa042ea33b5af2d41a7427de80e6", "reference": "83b609028194aa042ea33b5af2d41a7427de80e6", "shasum": "" }, "require": { "php": ">=5.3.0" }, "require-dev": { "phpunit/phpunit": ">=4.8 <=9" }, "suggest": { "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" }, "type": "library", "autoload": { "psr-4": { "Firebase\\JWT\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Neuman Vong", "email": "neuman+pear@twilio.com", "role": "Developer" }, { "name": "Anant Narayanan", "email": "anant@php.net", "role": "Developer" } ], "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", "homepage": "https://github.com/firebase/php-jwt", "keywords": [ "jwt", "php" ], "time": "2021-11-08T20:18:51+00:00" }, { "name": "google/apiclient", "version": "v2.12.1", "source": { "type": "git", "url": "https://github.com/googleapis/google-api-php-client.git", "reference": "1530583a711f4414407112c4068464bcbace1c71" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/1530583a711f4414407112c4068464bcbace1c71", "reference": "1530583a711f4414407112c4068464bcbace1c71", "shasum": "" }, "require": { "firebase/php-jwt": "~2.0||~3.0||~4.0||~5.0", "google/apiclient-services": "~0.200", "google/auth": "^1.10", "guzzlehttp/guzzle": "~5.3.3||~6.0||~7.0", "guzzlehttp/psr7": "^1.7||^2.0.0", "monolog/monolog": "^1.17||^2.0", "php": "^5.6|^7.0|^8.0", "phpseclib/phpseclib": "~2.0||^3.0.2" }, "require-dev": { "cache/filesystem-adapter": "^0.3.2|^1.1", "composer/composer": "^1.10.22", "dealerdirect/phpcodesniffer-composer-installer": "^0.7", "phpcompatibility/php-compatibility": "^9.2", "phpspec/prophecy-phpunit": "^1.1||^2.0", "phpunit/phpunit": "^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0", "squizlabs/php_codesniffer": "~2.3", "symfony/css-selector": "~2.1", "symfony/dom-crawler": "~2.1", "yoast/phpunit-polyfills": "^1.0" }, "suggest": { "cache/filesystem-adapter": "For caching certs and tokens (using Google\\Client::setCache)" }, "type": "library", "extra": { "branch-alias": { "dev-main": "2.x-dev" } }, "autoload": { "psr-4": { "Google\\": "src/" }, "files": [ "src/aliases.php" ], "classmap": [ "src/aliases.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "Apache-2.0" ], "description": "Client library for Google APIs", "homepage": "http://developers.google.com/api-client-library/php", "keywords": [ "google" ], "time": "2021-12-02T03:34:25+00:00" }, { "name": "google/apiclient-services", "version": "v0.228.0", "source": { "type": "git", "url": "https://github.com/googleapis/google-api-php-client-services.git", "reference": "ec64bbf1d6af9475bee7b1ce4fc0ed8a0a8d8889" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/ec64bbf1d6af9475bee7b1ce4fc0ed8a0a8d8889", "reference": "ec64bbf1d6af9475bee7b1ce4fc0ed8a0a8d8889", "shasum": "" }, "require": { "php": ">=5.6" }, "require-dev": { "phpunit/phpunit": "^5.7||^8.5.13" }, "type": "library", "autoload": { "psr-4": { "Google\\Service\\": "src" }, "files": [ "autoload.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "Apache-2.0" ], "description": "Client library for Google APIs", "homepage": "http://developers.google.com/api-client-library/php", "keywords": [ "google" ], "time": "2021-12-21T12:26:12+00:00" }, { "name": "google/auth", "version": "v1.18.0", "source": { "type": "git", "url": "https://github.com/googleapis/google-auth-library-php.git", "reference": "21dd478e77b0634ed9e3a68613f74ed250ca9347" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/21dd478e77b0634ed9e3a68613f74ed250ca9347", "reference": "21dd478e77b0634ed9e3a68613f74ed250ca9347", "shasum": "" }, "require": { "firebase/php-jwt": "~2.0|~3.0|~4.0|~5.0", "guzzlehttp/guzzle": "^5.3.1|^6.2.1|^7.0", "guzzlehttp/psr7": "^1.7|^2.0", "php": ">=5.4", "psr/cache": "^1.0|^2.0", "psr/http-message": "^1.0" }, "require-dev": { "guzzlehttp/promises": "0.1.1|^1.3", "kelvinmo/simplejwt": "^0.2.5|^0.5.1", "phpseclib/phpseclib": "^2.0.31", "phpunit/phpunit": "^4.8.36|^5.7", "sebastian/comparator": ">=1.2.3" }, "suggest": { "phpseclib/phpseclib": "May be used in place of OpenSSL for signing strings or for token management. Please require version ^2." }, "type": "library", "autoload": { "psr-4": { "Google\\Auth\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "Apache-2.0" ], "description": "Google Auth Library for PHP", "homepage": "http://github.com/google/google-auth-library-php", "keywords": [ "Authentication", "google", "oauth2" ], "time": "2021-08-24T18:03:18+00:00" }, { "name": "guzzlehttp/guzzle", "version": "6.5.5", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", "shasum": "" }, "require": { "ext-json": "*", "guzzlehttp/promises": "^1.0", "guzzlehttp/psr7": "^1.6.1", "php": ">=5.5", "symfony/polyfill-intl-idn": "^1.17.0" }, "require-dev": { "ext-curl": "*", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", "psr/log": "^1.1" }, "suggest": { "psr/log": "Required for using the Log middleware" }, "type": "library", "extra": { "branch-alias": { "dev-master": "6.5-dev" } }, "autoload": { "psr-4": { "GuzzleHttp\\": "src/" }, "files": [ "src/functions_include.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" } ], "description": "Guzzle is a PHP HTTP client library", "homepage": "http://guzzlephp.org/", "keywords": [ "client", "curl", "framework", "http", "http client", "rest", "web service" ], "time": "2020-06-16T21:01:06+00:00" }, { "name": "guzzlehttp/promises", "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", "shasum": "" }, "require": { "php": ">=5.5" }, "require-dev": { "symfony/phpunit-bridge": "^4.4 || ^5.1" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.5-dev" } }, "autoload": { "psr-4": { "GuzzleHttp\\Promise\\": "src/" }, "files": [ "src/functions_include.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Graham Campbell", "email": "hello@gjcampbell.co.uk", "homepage": "https://github.com/GrahamCampbell" }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" }, { "name": "Tobias Nyholm", "email": "tobias.nyholm@gmail.com", "homepage": "https://github.com/Nyholm" }, { "name": "Tobias Schultze", "email": "webmaster@tubo-world.de", "homepage": "https://github.com/Tobion" } ], "description": "Guzzle promises library", "keywords": [ "promise" ], "funding": [ { "url": "https://github.com/GrahamCampbell", "type": "github" }, { "url": "https://github.com/Nyholm", "type": "github" }, { "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", "type": "tidelift" } ], "time": "2021-10-22T20:56:57+00:00" }, { "name": "guzzlehttp/psr7", "version": "1.8.3", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", "reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/guzzle/psr7/zipball/1afdd860a2566ed3c2b0b4a3de6e23434a79ec85", "reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85", "shasum": "" }, "require": { "php": ">=5.4.0", "psr/http-message": "~1.0", "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" }, "provide": { "psr/http-message-implementation": "1.0" }, "require-dev": { "ext-zlib": "*", "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.7-dev" } }, "autoload": { "psr-4": { "GuzzleHttp\\Psr7\\": "src/" }, "files": [ "src/functions_include.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Graham Campbell", "email": "hello@gjcampbell.co.uk", "homepage": "https://github.com/GrahamCampbell" }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" }, { "name": "George Mponos", "email": "gmponos@gmail.com", "homepage": "https://github.com/gmponos" }, { "name": "Tobias Nyholm", "email": "tobias.nyholm@gmail.com", "homepage": "https://github.com/Nyholm" }, { "name": "Márk Sági-Kazár", "email": "mark.sagikazar@gmail.com", "homepage": "https://github.com/sagikazarmark" }, { "name": "Tobias Schultze", "email": "webmaster@tubo-world.de", "homepage": "https://github.com/Tobion" } ], "description": "PSR-7 message implementation that also provides common utility methods", "keywords": [ "http", "message", "psr-7", "request", "response", "stream", "uri", "url" ], "funding": [ { "url": "https://github.com/GrahamCampbell", "type": "github" }, { "url": "https://github.com/Nyholm", "type": "github" }, { "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", "type": "tidelift" } ], "time": "2021-10-05T13:56:00+00:00" }, { "name": "monolog/monolog", "version": "2.3.5", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", "reference": "fd4380d6fc37626e2f799f29d91195040137eba9" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd4380d6fc37626e2f799f29d91195040137eba9", "reference": "fd4380d6fc37626e2f799f29d91195040137eba9", "shasum": "" }, "require": { "php": ">=7.2", "psr/log": "^1.0.1 || ^2.0 || ^3.0" }, "provide": { "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0" }, "require-dev": { "aws/aws-sdk-php": "^2.4.9 || ^3.0", "doctrine/couchdb": "~1.0@dev", "elasticsearch/elasticsearch": "^7", "graylog2/gelf-php": "^1.4.2", "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4 || ^3", "php-console/php-console": "^3.1.3", "phpspec/prophecy": "^1.6.1", "phpstan/phpstan": "^0.12.91", "phpunit/phpunit": "^8.5", "predis/predis": "^1.1", "rollbar/rollbar": "^1.3", "ruflin/elastica": ">=0.90@dev", "swiftmailer/swiftmailer": "^5.3|^6.0" }, "suggest": { "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", "doctrine/couchdb": "Allow sending log messages to a CouchDB server", "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", "ext-mbstring": "Allow to work properly with unicode symbols", "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", "ext-openssl": "Required to send log messages using SSL", "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", "php-console/php-console": "Allow sending log messages to Google Chrome", "rollbar/rollbar": "Allow sending log messages to Rollbar", "ruflin/elastica": "Allow sending log messages to an Elastic Search server" }, "type": "library", "extra": { "branch-alias": { "dev-main": "2.x-dev" } }, "autoload": { "psr-4": { "Monolog\\": "src/Monolog" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", "homepage": "https://seld.be" } ], "description": "Sends your logs to files, sockets, inboxes, databases and various web services", "homepage": "https://github.com/Seldaek/monolog", "keywords": [ "log", "logging", "psr-3" ], "funding": [ { "url": "https://github.com/Seldaek", "type": "github" }, { "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", "type": "tidelift" } ], "time": "2021-10-01T21:08:31+00:00" }, { "name": "nesbot/carbon", "version": "2.55.2", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", "reference": "8c2a18ce3e67c34efc1b29f64fe61304368259a2" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8c2a18ce3e67c34efc1b29f64fe61304368259a2", "reference": "8c2a18ce3e67c34efc1b29f64fe61304368259a2", "shasum": "" }, "require": { "ext-json": "*", "php": "^7.1.8 || ^8.0", "symfony/polyfill-mbstring": "^1.0", "symfony/polyfill-php80": "^1.16", "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" }, "require-dev": { "doctrine/dbal": "^2.0 || ^3.0", "doctrine/orm": "^2.7", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", "phpmd/phpmd": "^2.9", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^0.12.54", "phpunit/phpunit": "^7.5.20 || ^8.5.14", "squizlabs/php_codesniffer": "^3.4" }, "bin": [ "bin/carbon" ], "type": "library", "extra": { "branch-alias": { "dev-3.x": "3.x-dev", "dev-master": "2.x-dev" }, "laravel": { "providers": [ "Carbon\\Laravel\\ServiceProvider" ] }, "phpstan": { "includes": [ "extension.neon" ] } }, "autoload": { "psr-4": { "Carbon\\": "src/Carbon/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Brian Nesbitt", "email": "brian@nesbot.com", "homepage": "https://markido.com" }, { "name": "kylekatarnls", "homepage": "https://github.com/kylekatarnls" } ], "description": "An API extension for DateTime that supports 281 different languages.", "homepage": "https://carbon.nesbot.com", "keywords": [ "date", "datetime", "time" ], "funding": [ { "url": "https://opencollective.com/Carbon", "type": "open_collective" }, { "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", "type": "tidelift" } ], "time": "2021-12-03T14:59:52+00:00" }, { "name": "paragonie/constant_time_encoding", "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", "reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c", "reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c", "shasum": "" }, "require": { "php": "^7|^8" }, "require-dev": { "phpunit/phpunit": "^6|^7|^8|^9", "vimeo/psalm": "^1|^2|^3|^4" }, "type": "library", "autoload": { "psr-4": { "ParagonIE\\ConstantTime\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Paragon Initiative Enterprises", "email": "security@paragonie.com", "homepage": "https://paragonie.com", "role": "Maintainer" }, { "name": "Steve 'Sc00bz' Thomas", "email": "steve@tobtu.com", "homepage": "https://www.tobtu.com", "role": "Original Developer" } ], "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", "keywords": [ "base16", "base32", "base32_decode", "base32_encode", "base64", "base64_decode", "base64_encode", "bin2hex", "encoding", "hex", "hex2bin", "rfc4648" ], "time": "2020-12-06T15:14:20+00:00" }, { "name": "paragonie/random_compat", "version": "v9.99.100", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", "shasum": "" }, "require": { "php": ">= 7" }, "require-dev": { "phpunit/phpunit": "4.*|5.*", "vimeo/psalm": "^1" }, "suggest": { "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." }, "type": "library", "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Paragon Initiative Enterprises", "email": "security@paragonie.com", "homepage": "https://paragonie.com" } ], "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", "keywords": [ "csprng", "polyfill", "pseudorandom", "random" ], "time": "2020-10-15T08:29:30+00:00" }, { "name": "phpseclib/phpseclib", "version": "3.0.12", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", "reference": "89bfb45bd8b1abc3b37e910d57f5dbd3174f40fb" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/89bfb45bd8b1abc3b37e910d57f5dbd3174f40fb", "reference": "89bfb45bd8b1abc3b37e910d57f5dbd3174f40fb", "shasum": "" }, "require": { "paragonie/constant_time_encoding": "^1|^2", "paragonie/random_compat": "^1.4|^2.0|^9.99.99", "php": ">=5.6.1" }, "require-dev": { "phing/phing": "~2.7", "phpunit/phpunit": "^5.7|^6.0|^9.4", "squizlabs/php_codesniffer": "~2.0" }, "suggest": { "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." }, "type": "library", "autoload": { "files": [ "phpseclib/bootstrap.php" ], "psr-4": { "phpseclib3\\": "phpseclib/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Jim Wigginton", "email": "terrafrost@php.net", "role": "Lead Developer" }, { "name": "Patrick Monnerat", "email": "pm@datasphere.ch", "role": "Developer" }, { "name": "Andreas Fischer", "email": "bantu@phpbb.com", "role": "Developer" }, { "name": "Hans-Jürgen Petrich", "email": "petrich@tronic-media.com", "role": "Developer" }, { "name": "Graham Campbell", "email": "graham@alt-three.com", "role": "Developer" } ], "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", "homepage": "http://phpseclib.sourceforge.net", "keywords": [ "BigInteger", "aes", "asn.1", "asn1", "blowfish", "crypto", "cryptography", "encryption", "rsa", "security", "sftp", "signature", "signing", "ssh", "twofish", "x.509", "x509" ], "funding": [ { "url": "https://github.com/terrafrost", "type": "github" }, { "url": "https://www.patreon.com/phpseclib", "type": "patreon" }, { "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", "type": "tidelift" } ], "time": "2021-11-28T23:46:03+00:00" }, { "name": "psr/cache", "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/php-fig/cache.git", "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", "shasum": "" }, "require": { "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { "Psr\\Cache\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "PHP-FIG", "homepage": "http://www.php-fig.org/" } ], "description": "Common interface for caching libraries", "keywords": [ "cache", "psr", "psr-6" ], "time": "2016-08-06T20:24:11+00:00" }, { "name": "psr/http-message", "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, "require": { "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "PHP-FIG", "homepage": "http://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", "homepage": "https://github.com/php-fig/http-message", "keywords": [ "http", "http-message", "psr", "psr-7", "request", "response" ], "time": "2016-08-06T14:39:51+00:00" }, { "name": "psr/log", "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.1.x-dev" } }, "autoload": { "psr-4": { "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "PHP-FIG", "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for logging libraries", "homepage": "https://github.com/php-fig/log", "keywords": [ "log", "psr", "psr-3" ], "time": "2021-05-03T11:20:27+00:00" }, { "name": "ralouphie/getallheaders", "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/ralouphie/getallheaders.git", "reference": "120b605dfeb996808c31b6477290a714d356e822" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", "reference": "120b605dfeb996808c31b6477290a714d356e822", "shasum": "" }, "require": { "php": ">=5.6" }, "require-dev": { "php-coveralls/php-coveralls": "^2.1", "phpunit/phpunit": "^5 || ^6.5" }, "type": "library", "autoload": { "files": [ "src/getallheaders.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Ralph Khattar", "email": "ralph.khattar@gmail.com" } ], "description": "A polyfill for getallheaders.", "time": "2019-03-08T08:55:37+00:00" }, { "name": "robrichards/xmlseclibs", "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/robrichards/xmlseclibs.git", "reference": "f8f19e58f26cdb42c54b214ff8a820760292f8df" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/robrichards/xmlseclibs/zipball/f8f19e58f26cdb42c54b214ff8a820760292f8df", "reference": "f8f19e58f26cdb42c54b214ff8a820760292f8df", "shasum": "" }, "require": { "ext-openssl": "*", "php": ">= 5.4" }, "type": "library", "autoload": { "psr-4": { "RobRichards\\XMLSecLibs\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "description": "A PHP library for XML Security", "homepage": "https://github.com/robrichards/xmlseclibs", "keywords": [ "security", "signature", "xml", "xmldsig" ], "time": "2020-09-05T13:00:25+00:00" }, { "name": "symfony/deprecation-contracts", "version": "v2.5.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", "shasum": "" }, "require": { "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", "url": "https://github.com/symfony/contracts" } }, "autoload": { "files": [ "function.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Nicolas Grekas", "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "funding": [ { "url": "https://symfony.com/sponsor", "type": "custom" }, { "url": "https://github.com/fabpot", "type": "github" }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], "time": "2021-07-12T14:48:14+00:00" }, { "name": "symfony/polyfill-intl-idn", "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65", "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65", "shasum": "" }, "require": { "php": ">=7.1", "symfony/polyfill-intl-normalizer": "^1.10", "symfony/polyfill-php72": "^1.10" }, "suggest": { "ext-intl": "For best performance" }, "type": "library", "extra": { "branch-alias": { "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { "Symfony\\Polyfill\\Intl\\Idn\\": "" }, "files": [ "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Laurent Bassin", "email": "laurent@bassin.info" }, { "name": "Trevor Rowbotham", "email": "trevor.rowbotham@pm.me" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", "idn", "intl", "polyfill", "portable", "shim" ], "funding": [ { "url": "https://symfony.com/sponsor", "type": "custom" }, { "url": "https://github.com/fabpot", "type": "github" }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], "time": "2021-05-27T09:27:20+00:00" }, { "name": "symfony/polyfill-intl-normalizer", "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", "shasum": "" }, "require": { "php": ">=7.1" }, "suggest": { "ext-intl": "For best performance" }, "type": "library", "extra": { "branch-alias": { "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { "Symfony\\Polyfill\\Intl\\Normalizer\\": "" }, "files": [ "bootstrap.php" ], "classmap": [ "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Nicolas Grekas", "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], "description": "Symfony polyfill for intl's Normalizer class and related functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", "intl", "normalizer", "polyfill", "portable", "shim" ], "funding": [ { "url": "https://symfony.com/sponsor", "type": "custom" }, { "url": "https://github.com/fabpot", "type": "github" }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-mbstring", "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", "shasum": "" }, "require": { "php": ">=7.1" }, "suggest": { "ext-mbstring": "For best performance" }, "type": "library", "extra": { "branch-alias": { "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" }, "files": [ "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Nicolas Grekas", "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], "description": "Symfony polyfill for the Mbstring extension", "homepage": "https://symfony.com", "keywords": [ "compatibility", "mbstring", "polyfill", "portable", "shim" ], "funding": [ { "url": "https://symfony.com/sponsor", "type": "custom" }, { "url": "https://github.com/fabpot", "type": "github" }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], "time": "2021-05-27T12:26:48+00:00" }, { "name": "symfony/polyfill-php72", "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", "shasum": "" }, "require": { "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { "Symfony\\Polyfill\\Php72\\": "" }, "files": [ "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Nicolas Grekas", "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", "polyfill", "portable", "shim" ], "funding": [ { "url": "https://symfony.com/sponsor", "type": "custom" }, { "url": "https://github.com/fabpot", "type": "github" }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], "time": "2021-05-27T09:17:38+00:00" }, { "name": "symfony/polyfill-php80", "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", "shasum": "" }, "require": { "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { "Symfony\\Polyfill\\Php80\\": "" }, "files": [ "bootstrap.php" ], "classmap": [ "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Ion Bazan", "email": "ion.bazan@gmail.com" }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", "polyfill", "portable", "shim" ], "funding": [ { "url": "https://symfony.com/sponsor", "type": "custom" }, { "url": "https://github.com/fabpot", "type": "github" }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], "time": "2021-07-28T13:41:28+00:00" }, { "name": "symfony/translation", "version": "v5.4.2", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", "reference": "ff8bb2107b6a549dc3c5dd9c498dcc82c9c098ca" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/translation/zipball/ff8bb2107b6a549dc3c5dd9c498dcc82c9c098ca", "reference": "ff8bb2107b6a549dc3c5dd9c498dcc82c9c098ca", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php80": "^1.16", "symfony/translation-contracts": "^2.3" }, "conflict": { "symfony/config": "<4.4", "symfony/console": "<5.3", "symfony/dependency-injection": "<5.0", "symfony/http-kernel": "<5.0", "symfony/twig-bundle": "<5.0", "symfony/yaml": "<4.4" }, "provide": { "symfony/translation-implementation": "2.3" }, "require-dev": { "psr/log": "^1|^2|^3", "symfony/config": "^4.4|^5.0|^6.0", "symfony/console": "^5.4|^6.0", "symfony/dependency-injection": "^5.0|^6.0", "symfony/finder": "^4.4|^5.0|^6.0", "symfony/http-client-contracts": "^1.1|^2.0|^3.0", "symfony/http-kernel": "^5.0|^6.0", "symfony/intl": "^4.4|^5.0|^6.0", "symfony/polyfill-intl-icu": "^1.21", "symfony/service-contracts": "^1.1.2|^2|^3", "symfony/yaml": "^4.4|^5.0|^6.0" }, "suggest": { "psr/log-implementation": "To use logging capability in translator", "symfony/config": "", "symfony/yaml": "" }, "type": "library", "autoload": { "files": [ "Resources/functions.php" ], "psr-4": { "Symfony\\Component\\Translation\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Fabien Potencier", "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "funding": [ { "url": "https://symfony.com/sponsor", "type": "custom" }, { "url": "https://github.com/fabpot", "type": "github" }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], "time": "2021-12-25T19:45:36+00:00" }, { "name": "symfony/translation-contracts", "version": "v2.5.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", "reference": "d28150f0f44ce854e942b671fc2620a98aae1b1e" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/d28150f0f44ce854e942b671fc2620a98aae1b1e", "reference": "d28150f0f44ce854e942b671fc2620a98aae1b1e", "shasum": "" }, "require": { "php": ">=7.2.5" }, "suggest": { "symfony/translation-implementation": "" }, "type": "library", "extra": { "branch-alias": { "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", "url": "https://github.com/symfony/contracts" } }, "autoload": { "psr-4": { "Symfony\\Contracts\\Translation\\": "" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Nicolas Grekas", "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], "description": "Generic abstractions related to translation", "homepage": "https://symfony.com", "keywords": [ "abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards" ], "funding": [ { "url": "https://symfony.com/sponsor", "type": "custom" }, { "url": "https://github.com/fabpot", "type": "github" }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], "time": "2021-08-17T14:20:01+00:00" } ], "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": [], "platform-dev": [], "plugin-api-version": "1.1.0" } ```
sjoukedv commented 2 years ago

Also tried on staging using only composer require aporat/store-receipt-validator

Stafox commented 2 years ago

As I can see the version of guzzle is 6.5.5.

Could you debug a little and show what is the class name of $client using get_class()?

sjoukedv commented 2 years ago

In iTunes/Validator.php

private function sendRequestUsingClient(HttpClient $client)
    {
    ....
    var_dump('DEBUG_CLASS ' . get_class($client));
      $baseUri = (string) $client->getConfig('base_uri');
    ....
    }

returns

"DEBUG_CLASS GuzzleHttp\Client"

sjoukedv commented 2 years ago

In addition;

var_dump('DEBUG_METHOD ' . method_exists($client, 'getConfig'));

is

string(13) "DEBUG_METHOD "

And

var_dump(get_class_methods($client));

returns

[0]=>
string(11) "__construct"
[1]=>
string(16) "getDefaultOption"
[2]=>
string(16) "setDefaultOption"
[3]=>
string(10) "getBaseUrl"
[4]=>
string(13) "createRequest"
[5]=>
string(3) "get"
[6]=>
string(4) "head"
[7]=>
string(6) "delete"
[8]=>
string(3) "put"
[9]=>
string(5) "patch"
[10]=>
string(4) "post"
[11]=>
string(7) "options"
[12]=>
string(4) "send"
[13]=>
string(7) "sendAll"
[14]=>
string(17) "getDefaultHandler"
[15]=>
string(19) "getDefaultUserAgent"
[16]=>
string(10) "getEmitter"
}
Stafox commented 2 years ago

Looks like you've installed Guzzle 5.x https://github.com/guzzle/guzzle/blob/5.3/src/Client.php

This package requires 6 or 7.

The expected list of methods should be image

sjoukedv commented 2 years ago

It works fine when called directly from a file, but I am using the package within Wordpress' mu-plugins directory (also in own namespace). A lot of other plugins (basically which one doesn't) use GuzzleHttp and I bet they are on different versions, leading to a conflict.

Could it be that it is referring to another GuzzleHttp package elsewhere?

Edit: composer.lock contains several GuzzleHttp versions for google/auth and google/apiclient, but pretty certain it's one of the plugins causing an issue. Is GuzzleHttp properly scoped @Stafox ?

Thank you once again for the help!

Stafox commented 2 years ago

Take a look into vendor/autoload.php here you can find the path to Guzzle client.

Maybe there was some revert on your side and you got

"name": "guzzlehttp/guzzle",
            "version": "6.5.5",
            "source": {
                "type": "git",
                "url": "https://github.com/guzzle/guzzle.git",
                "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e"
            },

in composer lock, but in vendor dir the version of guzzle is 5.x

As you can see google/auth can work with guzzle 5.x, 6.x and 7.x.

{
            "name": "google/auth",
            "version": "v1.18.0",
            "source": {
                "type": "git",
                "url": "https://github.com/googleapis/google-auth-library-php.git",
                "reference": "21dd478e77b0634ed9e3a68613f74ed250ca9347"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/21dd478e77b0634ed9e3a68613f74ed250ca9347",
                "reference": "21dd478e77b0634ed9e3a68613f74ed250ca9347",
                "shasum": ""
            },
            "require": {
                "firebase/php-jwt": "~2.0|~3.0|~4.0|~5.0",
                "guzzlehttp/guzzle": "^5.3.1|^6.2.1|^7.0",
sjoukedv commented 2 years ago

I have found the issue; the (official) Cloudflare plugin was not scoped properly and using and older version of GuzzleHttp resulting in a conflict. That is the reason for the conflict.

Thanks @Stafox!