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

ApiClient.php does not work when composer's "vendor-dir" is not "vendor" #116

Open
vfalendysh opened this issue Nov 4, 2022 · 0 comments

Comments

@vfalendysh
Copy link

File: cybersource/rest-client-php/lib/ApiClient.php
Function: getClientId()

This code has hardcoded "vendor" dir name, but composer has the ability to override it with vendor-dir directive, and when it happens, lib will stop working rendering file not found message. Also, what if I do not use composer?

$packages = json_decode(file_get_contents(DIR . "/../../../../vendor/composer/installed.json"), true);

proper code (does not go outside of the "vendor" folder):

$packages = json_decode(file_get_contents(DIR . "/../../../composer/installed.json"), true);

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

No branches or pull requests

1 participant