Jeroen Versteeg

Results 107 comments of Jeroen Versteeg

> I don't think we should restrict the types in a strict way. Can you elaborate? Do you mean Twig itself should remain completely agnostic and the community should come...

Adding support for nullable types is very important (to me, at least). There are two ways: 1. Union type support: `'string|null'` 2. Nullable short-hand: `'?string'` I favor the 2nd option...

Unfortunately, my proposal re: `interable` is in conflict with PHPStan (/ PHPDoc / PSR-5 / Psalm), which supports * [General arrays](https://phpstan.org/writing-php-code/phpdoc-types#general-arrays), which include `array` and `array` * [Iterables](https://phpstan.org/writing-php-code/phpdoc-types#iterables), which include...

@stof thanks for your detailed response. I'll reply tomorrow!

> Twig itself has already made the choice of being agnostic of the types being valid or invalid (Twig itself does not validate the content of the string at all),...

>> 2. I would really like to add the distinction between sequence/list and mapping (whether that's an array shape/tuple or iterable with unknown keys) > > Twig has 3 types...

Thanks for your feedback, @willrowe I agree with most of your points! > I use dictionary and list so often, I think there should be a separate type for each,...

@Haehnchen, I'd like to align [TwigQI's support for types](https://github.com/alisqi/TwigQI?tab=readme-ov-file#typing-system-and-syntax) with the plugin's since we use both at AlisQI. Do you have plans to add support for nullable types? Would you...

@Haehnchen I'd love to get your feedback on my previous comment.

> If I may suggest: instead of deciding the possible var type values, why not accept any valid PHPDoc type Thanks, that's a good suggestion. I was mindful of not...