0
votes

Is it possible to include https://github.com/googleads/googleads-php-lib with Symfony2. I tried to install it with composer but I always get some error regarding namespaces. Please notice that Google Library doesn't use namespaces. I tried to set included path but didn't manage to get this working.

Does anyone knows how to pull this out/

This is error I got:

Compile Error: AdWordsSoapClientFactory::DoRequireOnce(): Failed opening required '/vagrant/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/Lib/../v201309/CampaignService.php' (include_path='/vagrant/vendor/googleads/googleads-php-lib/src:.:/usr/share/php:/usr/share/pear')

Also I added this to composer.json "classmap": ["vendor/googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/Lib"]

1
does v201309/CampaignService.php exist? - xurshid29
Yes, that was issue at the end - Antonio Peric

1 Answers

0
votes

May be this dirty solution can help you.. - create a service (AdWordsService) - include classes inside constructor;

example:

class MyAdWordsService
{
    public function __construct()
    {
        // include classes here
    }

    public function doSomething($someArguemtns)
    {
        do_some_operations();
    }
}

and use it:

$myAdWordsService->doSomething();