[Spark] Port Contentful libs from Lunr\Network\Curl to Requests

Review Request #464 — Created Oct. 14, 2016 and submitted

pprkut
Lunr
ff80769...
lunr

Port Contentful libs from Lunr\Network\Curl to Requests.

Unit tests
Example requests

pprkut
pprkut
tardypad
  1. 
      
  2. src/Lunr/Spark/Contentful/DeliveryApi.php (Diff revision 3)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    Not really related to this particular review

    This will probably need to be done in a separate one as it will change the behavior.

    It would be better to return FALSE in case of a failure, just like this is usually done for other processing errors.

    Otherwise, there is no way for the calling entity to distinguish between the occurence of an error and the absence of entries.

    1. Hmmm.

      The idea behind returning the same value was that the consumer doesn't necessarily need to care about all the different reasons why it failed. We don't need error specific handling in two or more places, when one is enough.
      Changing this to FALSE would mean major breakage in every user, since none of them expect to deal with anything but proper arrays.

      I agree that for consistencies sake we maybe should change something. But not sure what...

  3. 
      
pprkut
Review request changed

Status: Closed (submitted)

Change Summary:

Merged into master

Loading...