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

5728 Commits

Author SHA1 Message Date
Brown
0132b3789b Fix #2665 - warn about abstract class interface inheritance issues 2020-01-21 11:46:51 -05:00
Brown
a2e1dfd64e Fix #2667 - don’t check inherited signature return types for accuracy 2020-01-21 11:07:44 -05:00
Brown
36f5c51f01 Allow unpacking of list args with known elements 2020-01-21 10:13:37 -05:00
Matthew Brown
504de0a9ce Catch more UnanalyzedFileExceptions to prevent LSP crash
Fixes #2633
2020-01-20 23:27:56 -05:00
orklah
f2802b6862 fix typo (#2663) 2020-01-20 23:19:48 -05:00
Scott Arciszewski
dbb630ec91 Allow Psalm to be installed on PHP 8 (#2660)
PHP 8 won't be released until later this year, but it'd be nice to be able to install Psalm without Composer complaining loudly.
2020-01-17 18:11:44 -05:00
Matthew Brown
db7b537bd1 Fix missing class 2020-01-17 13:19:57 -05:00
Matthew Brown
8ccd4860e3 fclose should treat resource as passed-by-reference 2020-01-17 13:12:00 -05:00
Matthew Brown
c9d88b6e62 Remove lines 2020-01-17 12:13:29 -05:00
Matthew Brown
1c8af2fdc7 Fix #2658 - catch exceptions thrown inside catch 2020-01-17 12:05:37 -05:00
Matthew Brown
7f093ca8ed Fix #2626 - allow assertions on resource types
Also fixes #2266
2020-01-17 11:55:16 -05:00
Matthew Brown
1697115861 Only set from docblock if not mixed 2020-01-17 10:34:13 -05:00
Matthew Brown
a840743015 Fix #2625 - set template as type from docblock 2020-01-17 10:27:00 -05:00
Matthew Brown
b582c49f51 Fix #2645 - add workarounds for some edgecases 2020-01-17 10:25:05 -05:00
Matthew Brown
2c48d42904 Allow destructuring of callable array
Fixes #2653
2020-01-17 10:02:58 -05:00
Matthew Brown
471d7610f0 Fix #2644 - improve type inference of autoloaded constants 2020-01-17 09:52:43 -05:00
Matthew Brown
24e1d5446c Fix #2642 - merging two explicit lists is still a list 2020-01-17 09:31:08 -05:00
Matthew Brown
adf230e873 Fix #2636 - allow non-empty-list in assert annotation 2020-01-17 09:06:34 -05:00
Alexander Wühr
f9560009ca Allow false as \PDO::fetch return type (#2647) 2020-01-17 08:48:08 -05:00
HenkPoley
72b5b22474 Mention how to annotate psalm specific annotations (#2648)
* Mention how to annotate psalm specific annotations

Might be nice to mention how to annotate psalm specific annotations, without trampling over PhpDoc annotations.

* Fix key type

Co-authored-by: Matthew Brown <github@muglug.com>
2020-01-17 08:47:21 -05:00
Matthew Brown
c50fa27025 Identify trait method access level violations as less serious 2020-01-17 00:28:08 -05:00
Matthew Brown
be6cd0f8c6 Fix generation of files in non-psr directory 2020-01-16 23:24:53 -05:00
Matthew Brown
257ebfd205 Improve trait method mismatch failure rules 2020-01-16 22:36:30 -05:00
Bruce Weirdan
17857163fc Modular config files (#2635)
This change introduces an option to have the configuration split across
several files using standard XInclude tags. This may be useful for more
complex configs, or to include auto-generated parts into a manually
written config file.
2020-01-16 15:57:52 -05:00
Tyson Andre
6612bb74a1 Use floor() instead of round() for long progress percentage (#2634)
PHPUnit and many other applications use floor.
Otherwise, the second-last lines would show 100% despite not being
complete.

```
\sprintf(
    ' %' . $this->numTestsWidth . 'd / %' .
    $this->numTestsWidth . 'd (%3s%%)',
    $this->numTestsRun,
    $this->numTests,
    \floor(($this->numTestsRun / $this->numTests) * 100)
)
```
2020-01-16 15:57:09 -05:00
Alfred Bez
619ced135b fixed RarArchive signatures (#2641) 2020-01-16 11:01:14 -05:00
Jacob Dreesen
26bf183430 Fix typos (#2639) 2020-01-16 08:36:18 -05:00
Pavel Batečko
1b0eba74fd Allow NULL $contextnode in DOMXPath::query() (again) (#2637) 2020-01-16 08:35:36 -05:00
Brown
d434f7fb9d Add list identification for late-resolved constants
Fixes #2624
2020-01-15 11:54:01 -05:00
Brown
1b551b805b Fix #2627 - infer arrow function effects for array_filter 2020-01-15 11:40:49 -05:00
Brown
c07fd13f2b Fix #2623 - prevent crash when combining class strings in constants 2020-01-15 11:26:58 -05:00
Matthew Brown
389af1bfc7 Fix #2618 setting list param from docblock 2020-01-14 22:46:19 -05:00
Matthew Brown
4a03c4aedd Fix impossible isset checks 2020-01-14 21:54:02 -05:00
Matthew Brown
c3edbdbc19 Allow checking $_SESSION for null without altering type 2020-01-14 21:51:04 -05:00
Matthew Brown
1202ba45ef
Fix blank line 2020-01-14 18:51:46 -05:00
Brown
df8f2085f0 Change constant type to be more forgiving 2020-01-14 18:39:15 -05:00
Brown
de7a870509 Add better mixed check 2020-01-14 18:38:02 -05:00
Brown
0f6b61d62d Clone isset type before contradicting 2020-01-14 18:28:32 -05:00
Brown
3fd70a9c88 Only set if non-null 2020-01-14 17:03:58 -05:00
Brown
adc658901a Improve inference of constant() calls 2020-01-14 16:56:09 -05:00
orklah
b09869b7c6 callmap changes (#2612)
* set_error_handler return the same type as its param

* a constant can only have scalars, array of scalars or null

* a constant can only have scalars, array of scalars or null
2020-01-14 16:55:25 -05:00
Brown
1ccababcb7 Track list-ness of constant arrays
Fixes #2621
2020-01-14 12:13:41 -05:00
Brown
c79a8ecbc2 Fix dumb 2020-01-14 10:55:07 -05:00
Brown
fcc7d896a0 Commit actual fix 2020-01-14 10:53:54 -05:00
Brown
c77f2cd7a2 Treat array key int literals same way we treat string literals 2020-01-14 10:40:16 -05:00
Matthew Brown
887a635a47 Use my fork 2020-01-14 01:24:27 -05:00
Matthew Brown
42073a800a Remove unevaluated code 2020-01-14 00:55:56 -05:00
Matthew Brown
e1daf26202 Improve support for null coalesce checks 2020-01-14 00:53:38 -05:00
Matthew Brown
b0073d4558 Fix #2614 - prevent isset($string) 2020-01-13 21:27:09 -05:00
Matthew Brown
ef3c2d30c9 Fix #2613 - allow docblock-defined object-like as non-empty-array 2020-01-13 21:05:30 -05:00