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

Bizarre clash between Patchwork and PasswordLib #6

Spudley opened this issue Mar 13, 2013 · 1 comment

Bizarre clash between Patchwork and PasswordLib #6

Spudley opened this issue Mar 13, 2013 · 1 comment


Copy link

Spudley commented Mar 13, 2013

Okay, this is weird.

I have Patchwork and PasswordLib ( installed together, in a unit testing script, under phpUnit.

Patchwork is being used for tests, and PasswordLib is part of the system under test.

Test scripts that call funtions that reference PasswordLib::verifyPasswordHash are failing with the following exception:
Patchwork\Preprocessor\Stream::stream_set_option is not implemented

Note: this happens on our Jenkins server (Debian Squeeze, php 5.3.3-7+squeeze15). It does NOT happen when I run the same test scripts on my Windows PC. (php 5.3.8).

It is particularly odd as the test in question doesn't actually make any calls to Patchwork. Merely having patchwork included is sufficient to trigger the error.

The trace message is helpful -- it leads me to a line in PasswordLib where it calls the PHP built-in function stream_set_read_buffer(). This line seems to be triggering a call to Patchwork stream_set_option(), and thus causing the exception.

I have worked around the problem by commenting out the call to stream_set_read_buffer() in PasswordLib; it isn't critical to the operation of the library, and all seems to be working okay so I'm not desperate for an immediate fix, but it would be good to get an understanding of what's going on.

I hope that I've given sufficent information here to help you track down the problem.

@ghost ghost assigned antecedent Mar 13, 2013
Copy link

Bah, seems like my lazy coding has eventually turned against me. I had left a method in the Patchwork's stream wrapper (stream_set_option) without an actual working implementation (just some code to throw an exception), hoping it would never be used. I've now implemented it in version 1.2.4. If this has by any means caused you to waste an unreasonable amount of time hunting it down, then I have to profoundly apologize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

2 participants