1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-04 02:27:59 +01:00
Commit Graph

33 Commits

Author SHA1 Message Date
Matthew Brown
60ac109c01
Add RedundantPropertyInitializationCheck (#4732)
* Add RedundantPropertyInitializationCheck

* add documentation for RedundantPropertyInitializationCheck (#4734)

Co-authored-by: orklah <orklah@users.noreply.github.com>
2020-11-29 11:57:20 -05:00
Matt Brown
f3e0201a99 Treat $a ?? $b identically to isset($a) ? $a : $b 2020-11-25 14:34:05 -05:00
Matt Brown
d40d63f180 Fix #4699 - treat isset like !== null when variable is defined 2020-11-25 14:04:55 -05:00
Matt Brown
324e9d11c3 Fix tests 2020-11-08 11:04:39 -05:00
Matt Brown
dccf236d16 Fix #4503 - don’t ignore assertions on possibly-null mixed 2020-11-08 10:06:39 -05:00
Matt Brown
083cc29c04 Fix #4347 - fix combinatorial expansion when negating if conditions 2020-10-16 10:23:15 -04:00
orklah
ead107fa9e
More return types (#4173)
* add native return types

* redundant phpdoc
2020-09-12 11:24:05 -04:00
Brown
92239add4d Add some backwards-incompatible changes for 4.x 2020-08-30 11:44:14 -04:00
Tom Klingenberg
04b6dfdc5b
Fix PSR-4 deprecation notices on composer install (#3959)
Previously when checking out the repository and installing the source
package via `$ composer install` composer did spill deprecation notices for
four files not complying with the PSR-4 auto-loading standard.

This is a minor issue, composer install works and can be addressed by
fixing name-spaces (all of those three are in tests).

For the one function test, fixing the directory structure / dirname of the
(single) affected function test (fourth file).
2020-08-07 23:22:30 -04:00
Brown
2d5c2a9dd1 Fix #3324 - prevent crash asserting on possibly-undefined variable 2020-05-08 14:21:10 -04:00
Brown
a25610cefd Fix #3133 - prevent crash when analysing isset 2020-04-13 08:34:38 -04:00
Brown
73f8f963fa Expand out class constants as early as possible
Fixes #3128
2020-04-12 20:38:36 -04:00
Brown
db7447abd7 Make array coercion-to--mixed rules a little more lenient 2020-04-10 16:21:48 -04:00
Brown
3a4dd70403 Prevent MixedMethodCall from generated array offsetGet calls 2020-04-09 11:45:15 -04:00
Brown
25bd2ed5fb Fix #3010 - prevent false-negative after calling isset on possibly-false array 2020-03-24 12:01:39 -04:00
Matthew Brown
292f6e797f Only make directly-assertable things possibly-undefined
Ref #2724
2020-02-01 10:58:13 -05:00
Matthew Brown
f2347303c9 Skip correct test 2020-02-01 01:43:26 -05:00
Matthew Brown
255ffa05ea
Skip another failing test 2020-01-31 17:59:29 -05:00
Matthew Brown
6f75903948
Fix dupe key 2020-01-31 17:47:11 -05:00
Brown
a40bfbd2b2 Add back skipped tests for the moment 2020-01-31 17:27:39 -05:00
Brown
3b6f53a356 Revert "Fix #2724 - make sure behaviour is not dependent on array type"
This reverts commit 1df03b0ff2.
2020-01-31 17:25:15 -05:00
Brown
1df03b0ff2 Fix #2724 - make sure behaviour is not dependent on array type 2020-01-31 16:46:05 -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
Brown
0f6b61d62d Clone isset type before contradicting 2020-01-14 18:28:32 -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
131fb97663 Fix #2594 - forbid isset check on null 2020-01-11 15:58:40 -05:00
Matthew Brown
141bfd313f Improve handling of assignments in arrays 2019-12-22 12:36:16 +00:00
Matthew Brown
4c8730c5a3 Improve handling of unset array, ensuring that keys don’t persevere 2019-12-22 01:42:39 +00:00
Matthew Brown
c9b5e96b0f Fix ref 2019-12-13 08:11:04 -05:00
Matthew Brown
ca5f8fabdc Fix #2464 - null coalesce shouldn’t allow undefined vars 2019-12-13 08:06:40 -05:00
Matthew Brown
d7fdd9b179 Move more tests into appropriate directory 2019-12-07 13:38:06 -05:00