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
Fix PHP base64 encoding #17723
Fix PHP base64 encoding #17723
Conversation
Since the testing directions here don't quite explain the issue let me provide an example:
|
And here is confirmation that adding quotes solves this error:
And with double quotes
|
What would be the best way to add continuous integration for various php versions to prevent this from happening again? |
@adfoster-r7 Might be the best person to ask r.e this. From our earlier discussion here are a few of the points we talked about. In particular he mentioned that #16357 might be the closest thing we have to running real PHP environments, however that PR isn't ready to land just yet. He also doesn't believe there are any existing patterns for testing encoders but likely to create one it would be a mixture of normal unit tests as well as module tests. |
Release NotesA bug has been fixed in the |
We don't have any existing encoder tests, but if we did we'd most likely add it here: Similar to our other module tests which instantiate the module and call the module's public API:
I'm not sure what mocking/glue code would be required to unit test the encoding logic in isolation though - but if you think it would be worthwhile investigating, contributions are welcome - or feel free to ping me if you want any additional guidance on that 👍 |
Verification
List the steps needed to make sure this thing works
modules/encoders/php/base64.rb
PHP Fatal error: Uncaught Error: Undefined constant
error