Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails with Composer v2 #59

Closed
mominsid opened this issue Nov 9, 2020 · 2 comments
Closed

Fails with Composer v2 #59

mominsid opened this issue Nov 9, 2020 · 2 comments

Comments

@mominsid
Copy link

mominsid commented Nov 9, 2020

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
Copy link

jezmck commented Nov 16, 2020

Duplicate of #58

@mominsid
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants