Namespace support in v201402

44 views
Skip to first unread message

Barak Haviv

unread,
Apr 22, 2014, 5:09:35 AM4/22/14
to adwor...@googlegroups.com
Hi,

I am updating to PHP lib of AW API v201402. I am gonna use 5.2.3 version and would like to use real namespaces and not pseudo ones.

Now, what should I change or how should I rebuild the library to enable real namespace support? If I just take the sources as is and starts to use them I have multiple name collisions with my own classes. I am able to add `namespace AW;` to each and every of adwords library files, but then I need to change all these class_exists calls and still having some problems.

So I wonder what is the better way to get NS support in the lib?
I would prefer some property in build.properties or whenever else, which allows me to define namespace I'd like the lib will be built to.

Is there?
My PHP version is 5.3

Please advice

Anash P. Oommen (AdWords API Team)

unread,
Apr 22, 2014, 10:45:16 AM4/22/14
to adwor...@googlegroups.com
Hi Barak,

I believe it is not yet supported. Could you please open an issue at https://github.com/googleads/googleads-php-lib/issues?

Cheers,
Anash P. Oommen,
AdWords API Advisor.
Message has been deleted

Stephen Yeargin

unread,
Jul 8, 2014, 2:01:24 PM7/8/14
to adwor...@googlegroups.com

I've opened a handful of issues related to making the current iteration of pseduo namespaces work, and it's getting dangerously close to the July 21 sunset and I cannot get our application updated. I'm very concerned that our customers are soon going to lose access to their reporting data because of it.

https://github.com/googleads/googleads-php-lib/pull/45
https://github.com/googleads/googleads-php-lib/pull/48
https://github.com/googleads/googleads-php-lib/pull/54

In the past, updating for versions has been tedious, but relatively straight forward.
  1. Download latest package from Google Code (now on GitHub)
  2. Update the build.properties file to set wsdl2php.enablePseudoNamespaces=True
  3. Run `phing` to re-build the library from the WSDL files
  4. Place the updated files in the application and adjust the version identifier
  5. Go through the breaking changes list and update the pieces that will no longer work as designed
That step 3 is broken right now, and again, I'm hitting up against that deadline. I need to get to Step 5 as soon as possible to prevent issues with our customer reports.

Please let me know if you need more information, or if there is somewhere I can download a working copy of the library that isn't using common class names (like 'DateRange', 'Campaign', and 'Keyword') that are in conflict with what we already have in place.

- Stephen
Reply all
Reply to author
Forward
0 new messages