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

Fix/ends with operator #143

Merged
merged 2 commits into from
Jan 25, 2023
Merged

Fix/ends with operator #143

merged 2 commits into from
Jan 25, 2023

Conversation

sighphyre
Copy link
Member

@sighphyre sighphyre commented Jan 25, 2023

This patches the strEndsWith operator to check that constraint property ends with the context property rather than the reverse. The reason the client specifications were passing is because of a bug in that project (patched here: Unleash/client-specification#47).

strStartsWith is not affected, the check is correct here: https://github.com/Unleash/unleash-client-php/blob/main/src/ConstraintValidator/Operator/String/StringStartsWithOperatorValidator.php

We might want to think about what version we release this under. Technically it's a bug fix but there's a risk of having an automated bot upgrade the SDK because it sees a patch version and flipping a bunch of toggles in the wild.

@sighphyre sighphyre marked this pull request as ready for review January 25, 2023 17:31
@ivarconr
Copy link
Member

Technically it's a bug fix but there's a risk of having an automated bot upgrade the SDK because it sees a patch version and flipping a bunch of toggles in the wild.

I hear you, at the same time this is a bug breaking expectations on how Unleash works. I would not be too worried as the intention is most likely it should be enabled in this case.

@RikudouSage RikudouSage merged commit f54cd36 into main Jan 25, 2023
@RikudouSage RikudouSage deleted the fix/endsWithOperator branch January 25, 2023 22:25
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