google-ads-php icon indicating copy to clipboard operation
google-ads-php copied to clipboard

All classes within V10 or V11 namespace are missing

Open braankoo opened this issue 2 years ago • 4 comments

Hello there :)

Im having one very strange problem with version v15.1.0. If i try to use, for example: use Google\Ads\GoogleAds\Lib\V11\GoogleAdsClientBuilder or Google\Ads\GoogleAds\Lib\V10\GoogleAdsClientBuilder i'm getting class not found error. This relate to all classes within v10\V11 namespace. But if i try with Google\Ads\GoogleAds\Lib\V9\GoogleAdsClientBuilder all works fine.

Now i'm not sure what is the problem. I even have them loaded in autoload_classmap.php in vendors composer folder.

Any idea ? Tnx

braankoo avatar Jun 21 '22 23:06 braankoo

Hello!

How did you update this library? Did you run composer update at the root directory of your project? If not, then the configuration may not be done correctly.

fiboknacky avatar Jun 22 '22 04:06 fiboknacky

Hm. I just changed version in composer.json and run composer install. Strange thing is that phpstorm see all classes, but if I include some of them in file and run it, I get class not found exception

braankoo avatar Jun 22 '22 07:06 braankoo

If you run composer install or composer update and didn't tweak any settings in the vendor/ directory, usually it should work. Could you describe more how you "include some files and run it"?

fiboknacky avatar Jun 22 '22 07:06 fiboknacky

I ran into the same problem when I do upgrade from v9 -> v11, can not found class in github CI/CD, but work fine in my local IDE , after debug for hours , I found the root cause is the namespace of version should be Upper case ex: V11 not v11

varbark avatar Jul 06 '22 12:07 varbark

Closing due to inactivity. Feel free to reopen this if you still face the issue.

fiboknacky avatar Aug 29 '22 06:08 fiboknacky