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

!lowercase-string does not mean the string is upper case, Assert::upper #190

Open
zerkms opened this issue Apr 25, 2020 · 1 comment
Open

Comments

@zerkms
Copy link
Contributor

zerkms commented Apr 25, 2020

Assert::upper is typed as !lowercase-string, while "not all lowercase" means not only "all upper case" but also "is mixed case".

'fOo' is !lowecase-string, yet it's not all upper case.

I reported a request for uppercase-string psalm type, but meanwhile we should remove the wrong typing.

References:

@zerkms
Copy link
Contributor Author

zerkms commented May 31, 2020

And in fact, while implementing tests for #126 I have found that at the moment @psalm-assert !lowercase-string $value annotation does not add anything: it's basically unusable given !lowercase-string is only a valid assertion type, but not a valid data type.

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

No branches or pull requests

1 participant