Comments (10)
It's such a simple library that I didn't want to require a heavy dependency like Guzzle. Also, there's a fair bit of fragmentation in guzzle usage. People use guzzle 5 or 6 (or even 4 sometimes), so to use guzzle and not lock people out, I'd need to write separate implementations of ServiceInterface for each incompatible version of Guzzle.
I think guzzle implementations of the ServiceInterface would be a good idea, but unless there is actual demand for it I think simple curl covers what is needed.
from ziptastic-php.
The only reason I mention it is that I can see a LOT of people using this for projects that already have a library. The packages and frameworks I use on a daily basis already require Guzzle and for me it would be unneeded to have a custom cURL client. I'll try and put something together for a Guzzle version of this :)
from ziptastic-php.
It isn't a custom curl client. Guzzle is a custom curl client. This just uses curl directly instead of through a library.
from ziptastic-php.
That isn't to say you can't write a guzzle client. Feel free. Just make sure you keep full test coverage.
from ziptastic-php.
Yeah, so I think if we did a guzzle version it should be in it's own repo. Not having dependencies is a pretty strong feature in itself.
@austinkregel let me know if you want to and I can make another repo.
from ziptastic-php.
Nah, I don't think you'd need a separate repo:
| - src/Service/CurlService.php
| - src/Service/Guzzle4Service.php
| - src/Service/Guzzle5Service.php
| - src/Service/Guzzle6Service.php
Then people could use the Lookup class with whichever service corresponds to the version of guzzle they're already using.
from ziptastic-php.
You need different classes because the implementation between major versions breaks BC.
from ziptastic-php.
Oh nice! The power of abstraction!
So I know @jdpedrie and I have been talking on gchat about how to handle the guzzle dependency, so I think there's some issues there.
Also, would having a separate ziptastic-php-guzzle being available through composer actually help people get what they're looking for? i.e. stripped down ziptastic-php for their non guzzled projects and ziptastic-php-guzzle for people already using guzzle?
from ziptastic-php.
I don't think that is necessary. And it doesn't solve the incompatible API versions problem either. I think you'd see better results from what I suggested above.
All that said... I don't think people would need to bother unless they've got a really weird situation. The CurlService that's already provided is zero-configuration and no added overhead. The only added benefit of using guzzle (even if you're already using guzzle for everything else) is if you want to inject something into the request or response.
from ziptastic-php.
Ok cool, yeah I defer to your judgement.
Should we make this a feature or make a new issue that's a feature?
I don't have any kind of process defined for this yet haha.
from ziptastic-php.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ziptastic-php.