Removing old API versions to prevent random autoload errors #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR will remove all versions of the Adwords API prior to the current version. When composer creates an optimized autoloader, it can pick any of the versions of this library since we are currently loading them all. Unfortunately for us, v2016* is alphabetically prior to v2017*, meaning the autoloader is going to use the oldest versions of the API first.
This is all evident in the
/path/to/application/vendor/composer/autoload_static.php
file. Each namespaced class is currently pointing to the v201607 like so:'AdGroupCriterionServiceGet' => DIR . '/..' . '/sidecar/googleads-php-lib/src/Google/Api/Ads/AdWords/v201607/AdGroupCriterionService.php',
Why did we just start noticing these errors?
On 6/5/2017 we made a release of this library that reverted a change previously that removed all of the older versions of the API. When those versions were added back in, the errors started happening again.
Google doesn't totally remove an API version for some time, so v201607 will only throw intermittent errors, which is what we're seeing now.