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.
- Changed project and after-save-action implementation to include imports in
opened files. This way any types that are used in a file will have completion
available for it ahead of time.
- Extra attributes have been added to phpinspect--class to check whether or not
its file has been indexed/is queued for indexation yet.
- Misc: Fixed eldoc function bug that was caused by a previous commit
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.
The parser is now JIT compiled. Parser functions are generated and byte-compiled on the
fly as needed and stored in an obarray. Handler functions are stored in an obarray as well
and are compiled at load time. See docstrings and code for more information.
Macro use has been brought back to a minimum and macros have been reworked to make the
code easier to reason about.
To be able to redifine parser functions during runtime,
"M-x phpinspect-purge-parser-cache" has been added.
To redifine a handler function, one can use `phpinspect-defhandler` after loading
phpinspect.el and purge the parser cache to make sure that the new function definition is
used.
Fix phpinspect-native-types to valid PHP built-in type names.
See the code below for the types that can be described as valid return types:
https://3v4l.org/fJgLA#v8.0.10