I have hundreds of php scripts much like /examples/Adwords/v201809/BasicOperations/GetCampaignsWithAwql.php
Each time there is an API version update I need to go and manually EVERY file to use the new version, and make sure NONE are missed.
Yuck!!!!!
For example:
namespace Google\AdsApi\Examples\AdWords\v201809\BasicOperations;
require __DIR__ . '/../../../../vendor/autoload.php';
use Google\AdsApi\AdWords\AdWordsServices;
use Google\AdsApi\AdWords\AdWordsSession;
use Google\AdsApi\AdWords\AdWordsSessionBuilder;
use Google\AdsApi\AdWords\Query\v201809\ServiceQueryBuilder;
use Google\AdsApi\AdWords\v201809\cm\CampaignService;
use Google\AdsApi\AdWords\v201809\cm\Page;
use Google\AdsApi\Common\OAuth2TokenBuilder;
What would be awesome is if I could have a file like "latestAPIVersion.php" which contained simply "$version = "v201809"
and I could include that file.
It doesn't seem the use or namespace command allows variables ie.. namespace Google\AdsApi\Examples\AdWords\$version\BasicOperations;
What is everyone else doing out there to handle this?
Thanks