Closed MartinMystikJonas closed 3 years ago
@dg Can you please chek this if it is valid approach from your point of view? It it seems ok to you I will add some more tests for edge cases and support for extracting types from {templateType}
@dg Should I consider that like as approval of this approach? If so can you please approve to run workflows? Thanks.
Hi, please give me some time, I'm busy this week.
Otherwise, it's best to do PR against the last released version, because I change and forcepush the master a lot.
@dg Understood. Take your time and look at it whenever you will have time to check it. Let me know if you have any questions or requests how to finish this PR.
I will rebase it onto last release.
New PR targeted onto v2.10 here #276
With this change Latte will propagate known types infomation from
{varType}
,{define}
and{parameters}
into compiled PHP code in form of/** @var type $var */
annotations. This will allow statical anylysis of resulting code by static analysers like PHPStan, Psalm, etc.See discussion about this feature here https://github.com/nette/latte/issues/262