Skip to content

Conversation

simPod
Copy link
Contributor

@simPod simPod commented Jan 17, 2022

I fail to reproduce it in test case but it's kind of hard to debug tests since they're loaded from phar and not very flexible then.

I'm getting:

Call to static method Webmozart\Assert\Assert::uuid() with non-empty-string will always evaluate to true.

Assert::stringNotEmpty($id); // I need both in order to have more precise assertion message
Assert::uuid($id);

with phpstan v1.4 and 1.0.7 extesnion

…() with non-empty-string and 'Id is not valid' will always evaluate to true.`
@herndlm
Copy link
Contributor

herndlm commented Jan 17, 2022

Are you using phpstan-strict-rules maybe? I managed to reproduce it in an integration kind of test in #86.

But as the error is coming from that rule it might be config only then. I didn't have time yet to debug it.

UPDATE: looks very much like just the checkAlwaysTrueCheckTypeFunctionCall constructor arg needs to be enabled. I guess then it can be re-produced with such a rule test!

@simPod
Copy link
Contributor Author

simPod commented Jan 17, 2022

Are you using phpstan-strict-rules maybe?

yes, I do.

I see a lot of changes in #86 related to non-empty string, will it covert this?

@herndlm
Copy link
Contributor

herndlm commented Jan 17, 2022

Unfortuntely not, see last comment there. I'm basically waiting on input from Ondrej now. See also #85 where I suggested to revert the changes that broke this for now.

@herndlm
Copy link
Contributor

herndlm commented Jan 17, 2022

-> #89 / 8b080dc

@ondrejmirtes
Copy link
Member

Reproduced in #89

@simPod simPod deleted the non-empty-string-uuid branch January 17, 2022 11:57
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