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
When currently wanting to output a type with links to types, the following snippet is used:
{{ type|route('class:short') }}
instead of the __toString() method of the type's class.
When now using a type like string[], the type's class __toString() method returns it as intended: string[] but when used via the route() approach above, the following is generated: array<string|int, string>.
For "simple" arrays, like string[] or even SomeType[] the longer version could be a bit to much.
Maybe only arrays that have another keytype than the default keytype / not null should use the longer version? Bc when you try to dump() the type it prints this:
At this moment I have triaged this request as low priority because the generated documentation is correct and I want to focus on fixing bugs and missing features at the moment.
I can imagine that it would make it simpler to display an array as type[] when the key is string|int or array-key if that would ever be returned -no plans for it now, but you never know-.
This improvement either needs to be contributed or it will probably be a long time before it comes. Just being realistic 😅
Feature request
When currently wanting to output a type with links to types, the following snippet is used:
instead of the
__toString()
method of the type's class.When now using a type like
string[]
, the type's class__toString()
method returns it as intended:string[]
but when used via theroute()
approach above, the following is generated:array<string|int, string>
.For "simple" arrays, like
string[]
or evenSomeType[]
the longer version could be a bit to much.Maybe only arrays that have another keytype than the default keytype / not null should use the longer version? Bc when you try to
dump()
the type it prints this:The text was updated successfully, but these errors were encountered: