Migrating to v201708 and composer

23 views
Skip to first unread message

Douglas Lewis

unread,
Sep 11, 2017, 3:19:53 AM9/11/17
to AdWords API Forum
I used to be able to  change the DEFAULT_VERSION in the settings.ini file to tell my code what version of the adwords library to use. Now that I've graduated to the v201708 where I have to use composer and classes ./ namespaces I don't know what version I'm actually calling. My test code is working but I have no idea what version I'm actually calling.

As further information I cloned the github repo in my html directory. I then created a test sibling directory and copied the example/v201708/Targeting/LookupLocation.php and adsapi_php.ini into this directory. I then edited LookupLocation.php as follows.

namespace Google\AdsAPI\Adwords;

require '../googleads-php-lib/vendor/autoload.php';

As I said my test code works but I have know idea what version I'm using.

Would I change my namespace to namespace Google\AdsApi\AdWords\v201708;

Thanks for any help

Peter Oliquino

unread,
Sep 11, 2017, 3:49:51 AM9/11/17
to AdWords API Forum
Hi Douglas,

If you have already downloaded the updated client library and followed the PHP upgrade guide, then rest assured that you are already using the most recent version of the AdWords API. However, if you still require additional or specific information, then I would recommend that you enable logging as this will allow you to view which version (#3 item, the RequestHeader element contains the version of the AdWords API service) is being used each time to make an AdWords API service call. Let me know if this helps.

Best regards,
Peter
AdWords API Team
Reply all
Reply to author
Forward
0 new messages