Replies: 1 comment 8 replies
-
Hi, it'd be best if you publish a repository with this code and some failing test, so I can look into it and tinker with it. Thanks. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to write a custom type resolver (specifically, uuid-string). I've written code that follows how larastan does it including the TypeNodeResolverExtension but checking if the string can be converted to a Uuid. I've added the
services
entry to thephpstan.neon
file.There are no errors anywhere, but phpstan doesn't actually seem to be performing my check. So I decided to try and write a test for the Type, but it seems pretty clear to me that I'm missing something. All of my code is trying its best to follow the Custom PHPDoc Types page and the Type Inference Testing page, but running phpunit for my type gives me that the string literal provided isn't a
uuid-string
.Am I doing something wrong here?
TypeNodeResolverExtension
UuidStringType
phpstan.neon
Unit test
assertTypes
Beta Was this translation helpful? Give feedback.
All reactions