You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeResolver::resolve returns BuiltinType(string) and BuiltinType(int), without extra information. It would be really nice if we could read more of them, at least these 2 as they are most useful.
If you are interested in the use-case, I can provide an example. But in short: it is about static analysis and forms when we must use empty_data closure. When it fails, then #[Assert] attributes will not be read and user will never get any validation errors.
I already made an extension that solves this problem for builtin types (by using reflection and constraints normalizer), but these advanced one are tricky. I could have used phpstan/phpdoc-parser, but TypeInfo component already supports it so it would be nice to re-use it.
Example
No response
The text was updated successfully, but these errors were encountered:
Description
For a method like this:
TypeResolver::resolve
returns BuiltinType(string) and BuiltinType(int), without extra information. It would be really nice if we could read more of them, at least these 2 as they are most useful.If you are interested in the use-case, I can provide an example. But in short: it is about static analysis and forms when we must use empty_data closure. When it fails, then
#[Assert]
attributes will not be read and user will never get any validation errors.I already made an extension that solves this problem for builtin types (by using reflection and constraints normalizer), but these advanced one are tricky. I could have used phpstan/phpdoc-parser, but TypeInfo component already supports it so it would be nice to re-use it.
Example
No response
The text was updated successfully, but these errors were encountered: