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

chore(docs): bigtable typehint for exactMatch #5742

Merged
merged 1 commit into from
Jan 3, 2023
Merged

Conversation

bshaffer
Copy link
Contributor

BigTable typehints for exactMatch functions are passed to RegexTrait::escapeLiteralValue, which accepts array|string. This is seen in our samples as well (the result of unpack is an array).

This was caught by static analysis. I believe these methods should be widened to also accept arrays.

@bshaffer bshaffer requested review from a team as code owners December 28, 2022 18:48
@bshaffer
Copy link
Contributor Author

Looking at RegexTrait::escapeLiteralValue, if the samples pass in scalar '1' instead of unpack('C*', 1), the result is the same. Is this the preferred method? If so, we should just fix the samples.

Copy link
Contributor

@vishwarajanand vishwarajanand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this approach is better than editing the samples AND the escapeLiteralValue docblock.

@dwsupplee
Copy link
Contributor

Thank you!

@dwsupplee dwsupplee merged commit 3985c86 into main Jan 3, 2023
@dwsupplee dwsupplee deleted the fix-bigtable-typehint branch January 3, 2023 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants