New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sculpin bundles cannot depend on Guzzle #109
Conversation
|
Hi! Thanks for contacting me! I noticed you posted this WIP a few days ago on Twitter but I wasn't able to reach out before then.
I don't think you can do what Sculpin does using the built in webserver. I could be wrong, and maybe I could explore that more. But really the best way to be able to offer an embedded webserver that is useful and allows you to do other things for a long running process is to use something like react.
Our best bet would be to try to find a happy medium for versions of Guzzle that are shipped with Sculpin and the version of Guzzle you are using now. I can see how this will potentially be a larger issue down the line, though. Eventually version differences are going to hurt quite a bit. However, if Sculpin itself looses its requirements on Guzzle, you should at least be able to create your own |
|
Thanks Beau. I think I may not have been clear enough. I cannot add a dependency on guzzle/guzzle of any version while using sculpin.phar. This appears to be because react/http depends only on sub-components of guzzle. This means that the subcomponents are added to the PHAR and then they cannot be replaced later by the embedded composer. I'm going to try adding a dependency to the whole guzzle/guzzle:~3.0 project in sculpin's composer.json. While it would be nice to have guzzle 3.7, I may be able to get by without it! |
|
If that is the case that is very unfortunate. I'll have to talk to @naderman to see if this is known/expected and whether or not we can work around this somehow. In the mean time, yes, you can try to include all of guzzle/guzzle if you want to. If guzzle/guzzle 3.7 is still PHP 5.3 compatible, you can try that as well. If it works, we can just start shipping guzzle/guzzle 3.7 with the sculpin.phar. |
|
Beau: The pull request adds a dependency on guzzle/guzzle, which allows me to build a sculpin.phar that can work on a sculpin project with I checked that guzzle 3.7 is still compatible with php 5.3, but since that is an upstream dependency on a library I don't understand, I will leave that for another day! |
Sculpin bundles cannot depend on Guzzle
|
I merged this awhile ago but I hadn't built it into sculpin.phar. It should be deployed now. I apologize for the delay! |
I'm starting to get into Sculpin, and I created a bundle to support oEmbed in posts and templates.
https://packagist.org/packages/bangpound/sculpin-oembed-bundle
I want to use Guzzle in my oEmbed library because it has a lot of features that will make my work simpler, in particular caching, service descriptions and events. However, I cannot simply add Guzzle as a dependency. If I use guzzle/guzzle:~3.7, there are conflicts because react/http depends on a lesser version of Guzzle. If I use guzzle/guzzle:~3.0 (to match react/http), there are conflicts because react/http depends only on sub-components of Guzzle.
I think the fact that sculpin's dependencies are packaged in a phar means that the embedded composer cannot switch out the guzzle subcomponents for the full library.
The only work around is to set up a composer.json file in my project and add sculpin as a dependency. Even then, I can only use guzzle 3.0.
So this presents a messy problem, I think. I suspect react/http is used to provide the built in Sculpin web server. (But I haven't verified this.) Personally, I could get by without react/http because I'm using PHP 5.4.... I'm probably digressing now!
Do you have any advice for this dependency version conflict?