Will Rowe

Results 177 comments of Will Rowe

I have been documenting variable types at the top of Twig files for years using a simple comment. In that time I have refined the types I use into the...

> [TwigQI](https://github.com/alisqi/TwigQI?tab=readme-ov-file#typing-system-and-syntax) supports nullable types using a ? prefix. This supports this use case, which I agree is very common, without having to get into limited union support. - I...

I'm not sure if this would be the best place to implement this, but a lot of times I have a flag in a template to allow certain markup to...

I agree with @ruudk on the order. It would also match how class properties and argument types are defined in PHP. Also, going along with that and clarifying what I...

> I personally actually disagree on principle: declaring the type and any value should not be mixed. @drjayvee can you explain more?

@drjayvee those are all great points and illustrate how you see this feature being utilized. Where we differ is that I think about this as more of a dockblock/argument list...

> I still maintain that setting default values would be supported just fine with a combination of set and var (to declare type). - As I said, I already use...

@ericmorand what do you currently do for [`constant`](https://twig.symfony.com/doc/3.x/functions/constant.html)?

@ericmorand do you have a specific question about how it should function when a template is rendered? You keep asking about the specification and how it should be implemented outside...