Bruce Weirdan
d13f0b6a7c
Added test to enforce that all supported annotations are documented ( #4723 )
...
* Added test to enforce that all supported annotations are documented
Well, at least mentioned.
Refs vimeo/psalm#3816
* Type things
* Make things pretty
* Only check @psalm- annotations, group
* Add documentation for `@psalm-require-extends` and `@psalm-require-implements`
* Dropped logicalOr that has become redundant
* Add explicit tag
* Document @psalm-template
* Add @psalm-template-covariant
* Document `@psalm-method`
* Add list of undocumented docblock annotations
Co-authored-by: Matthew Brown <github@muglug.com>
2021-01-29 11:47:04 +01:00
Matt Brown
1c48258fe2
Fix range return type to always non-empty lists
2021-01-29 11:47:04 +01:00
Matt Brown
5cf5aecb2f
Fix #3017 - use correct keys when converting list to array
2021-01-29 11:47:04 +01:00
Matt Brown
3005d2e1d7
Simplify more things
2021-01-29 11:47:04 +01:00
Matt Brown
65947e5808
Show complex methods in info
2021-01-29 11:47:03 +01:00
Matt Brown
5b0e8bd1be
Only show possibly unused params on methods that don’t extend others
2021-01-29 11:47:03 +01:00
orklah
0df867cdff
fix array_column with possibly_undefined keys ( #4719 )
2021-01-29 11:47:03 +01:00
orklah
b084e2c4bd
add annotation @psalm-param-out ( #4717 )
...
* add annotation @psalm-param-out
* add tag in documentation
2021-01-29 11:47:02 +01:00
Matt Brown
3be31563d6
Add complex issue error
2021-01-29 11:46:28 +01:00
Matt Brown
0b292a55c1
Simplify FunctionCallAnalyzer
...
Ref #4714
2021-01-29 11:46:28 +01:00
Matt Brown
ce38868871
Simplify call analysers a bit
...
Ref #4714
2021-01-29 11:46:28 +01:00
Matt Brown
8e372d30ac
Simplify ArrayAnalyzer
...
Ref #4714
2021-01-29 11:46:28 +01:00
Matt Brown
ccccee289c
Don’t alter behaviour
2021-01-29 11:46:28 +01:00
Matt Brown
9089f77176
Turn template bound tuples into object
...
Ref #4714
2021-01-29 11:46:27 +01:00
orklah
45d058c2dd
better fix for reconciling iterable and object ( #4712 )
2021-01-29 11:46:27 +01:00
Matt Brown
0b605d6b3c
Add complexity function name echoing
2021-01-29 11:46:27 +01:00
orklah
3636a9e361
Allow <false|T as object> to be falsy ( #4711 )
2021-01-29 11:46:27 +01:00
gdejong
45c51eb121
Migrate PHPUnit configuration ( #4710 )
...
Co-authored-by: Gijs de Jong <gijs.de.jong@munisense.com>
2021-01-29 11:46:27 +01:00
Matt Brown
7e486565d1
Skip missing function params in taint analysis
2021-01-29 11:46:27 +01:00
Matt Brown
9539c0f27f
Fix generic ArrayAccess creation cc @orklah
2021-01-29 11:46:27 +01:00
orklah
1966766a79
Allow reconciling between object and iterable ( #4706 )
...
* Allow reconciling between object and iterable
* add tests
2021-01-29 11:46:27 +01:00
orklah
1511989521
Fix PHPMAXINT offset ( #4707 )
2021-01-29 11:46:27 +01:00
Matt Brown
33d2561c1c
Fix style issues
2021-01-29 11:46:26 +01:00
Matt Brown
ecbb5c77b2
Fix test failures
2021-01-29 11:46:26 +01:00
Markus Staab
86af28aa31
Document more taint types ( #4704 )
...
* Document more taint types
Taken from the TaintKind enum
* Add more of a description
Co-authored-by: Matthew Brown <github@muglug.com>
2021-01-29 11:46:26 +01:00
LeSuisse
2a56a3a0c9
Fix incorrect taint sink map for \rmdir ( #4703 )
...
Closes #4690
2021-01-29 11:46:26 +01:00
Markus Staab
6474d7ee6c
Declare PdoStatement->fetchObject($class_name) a taint sink ( #4701 )
...
* Declare PdoStatement
* Change to a callable sink
Co-authored-by: Matthew Brown <github@muglug.com>
2021-01-29 11:46:26 +01:00
orklah
3593a41060
fix wrong cast to int when string offset is a number > MAX INT ( #4702 )
2021-01-29 11:46:26 +01:00
Matt Brown
033a209950
Treat $a ?? $b identically to isset($a) ? $a : $b
2021-01-29 11:46:26 +01:00
Matt Brown
5228ff6369
Fix #4699 - treat isset like !== null when variable is defined
2021-01-29 11:46:26 +01:00
Matt Brown
31249d7c85
Pass correct flags when referencing from finally
2021-01-29 11:46:26 +01:00
Markus Staab
4206a4f59e
Added PDOStatement->fetchObject() stub ( #4693 )
...
* Added PDOStatement->fetchObject() stub
* fix stub param
* fix Xdebug spelling
* Use extension_loaded check instead
Co-authored-by: Matthew Brown <github@muglug.com>
2021-01-29 11:46:25 +01:00
orklah
005373bbc2
Detect redundant cast ( #4695 )
...
* detect redundant cast
* fix redundant cast issues
* fix redundant cast in tests
2021-01-29 11:46:25 +01:00
Matthew Brown
51fed99c5d
Fix core return types
2021-01-29 11:46:25 +01:00
Matt Brown
3f8fead1f7
Remove suppressed issuue
2021-01-29 11:46:25 +01:00
Markus Staab
526319dc47
fixed exception message ( #4692 )
2021-01-29 11:46:25 +01:00
Matt Brown
b5483b42cf
Add slash
2021-01-29 11:46:25 +01:00
orklah
30f1a498a3
restore str_split as a list ( #4694 )
2021-01-29 11:46:25 +01:00
Matt Brown
e469e7179e
Switch order to satisfy new refinement
2021-01-29 11:46:25 +01:00
Matt Brown
e5f25c7780
Add support for some dependent types
2021-01-29 11:46:25 +01:00
Matt Brown
8a7a1124a4
Fix some stubs
2021-01-29 11:46:24 +01:00
Matt Brown
9c6c6cdee4
Remove debugging error
2021-01-29 11:46:24 +01:00
orklah
26410ad19d
Emit an issue when returning a Stringable object when a string is expected ( #4657 )
...
* Emit an issue when returning a Stringable object when a string is expected
* Fix issue in Psalm codebase
2021-01-29 11:46:24 +01:00
Benjamin Morel
e9c608e7cb
Fix PdoStatementReturnTypeProvider ( #4683 )
...
* Fix PdoStatementReturnTypeProvider
Methods returning scalars may return null as well.
* Fix tests
2021-01-29 11:46:24 +01:00
Matthew Brown
2ea96069eb
Add example from @ludofleury's solution
2021-01-29 11:46:24 +01:00
Benjamin Morel
ec89cc623a
Fix PDOStatement::fetchObject() return type ( #4682 )
2021-01-29 11:46:24 +01:00
Matt Brown
8155a5c7aa
Fix tests
2021-01-29 11:46:24 +01:00
Olivier Doucet
9dcdc3a58d
add CodeClimate output format ( #4387 )
...
* add CodeClimate output format
* cosmetic fixes
* add CodeClimate output format
* cosmetic fixes
* phpcs fixes
2021-01-29 11:46:24 +01:00
orklah
597b7aa064
Prevent illegal array keys ( #4660 )
...
* Emit an issue when an array-key is not legal
* tests
2021-01-29 11:46:23 +01:00
Markus Staab
fe4423de78
Mark finfo_open and finfo_file as impure ( #4678 )
...
* Mark finfo_open and finfo_file as impure
* fix CS
2021-01-29 11:46:23 +01:00