googleads / googleads-php-lib

Google Ad Manager SOAP API Client Library for PHP
Apache License 2.0
655 stars 768 forks source link

Composer installing only dependencies, not googleads/googleads-php-lib #729

Closed xandreix0 closed 2 years ago

xandreix0 commented 2 years ago

Hi,

EDIT: I managed to get it working by "patching" the composer.json ..changing the package name so that is not the same as "googleads-php-lib" and adding "googleads/googleads-php-lib":"^55.0.0", to the require list.

  1. I have a plesk installation and using the built in php composer and php 7.4 when I install the package it is all ok like in the screenshot image but my scripts report missing classes ([Fatal Error] Uncaught Error: Class 'Google\AdsApi\Common\OAuth2TokenBuilder' not found) which means either autoload was not installed propely or the files are missing.. I looked in the package folder and the googleads/googleads-php-lib folder is missing It is also missing from the composer.lock and installed.json composer_lock.txt

  2. I tried installing the package locally with xampp php version 7.4 or 8.0 + composer for windows.. but it fetches me the ^10.0 version (2016) very strange... as if it does not accept my php version?

  3. I downloaded the missing files directly from github and copied the googleads/googleads-php-lib folder manually to the package instalation and it still does not see it.

The plesk thing is new.. I have just tried it.. and until now I managed to install it locally for 4 years without issues. Going insane here. please help!

Thank you!

Andrei Chirea

thangduo commented 2 years ago

Hi,

Thanks for reporting this issue. Would you mind sharing your patched composer.json file?

Thanks Thang

xandreix0 commented 2 years ago

Hi, sure thing, Here is the below json. the only changes are the name of the package "googleads/googleads-php-lib-dummy-name" and I added the "googleads/googleads-php-lib":"^55.0.0", line Also I removed this part "scripts": { "pre-update-cmd": "@php check_conditions.php", "pre-install-cmd": "@php check_conditions.php" } because it caused plesk to throw an error.. leaving the below json: Cheers,

{ "name": "googleads/googleads-php-lib-dummy-name", "description": "Google Ads APIs Client Library for PHP (AdWords and Ad Manager)", "require": { "php": ">=7.3", "ext-mbstring": "", "ext-openssl": "", "ext-soap": "", "google/auth": "^1.0.0", "googleads/googleads-php-lib":"^55.0.0", "guzzlehttp/guzzle": "^6.0 || ^7.0", "guzzlehttp/psr7": "^1.2", "monolog/monolog": "^2.2.0", "phpdocumentor/reflection-docblock": "^3.0.3 || ^4.0 || ^5.0", "symfony/serializer": "^3.0.3 || ^4.4.0 || ^5.0.0", "ext-json": "" }, "require-dev": { "phpunit/phpunit": "^9.5.2", "squizlabs/php_codesniffer": "^2.9 || ^3.2" }, "homepage": "https://github.com/googleads/googleads-php-lib", "license": "Apache-2.0", "autoload": { "psr-4": { "Google\AdsApi\": "src/Google/AdsApi/" } }, "authors": [ { "name": "Google", "homepage": "https://github.com/googleads/googleads-php-lib/contributors" } ] }

PierrickVoulet commented 2 years ago

Thanks for sharing, @xandreix0. I am closing this issue because it seems to be fixed, feel free to reopen if any follow up is necessary.