Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Márk Sági-Kazár
    @sagikazarmark
    I think options should be used only for configurations which cannot be passed otherwised (eg. coded in header, like cookies)
    An event dispatcher solution is better IMO because you can use the same strategy for ALL adapters
    the event dispatcher adapter is a regular adapter which wraps another and emits events during it's lifecycle
    I am not completely happy with that solution though
    so I am thinking about implementing a plugin adapter
    which could utilize a similar middleware architecture to what I did it in port
    my main problem with an event-driven solution is that PSR-7 messages are immutable, thus in every listener I would have to set the request/response in the event if I modify it
    in a middleware architecture it is not a problem
    the other ugly solution would be using decorators
    which is similar
    but that would be ugly as well
    new AuthAdapter(new CookieAdapter(new WhateverAdapter(new Guzzle6Adapter))))
    Márk Sági-Kazár
    @sagikazarmark
    instead
    (new PluginAdapter(new Guzzle6Adapter))
    ->add(function($request) { //do something return $response; })
    or we can also introduce an interface for it
    @ddeboer I think your fear is that it does not work with an adapter out of the box, you need some sort of extra dependencies. Am I right?
    But I think we should keep adapter logic as minimal as possible
    Eric GELOEN
    @egeloen
    Hey folks! I'm currently bootstraping the php-http/zend2-adapter package and I have some questions:
    I see the guzzle6 adapter relies on PHPUnit tests whereas I remember seing some PHPSpec tests. So, which one should I take?
    Márk Sági-Kazár
    @sagikazarmark
    Hey @egeloen
    Not sure if you noticed, but we moved to Slack
    slack.httplug.io
    As for the tests
    integration tests are written using phpunit
    Eric GELOEN
    @egeloen
    hey! will move as well so. For my question, I have figure it out, don't worry!
    Jochen Manz
    @jochenmanz
    Hi, currently looking into httplug and i wonder, is there a rate limiter plugin out there? The Api i have to access returns rate limit infos in the response header of each request