Searching for an object that doesn't exist as a token can be really expensive,
so it's better to error on unexpected input and fix code on the calling side.
ci/woodpecker/push/woodpecker Pipeline was successfulDetails
Among other things:
- use-keyword parser handler result being registered for two positions due to
wrong use of "root" parser parameter.
- phpinspect-fix-imports was broken
continuous-integration/drone/push Build was killedDetails
interpret-expression-type now interprets assignment values provided through
array access as derived statements. This makes type inference work for cases
like `[$foo[0]]`, where it did not before.
continuous-integration/drone/push Build is failingDetails
The new implementaiton makes the background thread more extensible in terms of
the types of tasks that it can execute. It also allows for the injection of a
worker as dependency of project instances, which will make automated testing
easier in the future.
Add tests for
- phpinspect-eldoc-function in the context of static attribute and object attribute references
- phpinspect-resolve-type-from-context in the context of static attribute references
Fix:
- phpinspect-get-derived-statement-type-in-block
Test type-resolver created from resolvecontext with:
- File containing single namespace and no block
- File containing one namespace with a block ('{}')
- File containing multiple namespaces with blocks
Patch `phpinspect--make-type-resolver-for-resolvecontext' to support namespaces with
blocks.
The resolvecontext will from now on be used as store for all data required to resolve the
return type of a statement at any given point.
`phpinspect--word-end-regex` has been altered to match words that are directly followed by
other, "non-word" characters.
`phpinspect-describe-handler` has been added to list and describe handlers during runtime.
A bug has been fixed that made the parser interpret the "static" keyword inside functions
as a class attribute in stead of just a word.
Aside from the company backend, `phpinspect-eldoc-function` has been simplified and
adapted to make use of the resolvecontext structure.
The resolving of statment/variable types has been altered to make use of imperative loops
in a couple of places for the sake of simplicity and optimization.
This commit contains one logic change: Changed add-to-list usage to cl-pushnew in
phpinspect-merge-indexes implementation for classes. The resulting function output should
be the same.