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

Normalize Context Values #3

Merged
merged 1 commit into from
Feb 22, 2021
Merged

Conversation

XedinUnknown
Copy link
Member

Since the new interface permits scalar|Stringable as context value, the following changes have been made to the implementation:

  • Scalars other than bool will be cast to string.
  • Booleans will be first cast to int, resulting in consistent 1 and 0.
  • Stringable objects will be cast to string.
  • All other values result in a RangeException.

Also using PHP 8 polyfill for `Stringable`
@XedinUnknown XedinUnknown added the enhancement New feature or request label Feb 22, 2021
@XedinUnknown XedinUnknown added this to the 0.2 milestone Feb 22, 2021
@XedinUnknown XedinUnknown self-assigned this Feb 22, 2021
@XedinUnknown XedinUnknown merged commit 7c361e2 into develop Feb 22, 2021
@XedinUnknown XedinUnknown deleted the fix/convert-context-values branch February 22, 2021 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant