PHP API - file reorganization

265 views
Skip to first unread message

SeriousJ

unread,
Apr 4, 2017, 12:18:01 PM4/4/17
to AdWords API Forum
Hi,

I integrated the PHP Adwords API two years ago.

Since then, I updated to the latest version of the API by pulling the latest version of the Adwords files from Github. I simply pasted the latest API files from the following folder:

\src\Google\Api\Ads\AdWords\vXXXXXX

where vXXXXXX was the name of the latest version.

So for version 201609, I simply copied and pasted the following files from Github to my server:

\src\Google\Api\Ads\AdWords\v201609

Then I just had to modify my code according to the changes in the API. It worked fine for 2 years.

Now I realized that the organization of the files changed since v201702. The location of the folder is now:

\src\Google\AdsApi\AdWords\v201702

The whole file structure changed inside folder v201702 and everywhere else in the PHP API. For example there is no longer a Lib folder.

Is there a way to map the new file structure to the old structure? Or do I have to re-code everything to match the change?

SeriousJ

unread,
Apr 4, 2017, 12:35:15 PM4/4/17
to AdWords API Forum
Actually, it's not just the file structure that changed. Classes names and structures have changed too. For instance, the class AdWordsUser doesn't exist anymore.

So everything is totally broken.

I can't be the only one having this issue. Anybody else?

SeriousJ

unread,
Apr 4, 2017, 1:08:33 PM4/4/17
to AdWords API Forum
Yeah, everything changed.

For those interested, there is still an API version that works as before:

But it will soon be deprecated. So everything needs to be re-coded again.

Anybody as desperate as me?

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Apr 4, 2017, 3:39:35 PM4/4/17
to AdWords API Forum
Hi, 

The latest version of the PHP library had some major changes. You can find the upgrade guide of the latest version of PHP library here. You'll need to use Composer to install the latest version of the AdWords API PHP client library. By doing so, the composer will make sure that the required dependencies in your environment is updated. You should be able to proceed without making any major changes to the code. If you download the example files directly from the repository, these dependencies may not be configured correctly.

Give this a try and if you are still facing issues, please log an issue here.

Thanks,
Sreelakshmi, AdWords API Team

SeriousJ

unread,
Apr 4, 2017, 4:16:58 PM4/4/17
to AdWords API Forum
As soon as I try to run the first example , here is the first error message:

Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 60: SSL certificate problem: unable to get local issuer certificate

Is there a fix?

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Apr 4, 2017, 5:27:16 PM4/4/17
to AdWords API Forum
Hi, 

The error : "cURL error 60: SSL certificate problem: unable to get local issuer certificate" may be due to an issue with your Curl installation and its certificates. As suggested in my previous response, could you please create an issue in the PHP library's repository?
Reply all
Reply to author
Forward
0 new messages