-
Notifications
You must be signed in to change notification settings - Fork 769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get beta version of this client library to stable. #4
Comments
Hey @vtsao, we have started to revise classes in this regard : https://github.com/theodo/adwords |
I agree on PSR-0. Note also that PSR-4 has now been approved as well: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md |
👍 Some PSR-0/PSR-4 love please! |
That would be awesome, I'm deploying apps with php 5.5, and going back to use code w/o namespaces or compatible with 5.2 is a no no, Even php officially dx http://php.net/eol.php, 5.2 three years ago. |
hey guys, have you all checked out the experimental branch w/ full namespace support? |
Hey @saturnism, I did and I was pretty impressed by the good job. However, I had the feeling it was not totally compliant with latest autoloading standards (but I may be wrong about the latter): ping @davinov |
Thanks, we are still working on the experimental branch and deciding the path we want to take moving forward with it. |
@vtsao Thank you for the update, are these decision opened to discussion? |
Plus one on the namespaces. Without them, it's just a mess. |
Any word on this (at the least an update of the experimental branch to work with the current API)? I believe Jan 1 was the official we-don't-support PHP 5.2 date was it not? |
We are still planning to work on it, but no updates as of this moment. |
Why haven't there been any commits to experimental branch since august 2014? PSR-0 compliance these days is a must not something you can just ignore. |
PSR-0 is deprecated is it not? |
Yeah, I can see now that it is. PSR-4 now replaces it. |
We've only recently announced that we're dropping PHP 5.2 support this Jan (many developers are still on 5.2 so it's hard to just stop supporting 5.2). So, we are looking forward to revamping this client library this year. Stay tuned! |
👍 |
Yes, it's still on our radar. |
I would recommend just using the non-experimental version for now. I hope to get around to making some updates to this this quarter. |
@florisgoumans it is not true that this library is "un-usable" in modern day frameworks. We use it quite extensively making thousands of api calls for hundreds of clients every day in a symfony 2 application. We install it via composer without any issues and have access to all classes using the global namespace. It is true that being a none PSR compliant library causes several pains (chief among them is the order in which you declare your object), but you should be able to use it without the use of requires or includes. If you wrap the client functionality in a class or set of classes, updating the code in the future (with a PSR version of the library) will be quite easy! Good luck |
@vtsao FYI I have created a small command/library that can be used to break files containing multiple classes into "single file per class", it can also add missing namespaces. Check it out: ClassyFile. Generating the new files is as simple as : include 'vendor/autoload.php';
$classifile = new \Onema\ClassyFile\ClassyFile();
// a namespace will be generated from the file path: `Google\Api\Ads\AdWords` and saved to the cwd under /Google/Api/Ads/AdWords/Lib/
$filePath = 'googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/v201502/';
$classifile->generateClassFiles($filePath, true, 3, 4);
// a namespace will be generated from the file path: `Google\Api\Ads\AdWords\Lib` and saved to the cwd under /Google/Api/Ads/AdWords/Lib/
$filePath = 'googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/Lib/';
$classifile->generateClassFiles($filePath, true, 3, 5);
// ... or from the CLI:
It currently doesn't account for adding use statements if none have been specified in the original file, but I believe is a good step in the right direction. I have added two events to allow the extension of the library. Adding missing use statements could be added in the form of an event listener or an event subscriber. Let me know if this is helpful or if you have any questions. |
@onema |
FYI we've made another release of the beta client library to the experimental branch (1.4.0-beta). Please see: for changes. |
Hi, are there any updates when experimental branch will stop being experimantal? |
Thanks @mzstic. No updates at the moment, but keep following this issue! |
Are you planning to rename the package? 1.4 is less than 14.0... |
@jbboehr Thanks for bringing this up, we're currently still thinking about how to proceed with this, will definitely let the community know when we've decided. |
It appears the experimental branch now only supports a deprecated version of API, any updates on this please? Thanks. |
@dan-rally we'll be updating experimental soon. |
@vtsao OK thanks for the update. |
The experimental library has now been pushed to stable and the old library has been deprecated. Please see our blog post announcement for details: Thanks for everyone's contributions to both the old and new libraries! |
Re-purposing this as a tracking bug for getting the beta version of this client library to stable.
Blocked by:
The text was updated successfully, but these errors were encountered: