1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00
Commit Graph

58 Commits

Author SHA1 Message Date
Matthew Brown
9ef1ce1535 Make @template-extends more robust 2019-01-12 18:18:23 -05:00
Brown
eb7fc96ac1 Make param type checks use template_extends too 2019-01-11 11:18:51 -05:00
Brown
4ec8d1a8dd Fix #1198 - add support for template param extends checks 2019-01-11 10:55:44 -05:00
Matthew Brown
d891c068b4 Fix #1197 - add support for method templating without override 2019-01-11 09:35:32 -05:00
Brown
9947bc56f6 Fix Psalm errors and improve error output 2019-01-10 19:18:02 -05:00
Brown
0d28d5d82b Add check for @template-extends return types 2019-01-10 19:01:30 -05:00
Brown
ddc2637fc5 Add support for @template-extends Foo<SomeClass> 2019-01-10 17:58:32 -05:00
Brown
f108badd03 Fix #1067 - add support for @template-extends 2019-01-10 16:59:44 -05:00
Brown
b8d822cd26 Prohibit leaking of template params across class boundaries 2019-01-10 12:13:49 -05:00
Brown
1e20cbfa79 Prevent template params leaking when extended 2019-01-10 10:27:40 -05:00
Brown
2201380c52 Fix type transformation issues in templated class strings 2019-01-08 17:34:58 -05:00
Brown
43bbd739a2 Fix generic param fetches 2019-01-08 16:55:53 -05:00
Matthew Brown
b19dd25881 Fix #742 - infer template type from closure 2019-01-06 12:16:09 -05:00
Matthew Brown
6f1d56a80f Upcast iterables to traversables when used in a templated class string 2019-01-05 10:32:39 -05:00
Matthew Brown
9d8c2792e2 Add array-key type and improve general type handling
Fixes #1144
2019-01-05 00:15:53 -05:00
Matthew Brown
34cbe70e6f Fix templated @return T::class output 2019-01-02 06:46:10 -05:00
Matthew Brown
ca6149ed17 Improve treatment of templated params within function analysis 2018-12-17 23:29:27 -05:00
Brown
2b7cd6b303 Add more tests for T as Bar 2018-12-17 15:49:59 -05:00
Matthew Brown
8b5e8402a1 Add support for @param T:class $foo 2018-12-13 00:09:01 -05:00
Matthew Brown
c6f451a8b7 Fix #1119 - prevent interesections on generic params from breaking stuff 2018-12-08 15:17:43 -05:00
Matthew Brown
f0969cb3bb Fix getId calls on callable return types
Ref #1119
2018-12-08 14:10:06 -05:00
Matthew Brown
8d488345ce Fix #1036 - at least the part I care about 2018-11-21 18:38:09 -05:00
Matthew Brown
ef7298c62c Improve treatment of getIterator calls
Fixes #991
2018-11-21 17:56:04 -05:00
Matthew Brown
6ef79a0432 Improve handling of byref vars passed into functions
Fixes #1066
2018-11-21 12:38:51 -05:00
Brown
dc834fdb01 Default allowStringToStandInForClass to true and fix errors found 2018-11-12 12:03:55 -05:00
Matthew Brown
4688b25fd9 Move internal classes to own namespace 2018-11-12 11:20:59 -05:00
Matt Brown
dce8d14e1b Fix syntax errors in tests 2018-09-17 12:15:45 -04:00
Matthew Brown
fee705f90c Fix #489 - support @psalm-template 2018-07-13 19:09:35 -04:00
Matt Brown
740279352e Fix #830 - unpack template param args appropriately 2018-06-20 10:40:50 -04:00
Matt Brown
11240eb193 Fix #826 allow better template replacements 2018-06-19 13:19:41 -04:00
Matthew Brown
dc02ca8a7a Fix - #816 - check we’re not just replacing a key with itself 2018-06-13 08:38:07 -04:00
Matthew Brown
6d4d0cf825 Fix #794 - use template types to restrict input 2018-06-09 10:14:18 -04:00
Matthew Brown
81ae1ca222 Fix #747 - allow Generator to replace Traversable in templated params 2018-05-28 22:26:43 +01:00
Matt Brown
c6aa396dea Fix #741 - make sure closures are cloned properly 2018-05-18 17:47:40 -04:00
Matt Brown
e9411eec76 Fix #730 - improve handling of templated closure params 2018-05-11 16:17:21 -04:00
Matthew Brown
3380de16a2 Fix #709 - detect intersection template matches a bit better 2018-05-08 23:17:11 -04:00
Matt Brown
8d7c365e5f Fix #679 - improve template param type checks 2018-04-20 10:52:23 -04:00
Matt Brown
fac5554e13 Fix errors around static class constants in template vars 2018-03-06 13:59:59 -05:00
Matt Brown
aff689deea Add support for __CLASS__ in template types 2018-03-05 17:36:08 -05:00
Matt Brown
7f4be858c2 Fix #498 - add better issue type for docblock contradiction 2018-02-07 15:20:47 -05:00
Matt Brown
1df4c3d196 Add DocblockTypeContradiction to find possible issues with docblock types
Fixes #491
2018-02-06 18:44:53 -05:00
Matt Brown
4099bf24ce Make sure new $class args are always evaluated 2018-01-29 12:22:50 -05:00
Matt Brown
2120d258a4 Fix formatting of return type adder 2018-01-11 15:50:58 -05:00
Matthew Brown
c9173c7da3 Add more specific issues for falsable/nullable invalid return types 2018-01-04 21:36:16 -05:00
Matt Brown
eca7351472 Add return-level issues as well as function-level ones
Fixes #379
2017-12-07 15:50:25 -05:00
Matthew Brown
181d1bb129 Don’t complain about redundant conditions for possibly undefined vars 2017-12-03 15:00:59 -05:00
Matthew Brown
cb4691fb44 Always set templated types as being from docblocks 2017-12-03 13:22:06 -05:00
Matthew Brown
cff7f35d00 Change __toString type conversions to more precise getId checks 2017-12-03 12:44:08 -05:00
Matthew Brown
957600623c Fix issue with byref template params leaking 2017-11-20 00:12:17 -05:00
Matthew Brown
e29dd140e3 Refactor scanning and analysis, introducing multithreading (#191)
* Add failing test

* Add visitor to soup up classlike references

* Move a whole bunch of code into the visitor

* Move some methods back, move onto analysis stage

* Use the getAliases method everywhere

* Fix refs

* Fix more refs

* Fix some tests

* Fix more tests

* Fix include tests

* Shift config class finding to project checker and fix bugs

* Fix a few more tests

* transition test to new syntax

* Remove var_dump

* Delete a bunch of code and fix mutation test

* Remove unnecessary visitation

* Transition to better mocked out file provider, breaking some cached statement loading

* Use different scheme for naming anonymous classes

* Fix anonymous class issues

* Refactor file/statement loading

* Add specific property types

* Fix mapped property assignment

* Improve how we deal with traits

* Fix trait checking

* Pass Psalm checks

* Add multi-process support

* Delay console output until the end

* Remove PHP 7 syntax

* Update file storage with classes

* Fix scanning individual files and add reflection return types

* Always turn XDebug off

* Add quicker method of getting method mutations

* Queue return types for crawling

* Interpret all strings as possible classes once we see a `get_class` call

* Check invalid return types again

* Fix template namespacing issues

* Default to class-insensitive file names for includes

* Don’t overwrite existing issues data

* Add var docblocks for scanning

* Add null check

* Fix loading of external classes in templates

* Only try to populate class when we haven’t yet seen it’s not a class

* Fix trait property accessibility

* Only ever improve docblock param type

* Make param replacement more robust

* Fix static const missing inferred type

* Fix a few more tests

* Register constant definitions

* Fix trait aliasing

* Skip constant type tests for now

* Fix linting issues

* Make sure caching is off for tests

* Remove unnecessary return

* Use emulative parser if on PHP 5.6

* Cache parser for faster first-time parse

* Fix constant resolution when scanning classes

* Remove test that’s beyond a practical scope

* Add back --diff support

* Add --help for --threads

* Remove unused vars
2017-07-25 16:11:02 -04:00