Bruce Weirdan
6abce3525a
Enforce use
sort ( #5900 )
2021-06-07 22:55:21 -04:00
Matt Brown
bd6efd7cf2
Improve completion for namespaced classes
...
cc @joehoyle - this mainly allows us to get a correct list when the user starts typing Foo (without the new before it) inside a namespace
2021-02-14 23:25:13 -05:00
Joe Hoyle
5759472168
Add constant fetch to reference map ( #5115 )
...
* Add constant fetch to reference map
To support showing constant types on hover of constant references, we need to add them to the ref map.
* Fix root constants
* PHPCBF
2021-01-28 11:18:28 -05:00
Matt Brown
14efde286f
4.x - refactor unused variable detection
...
This turns unused variable detection into an explicit control-flow problem, where before we had a more simplistic mark-and-sweep algorithm
2020-09-30 12:28:13 -04:00
orklah
ead107fa9e
More return types ( #4173 )
...
* add native return types
* redundant phpdoc
2020-09-12 11:24:05 -04:00
orklah
8c7423505a
add native param types ( #4137 )
...
* add native param types
* redundant phpdoc
* add more param types and adds "?" to nullable types
* remove redundant phpdoc
* add more param types and remove redundant phpdoc
* add more param types and remove redundant phpdoc
2020-09-06 19:36:47 -04:00
orklah
f66d57f19d
add native return types ( #4116 )
...
* add native return types
* remove redundant phpdoc
2020-09-04 16:26:33 -04:00
Brown
0b2da18f1e
Break up StatementsAnalyzer
2020-05-19 12:56:30 -04:00
Matthew Brown
bfb919d26a
Break out methods into their own classes
2020-03-11 23:04:52 -04:00
Matthew Brown
471d7610f0
Fix #2644 - improve type inference of autoloaded constants
2020-01-17 09:52:43 -05:00
Matthew Brown
83b10bb9af
Fix #2426 , or at least some of it
2019-12-08 00:49:34 -05:00
Matthew Brown
6a98108deb
Apply @ShiraNai7’s fix for null const values
2019-11-29 10:12:46 -05:00
Pavel Batečko
dc78e9c57b
Update password function types for PHP 7.4 ( #2396 )
...
* Support NULL predefined constants
* Fix #2395 - update password_hash() and password_needs_rehash() types for PHP 7.4
* Change $fq_const_name check so it still uses isset
2019-11-29 09:30:01 -05:00
Brown
0bcb7863f3
Use better system for storing inferred types and assertions
2019-11-25 11:44:54 -05:00
Matthew Brown
d941294a84
Move class const analysis
2019-09-14 13:12:54 -04:00
Matthew Brown
62dff200d5
Fix redundant condition
2019-08-17 18:02:38 -04:00
Matthew Brown
b6dc8f547e
Fix #2031 - still get class const return type after defined check
2019-08-17 18:01:24 -04:00
Brown
538abbc54c
Fix #2020 - allow static::CONST_NAME to have non-mixed type in final class
2019-08-15 10:41:30 -04:00
Matthew Brown
f5809ec24a
Only add node references to explicit locations
2019-07-01 11:12:12 -04:00
Brown
6b32565a9b
Allow references to deprecated class inside the class
2019-06-27 13:36:39 -04:00
LeSuisse
f29826b958
Fully qualify constants and function calls ( #1849 )
...
This should give a small performance boost.
Part of #1837 .
The change is enforced via phpcs and can be autofixed
with phpcbf.
2019-06-26 16:52:29 -04:00
Brown
5ed49c0c03
Fixed #1848 - allow static class strings to be compared
2019-06-26 15:11:16 -04:00
Brown
bdf54ae1fa
Fix #1814 - warn about deprected ::class access
2019-06-19 12:42:51 -04:00
Brown
10613192c9
Fix #1803 - complain about DeprecatedClass when using its constants
2019-06-18 16:21:04 -04:00
Matthew Brown
f46ccf0a5d
Strip text from end of @psalm-type
2019-06-16 12:39:07 -04:00
Matthew Brown
06e913e37b
Fix #1791 - complain about missing class constants
2019-06-15 12:19:26 -04:00
Matthew Brown
0287adfd44
Fix const replacements when moving classes
2019-06-06 07:05:30 -04:00
Brown
3e15fa8bfe
Fix bad namespacing
2019-06-05 11:15:52 -04:00
Brown
c7f35c263c
Fix #1737 properly
2019-06-04 14:08:49 -04:00
Brown
67c9851b95
Fix Psalm bug, and add test to capture it
2019-06-04 13:43:11 -04:00
Brown
778b95d335
Add support for moving class constants
2019-06-04 11:14:49 -04:00
Matthew Brown
2439a9f6a0
Allow instance method renaming, too
2019-06-02 12:02:39 -04:00
Matthew Brown
7e4de611bf
Migrate class references in static calls
2019-06-01 10:07:45 -04:00
Matthew Brown
a252fb84da
Fix namespaced method moving
2019-06-01 01:33:21 -04:00
Matthew Brown
cc89b9254d
Add initial ideas for moving static methods
...
Ref #1595
2019-06-01 00:56:54 -04:00
Brown
01dcf8f631
Fix erroneous update of existing variables
2019-05-23 18:04:12 -04:00
Brown
ff14f671b1
Add hopefully-more-portable method for evaluating method/property usage
2019-04-16 16:07:48 -04:00
Brown
26e2de93c7
Prepare to enable paralellised use of --find-dead-code
...
References #1548
2019-04-12 18:28:07 -04:00
Matthew Brown
ab832207a4
Fix #1453 - traits are not valid classes
2019-03-15 22:12:35 -04:00
Matthew Brown
b7320e2778
Remove unnnecessary param
2019-03-03 16:45:35 -05:00
Matthew Brown
fb9e9bea32
Fix const reference in current context
2019-03-03 16:43:24 -05:00
Matthew Brown
3ad1abece4
Add generation of json artifacts
2019-02-24 01:33:25 -05:00
Matthew Brown
681391f970
Fix #1220 - improve constant resolution
2019-01-20 09:52:26 -05:00
Matthew Brown
394d6509c6
Restrict class-string types to named objects (and intersections)
2019-01-19 22:46:06 -05:00
Matthew Brown
0cca0d76cb
Fix #813 - allow constant array to be refined with isset
2019-01-13 11:54:39 -05:00
Matthew Brown
8024b4e275
Add support for $a::class
2019-01-05 15:12:42 -05:00
Matthew Brown
87052537cf
Fix #1167 - don’t worry about AbstractInstantiation when it could be a descendant
2019-01-04 12:28:00 -05:00
Matthew Brown
a8851ff425
Improve handling of T::class when mixed is passed
2018-12-13 01:54:15 -05:00
Matthew Brown
b32000fa05
Fix #689 - add checks for @internal annotations
2018-12-01 18:37:49 -05:00
Matthew Brown
9709263b8d
Make many PropertyAnalyzer properties private
2018-11-12 11:20:59 -05:00