Brown
c0b0036109
Fix #3934 - prevent unsafe use of new static
2020-08-05 19:39:27 -04:00
Brown
6919e88423
Add performance logging under a --debug-performance flag
2020-07-30 15:30:19 -04:00
Matthew Brown
ab714a40c4
Allow binding of static to current final class
...
Ref #3892
2020-07-25 17:26:07 -04:00
Brown
344a732829
Warn about simple assignments
2020-07-23 02:40:35 -04:00
Brown
3848fa6872
Fix #3870 - mark properties as reference-free only for externally-immutable classes
2020-07-23 01:48:06 -04:00
Brown
76bd5b6278
Refactor type comparison
2020-07-21 19:40:35 -04:00
Joe Hoyle
0b6d682964
Fix going to definition on return type ( #3806 )
...
* Fix going to definition on return type
If a return type of a method or function is set incorrectly (with the PHP doc), then the references are not added for the `function() : MyClass` symbol, so the "Go to definition" feature of the LSP won't work. I don't believe an invalid return type or not should stop the symbol location being tracked (and not allowing code navigation).
In moved the symbol location tracking to be before the return early short circuit.
* Update SymbolLookupTest.php
Co-authored-by: Matthew Brown <github@muglug.com>
2020-07-11 17:14:39 -04:00
Joe Hoyle
11af82a97f
Fix jumping to definition on nullable parameters ( #3804 )
...
Currently it's not possible to "Go to definition" (LSP) on nullable args like `function( ?MyClass )` as the reference is stored a `MyClass|null` in the reference map, which will now resolve to a class name.
This PR removed any nullable type from the union before adding it to the reference map (as the reference map is only use to indicate a symbol was used in a given location, I think this makes sense).
2020-07-11 17:12:03 -04:00
Brown
95bf7f835b
Improve handling of array_map, faking out calls where nececssary
2020-06-25 13:05:34 -04:00
Brown
9aa0aca949
Fix handling of coerced callmap args
2020-06-24 11:51:31 -04:00
Brown
c29b3744ec
Change storage of out types
2020-06-24 11:51:31 -04:00
Brown
96d05ab06b
Fix #3654 - use correct function id for namespaced functions
2020-06-23 16:53:11 -04:00
Brown
b1c836e5f3
Improve specialisation after call
2020-06-19 01:59:45 -04:00
Brown
8f2e28c36b
Improve tainting of specializable classes
2020-06-19 01:22:51 -04:00
Matthew Brown
081a284759
Fix #3567 - remember which variables a callable sets byref in use
2020-06-14 11:58:50 -04:00
Matthew Brown
187b944680
Add faster taint analysis
2020-05-22 12:33:29 -04:00
Brown
a4141a7581
Fix #3327 - convert void to null when comparing conditional type with nullable
2020-05-19 19:48:11 -04:00
Brown
111303d913
Add non-empty-lowercase-string type
2020-05-15 10:18:05 -04:00
Brown
8f2f2617d4
Improve refactor
2020-05-10 22:45:01 -04:00
Brown
5f4d162dd5
Break out type expander into separate class
2020-05-10 22:39:18 -04:00
Brown
20bcfb096a
Fix #3305 - use the same issue type for short closures as closures
2020-05-06 09:57:02 -04:00
Brown
21f4deed3b
Fix #3268 - infer generator return for closure
2020-04-29 16:52:37 -04:00
orklah
8571746f8a
Add hook for plugins after FunctionLikeAnalysis ( #3258 )
2020-04-28 15:30:51 -04:00
Brown
8f57d0c738
Fix #3204 - normalise function ids where possible
2020-04-20 21:38:35 -04:00
Brown
35d376cbe7
Fix #3164 - allow nested templates in conditional classes
2020-04-17 00:46:27 -04:00
Brown
da729cfbc6
Don’t check params when mutations are being collected
2020-03-31 15:49:43 -04:00
Matthew Brown
194f02507d
Allow conditional types to reference class constants
2020-03-29 13:37:37 -04:00
Matthew Brown
5395183837
Use more accurate means of determining whether function did return
2020-03-28 23:37:42 -04:00
Matthew Brown
93735712f0
Fix #3032 - always replay docblock issues when analysing files
2020-03-28 19:54:55 -04:00
Matthew Brown
47c1470e3b
Refactor reference checks to use more appropriate properties
2020-03-28 16:30:56 -04:00
Brown
971ae50bea
Do prep work for #3024 - improve handling of absent class references
2020-03-26 12:35:27 -04:00
Brown
1bfc61d402
Allow final classes to bypass static checks
2020-03-24 18:14:10 -04:00
Brown
ec34a16291
Warn about invalid static returns
2020-03-24 18:00:20 -04:00
Matthew Brown
0aca01faea
Improve fix to #2805
2020-03-14 01:09:12 -04:00
Matthew Brown
96fbcd5a64
Break out more methods
2020-03-11 23:38:49 -04:00
Matthew Brown
bfb919d26a
Break out methods into their own classes
2020-03-11 23:04:52 -04:00
Matthew Brown
3cc4c2b37e
Fix #2721 - only warn about deprecated classes exactly where they are used
2020-02-22 01:12:19 -05:00
Brown
f4485cc529
Fix #2847 - use fully-qualified function name
2020-02-21 16:44:31 -05:00
Matthew Brown
653353709a
Use MethodIdentifier object instead of string
2020-02-14 20:54:26 -05:00
Brown
210d65d0d6
Add a few lowercase-string types
2020-02-13 17:52:23 -05:00
Brown
f141f7c526
Improve --diff checks by including trait-using classes in dependents
2020-02-11 16:39:33 -05:00
Brown
d8f5ad190b
Improve invalidation of inherited properties
2020-02-10 17:03:51 -05:00
Matthew Brown
da541dbb51
Remove some unnecessary errors
2020-02-06 23:10:18 -05:00
Brown
8fb810350a
Don’t cache no-effects hashes when checking for initialisations
2020-02-04 17:53:26 -05:00
Brown
8f95c5679e
Fix #2720 - allow throwing self
2020-01-30 18:00:31 -05:00
Brown
da43b8188f
Fix #2632 - detect invalid by-ref assignments in pure functions
2020-01-23 14:21:34 -05:00
Brown
eb7c3dcc11
Fix #2611 - fix combination of inferred closure return types
2020-01-13 10:23:58 -05:00
Matthew Brown
9fa2db1b6c
Move Union::getTypes to Union::getAtomicTypes
2020-01-04 12:20:26 -05:00
Matthew Brown
55c2f7faa2
Fix #2508 - don’t replace templated types with generic ones inside own function
2019-12-28 18:38:02 -05:00
Matthew Brown
11433dc9d0
Fix references
2019-12-18 14:43:15 +00:00