Releases: smuuf/vscode-latte-lang
Releases · smuuf/vscode-latte-lang
0.0.7
- (issue #1) 🆕 New: Rudimentary cache for info about classes parsed from PHP files.
- 🆕 New: Support for
{include file.latte},{layout file.latte},{extends file.latte}and{capture $var}tag. - 🆕 New: Support for type inferring in
{var}tag if the expression is a simple expression of scalar typesint,float,string,bool. (Support fornullis missing now, because it messes up specified nullable types - we can't process these properly yet.) - 🔨 We first extract PHP classes from files outside of any
/vendor/directory and then only those. This is to have info about non-third-party classes faster and first.
Full Changelog: 0.0.6...0.0.7
0.0.6
0.0.5
- We're now able to read and use
@returntags in docblocks of PHP methods. For example:... will now be processed as method<?php class X { /** * @return array<\DateTime> */ public function giveMeArrayOfDateTimes(): array { return ...; } }
giveMeArrayOfDateTimes()returningarray<\DateTime>instead of justarray. - Fixed processing of "partial imports". For example:
... was being resolved incorrectly as class
<?php use A\B\C; class X extends C\D\E {}
Xextending classC\D\Einstead ofA\B\C\D\E. This is now fixed. - (issue #4) Fixed case of overly aggressive type inferring, which would override explicitly specified type even if we weren't able to properly process the type of the expression assigned to the variable.
- E.g.
{var SomeExplicitlySpecifiedType $someVariable = someFunction()}, if we didn't know what typesomeFunction()returns (which we don't, because at the moment we're able to infer type only from method calls of objects of known type), would result in$someVariablebeing of typemixed. This is now fixed and if we're unsure of the inferred type, we use the explicitly specified typeSomeExplicitlySpecifiedTypeinstead.
- E.g.
- Improved solution to the rescan-loop previously fixed in
0.0.4.- This also fixed race-conditions that could occur during evaluation of php-expression-based type inferring.
0.0.4
0.0.3
- New: Ability to infer types in variable assignments.
- For example, if we have a Latte source:
...while class{var SomeClass $object}SomeClasshas a methodcallMe(): OtherClass, then for:... we will infer that the{var $result = $object->callMe()}$resultvariable is of typeOtherClass(that is - there's no need to specify type in the{var ...}tag, because we will infer it from the expression after it.) This works for ˙{var}˙ and{default}Latte tags.