Originally created by: SammyK
Thoughts? :)
get() to accept array of params since it's the most requested featuredefault_graph_version required and remove the fallback constantFacebook prefix from nearly all classesfacebook-php-sdk-v4 to facebook-php-sdk and add 301; abandon facebook/php-sdk-v4 on Packagist and create new alias: facebook/sdkGraphNode's and GraphEdge's and just return a Guzzle response stream?Context or Environment namespace?
Tickets: #604
Tickets: #605
Tickets: #606
Tickets: #607
Tickets: #608
Tickets: #609
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: EmanueleMinotto
Wow, there are a lot of good changes here!
I'm confused only about this point, outside the EOLs and the dependencies' required PHP version what is the reason? Are there any PHP 5.6+ features those could improve the codebase? If yes than it's great, otherwise I'm a bit against this.
My only suggestion is to include a log system (possibly based on PSR-3) for the requests and the API requests debugging.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: browner12
since this is a major version change, i'm all for switching to a v5.6 requirement.
what's the thought behind removing multiple exceptions and switching to just one? while there could be one parent
FacebookExceptionclass, it's nice to have more descriptive children so we have more granularity in the things we catch and how we deal with them.thanks!
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: yguedidi
facebook/graph-sdkI'll think of other ideas when I have time :)
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: SammyK
EOL means that version of PHP no longer gets updated - for both bug fixes or security issues. So the reason for the upgrade is to ensure the SDK can't be exploited on an old known security hole in an old version of PHP. Plus 5.6 has some TLS improvements that will be helpful for the SDK. :)
The idea would be we could have just two:
FacebookSDKException: When a general error is generated from within the SDKFacebookResponseException: When an error response from the Graph API is returnedThis is the same as v5 but in v5
FacebookResponseExceptiondoes a lot of parsing in order to best-guess a sub exception to throw as a "previous exception". It makes the API cumbersome especially when you want to figure out specifically what happened:Whereas the API to find the specific error could be made more clear:
So you get even more specificity with a cleaner API. :)
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: SammyK
@yguedidi
1) Ooh! Yes, HTTPlug is much better. :)
9) Explained above
12) I'd love to hear your thoughts on improving these. I'd be inclined to just offer a general
Collectionthat all the responses are returned in with some methods to access meta data as collections as well. It would remove a lot of code and makes the API simpler. I'm just seeing a bit of confusion around the internet about when to use thegetGraphNode()vs thegetGraphEdge()method. :)15) Love it!
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: yguedidi
@SammyK
9) The problem comes because the fact exception are "previous", but they aren't: an authentication failure is a Graph response exception.
I think
FacebookResponseExceptionshould be a parent class that maybe can be a factory for all its child classes.Then:
Clearer isn't it? :)
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: SammyK
Yeah, that's certainly better. I'm just not a fan of throwing a separate exception for every possible error response. But that's just a preference thing so I'll go with whatever the majority want. :)
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: yguedidi
@SammyK with this, the user can choose exactly which exception he/she want to catch. Imagine you want to catch only the missing permission error, with your code you'll need to first catch, and then check for the type. :)
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: SammyK
Makes sense. :)
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: tolbon
When we start :) ?
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: SammyK
@tolbon Haha! Good question. :) I guess the first step is set up the repo for a merging strategy.
@yguedidi If I remember correctly from the last major upgrade. We make
masterv6 and create new branch5.0-devand make it default. Then set up a branch alias incomposer.jsonto pointdev-masterto that branch? Although I'm realizing that line already exists. Yikes! But does that sound about right? Then I guess we could just start pushing v6 through. :)View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: yguedidi
@SammyK I create two new branches:
5.1based on5.1.5for bugfixes in that minor version5.2based on5.2.0for bugfixes toomasterwill be used for6.0developmentAny bugfix must go in the lowest affected branch, then we will have to merge the fixed branch with it's newer one.
What do you thing about this?
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: Kastlebrick
3) NO.. not everyone uses composer. It should not be required.. Personally I hate seeing that crap everywhere ;)
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: yguedidi
Composer is the de facto package dependency manager for PHP, so we will only support this installation method. If you don't want to use composer, you will always be able to download the zip file and write your own autoloader :)
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: Kastlebrick
Why? Autoloader is already there. Why not give the user the option, like it is now?
Isn't the point of the SDK's to have the needed code written for the Dev's so they don't have to write it!?
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: SammyK
Hey @Kastlebrick! The latest version of the SDK will be pulling in dependencies with composer so even if you write your own autoloader, it would need to include those dependancies.
Is there a specific reason why you're against using composer? :)
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: yguedidi
@Kastlebrick
It isn't! Even a framework will not write your business logic for you :)
BTW, I'm curious about the reason why you don't like composer..
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: Kastlebrick
@SammyK Never used it, don't have it, and it's one less thing I would have to install and maintain on my server.
@yguedidi I think the point I am trying to make is that the SDK should be self contained. And I/we shouldn't have to rely on some other 3rd party code just to make it work. Yes I 'write the business logic', but (in a nutshell) the Autoloader simply loads what is needed for the SDK so I can make that connection to FB.
I really don't want to argue semantics, but what you call 'good practice' I call bad. If you feel it's good to offer the option to use composer, then at least to both.. and don't require it.
I guess, in the end, you will do what you want.. and this is just my two cents, but I don't understand why you would require and rely on some other 3rd party just to make your code work (when it's not necessary).
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: kkopachev
Have you guys thought about distributing sdk in a phar? It will be self-contained, no autoloader needed.