-
Notifications
You must be signed in to change notification settings - Fork 8
Update to last change of httplug #6
Update to last change of httplug #6
Conversation
Are you sure it is still the case? |
|
I'm pretty sure :) utility_separation branch on httplug was based on a commit before this change (if you do a composer install here you will still have the $options parameter, unless #5 is merged) |
|
Ah, the dependency thing. Sure. |
|
Merged |
|
Yes that was not very clear sorry :/ |
spec/BatchResultSpec.php
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we test the BatchResult implementing the BatchResult interface here?
|
@joelwurtz thanks for this PR. We really needed this and I have to admit, I did not have the patience to do this refactoring. I commented on a few minor things, but no big deals. Can you check them please? Thank you in advance. |
|
This should be good, and rebase against master |
|
I've spotted a few other issues which must be solved:
@joelwurtz May I ask you to check these out too? |
Sorry, I am not sure I can follow. What do we have to rebase? |
Just say my PR was rebased against master (since the merged in #5).
No problem |
|
Ah, I see. Great and thanks. |
|
Not sure how to clone the exceptions array as an exception is not clonable ? |
|
It is not an array, but an Can you check out which is the default behaviour of cloning an SplObjectStorage: are the underlying objects cloned too? |
|
I add a test to valid the behavior (like adding an exception then a request which should keep the previous exception) it seems to work. So i believe that underlying object are not cloned only the array but reference are still the same |
|
Hm. Not sure if it's bad or good. But let's keep it that way then for now. Pinging @dbu to let him know the situation. Do you think that this could cause problems in the future? |
|
Also i remove the BodyGenerator believing it was part of the Body classes, but now i'm not sure, what was the purpose of that interface ? |
|
I intended to use the BodyGenerator name instead of Body as the idea was to use them to generate string body and headers which then can be injected into one of the HTTP methods instead of the Body object itself. Then we invalidated the idea, so Generator can go as well. |
spec/BatchRequestSpec.php
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slash is not required in case of strings: they are imported fromthe root namespace anyway.
|
About BatchResultSpec: the initialized object should be checked if it is a BatchResult OBJECT, and a new test should be added to test if the current subject implements our BatchResult INTERFACE. |
- Remove Body implementation according to #3 - Remove options from sendRequest - Readapt BatchResult with changes from BatchResult / BatchException
Is the good behavior now ? (not used to phpsec :/) |
|
Perfect. Is it ready for merging? |
|
Think so, do we wait for dbu input about cloning SplObjectStorage ? |
|
Nope, that's just a note to him, also this is how I originally solved it, so even if it is wrong, we can stick to it in the update context. Further thinking about this: technically BatchResult is immutable. The object itself, the storage objects and the request objects are immutable. Exceptions are mostly read-only. |
Update to last change of httplug
|
Thank you @joelwurtz |
I update the library (tests are ok if the 2 pr are merged, since actually the httplug dependency in this package still has the options parameters in sendRequest) :