Comments (14)
Possible solution:
diff --git a/build_lib/build.xml b/build_lib/build.xml
index 50e6054..730e148 100755
--- a/build_lib/build.xml
+++ b/build_lib/build.xml
@@ -2,8 +2,11 @@
<!-- ======================================================================= -->
<!-- See README file for requirements -->
<!-- ======================================================================= -->
+
<project basedir="../" default="generate-src" name="adsapi_php">
+ <property file="src/Google/Api/Ads/AdWords/Lib/api.properties" />
+
<property name="classpath" value="" />
<property name="out.dir" value="${project.basedir}/src" />
<property name="product" value="${lib.product}" />
This at least got the library to build.
from googleads-php-lib.
The build file has changed with v5.3.0
to remove the word pseudo
from the name:
;; If enabled, class names (but not service names) will be prefixed with the
;; package name. Ex) Google\Api\Ads\AdWords\Campaign
wsdl2php.enableNamespaces=True
However, I'm still not having any luck with building this as I had with previous versions.
from googleads-php-lib.
alternatively, you can grab the WSDLInterpreter from the previous branch - those should also generate Pseudonamespaced files properly.
e.g., https://github.com/stephenyeargin/googleads-php-lib/tree/5.2.3/build_lib/WSDLInterpreter
from googleads-php-lib.
Yeah, that's my current experiment to see if that gets me a bit further down the road. I think it's safe to decide that future versions of the library support PHP 5.3+ and load-in via composer
so you guys don't have to worry about such things.
from googleads-php-lib.
@stephenyeargin pls try to generate the stub w/ the following:
# go into the top repo directory (whenever you cloned the git repo locally)
cd $repo
# make a new branch for pseudo-namespace
git checkout 5.3.0
git checkout -b 5.3.0-pns
# replace build_lib w/ older version
cd build_lib
rm -rf *
git checkout 5.2.3 .
After this, configure it as you did before (i.e., set wsdl2php.enablePseduonamespace to True.)
Please let me know if this can help you move forward. Cheers
from googleads-php-lib.
@saturnism Re-built the library, now back at where I was with #48. The trouble seems to be around
https://github.com/googleads/googleads-php-lib/blob/master/src/Google/Api/Ads/Common/Lib/SoapClientFactory.php#L166-L167 in that when I have code like:
$servicedAccountService = $this->GetService('ManagedCustomerService', 'v201402', NULL, NULL, $this->validateOnly);
The $serviceName
is coming in as ManagedCustomerService
, which is correct for loading the file needed, but the class name is actually set up as Google_Api_Ads_AdWords_v201402_ManagedCustomerService
. I know in the past the $classmap
property was used to make this work smoother with the pseudo namespacing, but I don't know what I'm missing.
from googleads-php-lib.
@stephenyeargin what version of the client library were you using for v201309?
Thanks,
from googleads-php-lib.
The answer to that is proving to be hard to ascertain because I didn't commit the build.ini
file for some odd reason. I know my last migration finished up on October 31, 2013. Here's the head of AdsUser.php
if that gives any indication. My typical process was to grab it from the Google Code site before the migration to GitHub.
<?php
/**
* Copyright 2011, Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @package GoogleApiAdsCommon
* @subpackage Lib
* @category WebServices
* @copyright 2011, Google Inc. All Rights Reserved.
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License,
* Version 2.0
* @author Adam Rogal <[email protected]>
* @author Eric Koleda <[email protected]>
* @author Vincent Tsao <[email protected]>
*/
require_once 'Google/Api/Ads/Common/Util/Logger.php';
require_once 'Google/Api/Ads/Common/Util/PeclOAuthHandler.php';
require_once 'Google/Api/Ads/Common/Util/SimpleOAuth2Handler.php';
require_once 'Google/Api/Ads/Common/Lib/SoapClientFactory.php';
require_once 'Google/Api/Ads/Common/Lib/ValidationException.php';
from googleads-php-lib.
gotcha - and could i trouble you to also send the old api.properties that you used in the previous version?
from googleads-php-lib.
I believe it was this one. I never bothered to keep the build folder around after we got it into production.
That would also put me at ~4.6.1 as the client library version.
from googleads-php-lib.
@stephenyeargin a few more things that I hope will get you through this for now:
- In all of the generated services, replace
extends Google_Api_Ads_AdWords_Lib_AdWordsSoapClient
with extendsextends AdWordsSoapClient
- Modify this file
Google/Api/Ads/Common/Lib/SoapClientFactory.php
public function GenerateSoapClient($serviceName) {
...
$this->DoRequireOnce($serviceName);
// Add the following line, assuming you only use the AdWords components
$serviceName = 'Google_Api_Ads_AdWords_' . $this->GetVersion() . '_' . $serviceName;
$soapClient = ...
...
}
from googleads-php-lib.
👍 Great news! The suggested changes work. I'll keep testing to see if I run into anything else related to it. I think we can close this issue, pending whatever patch needs to be made to accommodate it for future releases.
Now I can move on to fixing the rest of the breaking changes from the upgrade 😄
from googleads-php-lib.
@stephenyeargin thank you for your patience. it would be great if you could share your branch that has the working pseudo-namepsace code in case others need to see it.
from googleads-php-lib.
Instructions: https://gist.github.com/stephenyeargin/01686190ccf770fe4714
Built Branch: https://github.com/stephenyeargin/googleads-php-lib/tree/5.3.0-pns
I also just saw the blog post announcing v201406
. :emoji_for_head_hitting_desk:
from googleads-php-lib.
Related Issues (20)
- Unable to call to undefined method getRealContainingOneof HOT 1
- Important: Updating the minimum required PHP version for this library to PHP 8.0 HOT 1
- Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential.
- how to Create Placement in ad manager using php? HOT 1
- Activating / Deactivating Creative HOT 1
- Unable to set video source url on VideoCreative HOT 1
- latest version of Ad Manager API v202305 is not getting downloaded HOT 2
- how can I switch to v61.0.0 to install latest googleads/googleads-php-lib API v202305 HOT 1
- xml reader error for php 8.2 HOT 3
- We lost data when update ad HOT 3
- Inventory Rules - Channels HOT 1
- 61.0.0Missing file HOT 1
- I've tried every way but can't add an out-of-page size to the lineitem HOT 4
- I've tried every way but can't add an out-of-page size to the creative HOT 1
- Screenshot (Jan 23, 2024 5:19:05 AM)
- createOfflineUserDataJob block execution indefinitely with PHP 8.1.27 HOT 1
- QuotaError.EXCEEDED_QUOTA Error found when i run code HOT 1
- Error in PublisherQueryLanguageContextError.UNEXECUTABLE
- intermittent errors in Google Ads API
- Add support for symfony/serializer v.7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from googleads-php-lib.