warnings while installing the package
jinseokoh opened this issue · comments
Describe the bug
It doesn't get along with other packages having dependency of "google/auth" (for instance "google/cloud-vision")
To Reproduce
Steps to reproduce the behavior:
- Install a new Laravel project.
composer require google/cloud-vision
composer require imdhemy/laravel-purchases
- You will see a bunch of warnings.
Expected behavior
No warning messages while installing your package onto pre-existing projects.
Desktop (please complete the following information):
- OS: MacOS 11.2.1
- Laravel: latest
Additional context
Thank you for your great package. I'd like to give it a go but, I'm getting a bunch of warnings saying like "Ambiguous class resolution, "Google\Auth\Iam" was found 2x: in "/var/www/blog/vendor/google/auth/src/Iam.php" and "/var/www/blog/vendor/imdhemy/google-auth-php/src/Iam.php", the first will be used." in my existing project which happened to use google/cloud-vision
After I briefly looked at the code, I suspect the dependency of imdhemy/google-auth-php
instead of google/auth
causes the warnings. Any specific reasons to maintain imdhemy/google-auth-php
instead of just using google/auth
? I know the dependency of imdhemy/google-auth-php
comes from imdhemy/google-play-billing
not this package. but, since you are the maintainer. I want to ask here. Thank you anyways.
Hi @jinseokoh,
Thank you for reporting this issue. Yes, The dependency of imdhemy/google-auth-php
caused those warnings, So I rolled back to the official package from Google.
It's fixed now, make sure you are using imdhemy/google-play-billing (0.6.2)
.
The reason behind using an updated fork from google/auth
is to allow authentication using an array of credentials in replacement of the environment variable that holds the path to Google credentials JSON file.
It's now implemented using the official package, feel free to use it 😄.
Regards,
Thank you for the super fast update! A great job!