CyberSource / cybersource-rest-client-php

PHP client library for the CyberSource REST API
29 stars 65 forks source link

Fails with Composer v2 #59

Closed mominsid closed 1 year ago

mominsid commented 3 years ago

This package assumes vendor/composer/installed.json is in a Composer v1 format.

Here is a sample snippet of the Composer 2 version of this file:

{
    "packages": [
        {
            "name": "altek/accountant",
            "version": "v2.0.3",
            "version_normalized": "2.0.3.0",
            // ...
        }
  ]
}

However, the function CyberSource\ApiClient::getClientId assumes that packages is at the top level, which is no longer the case in the format listed above.

It fails at this line approx 155 where it tries to retrieve the property name:


            if (strcmp($package['name'], "cybersource/rest-client-php") == 0)
jezmck commented 3 years ago

Duplicate of #58

mominsid commented 1 year ago

This doesn't look like a duplicate of #58 , but rather of #111. Closing.