Skip to content
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

Not wrapping around SSL sockets? #109

Closed
morrislaptop opened this issue Feb 24, 2015 · 5 comments
Closed

Not wrapping around SSL sockets? #109

morrislaptop opened this issue Feb 24, 2015 · 5 comments
Labels
Feature New feature or request

Comments

@morrislaptop
Copy link
Contributor

Using the mindscape/raygun4php library, I'm trying to test the calls this library is making.

However it looks like it is making a call like:

$fp = stream_socket_client('ssl://api.raygun.io:443', $err, $errstr, 10, STREAM_CLIENT_CONNECT, $context);

And VCR isn't picking it up. I tried stream_wrapper_register('ssl', __CLASS__, STREAM_IS_URL); but got a load of errors and thought you might know better ;)

@adri
Copy link
Contributor

adri commented Feb 24, 2015

Hey,

it seems like raygun4php is either calling

  1. curl on the command line for which there is basically no chance to intercept it or
  2. building a HTTP request themselves and send it via a socket.

I wonder what the reasons were to implement it like this @fundead. At the moment PHP-VCR can't intercept socket functions like fsockopen or stream_socket_client. What is sent over the socket doesn't necessarily need to be a HTTP request. I guess it can be done by intercepting stream_socket_client and returning a "fake" resource which can be written to.
At the moment I'm too busy to implement this myself but I'm happy about pull requests implementing it ;-)

@morrislaptop
Copy link
Contributor Author

If debug mode is off it doesn't wait for the response (async-ish) so that error reporting is faster.

Hah I'll give it a crack and see how I go, no promises!

@adri
Copy link
Contributor

adri commented Apr 15, 2015

@morrislaptop Did you manage to have some progress in this by any chance?

@morrislaptop
Copy link
Contributor Author

@JeroenVanOort
Copy link
Member

I'm closing this, since it no longer seems to be a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants