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

107 Commits

Author SHA1 Message Date
Brown
f56c76a8be Fix #1015 with maybe slightly hacky solution? It’s an edge case, though 2018-10-10 11:45:56 -04:00
Matthew Brown
3b8e82cca1 Fix hydration of property types in property map 2018-10-10 00:54:50 -04:00
Matt Brown
dce8d14e1b Fix syntax errors in tests 2018-09-17 12:15:45 -04:00
Matthew Brown
6670dd31e1 Fix #927 - improve typing of object-like arrays containing class like strings 2018-08-08 21:31:13 -04:00
Matt Brown
2636b194db Fix #920 - support @var self properties in static method calls 2018-08-07 14:43:05 -04:00
Matthew Brown
c33bebb908 Fix typo 2018-07-21 20:30:38 -04:00
Matthew Brown
e439c9e8a3 Fix typo in public test 2018-07-21 20:29:39 -04:00
Matthew Brown
c97329da06 Fix #903 - make sure parent::foo is executed in context of method’s class
and not immediate parent
2018-07-21 20:01:58 -04:00
Matt Brown
f6b15a4a5a Fix #847 - only warn about LessSpecificReturnType when method is not overridden 2018-07-12 16:57:24 -04:00
Matt Brown
5bb5bb2476 Check this properties for redundant conditions 2018-07-10 12:32:53 -04:00
Matthew Brown
82715a03ea Improve test coverage of PropertyAssignmentChecker 2018-06-10 10:02:46 -04:00
Matt Brown
68dbe509a8 Fix #731 - report issues in files required by the source 2018-05-30 12:23:53 -04:00
Matthew Brown
b0733254bb
Use individual type objects for each string (#757)
* Experiment with individual types for each string

* Fix bunch of errors

* Fix a few more issues

* Fix a whole bunch of bugs

* Fix most remaining bugs

* Fix isset warnings

* Fix psalm errors in psalm

* Limit big string size

* Fix falsiness of ints

* Fix issue with type widening, allowing value set in nested if to be altered

* Don’t complain if type is mixed

* Add skipped-for-now test

* Add specific test to address issue
2018-05-18 11:02:50 -04:00
Matt Brown
afe3b936d4 Fix test failure 2018-05-09 15:49:22 -04:00
Matt Brown
ad94761e15 Fix undefined property fetch redundant condition 2018-05-09 12:54:31 -04:00
Matthew Brown
85747d67a1 Fix issuses found in tests 2018-04-21 17:20:21 -04:00
Matt Brown
6afaf5aae9 Make Psalm compatible with PHP Parser 4 2018-04-17 13:06:02 -04:00
Matt Brown
6502eba658 Don’t invalidate object vars after callmap functions 2018-04-13 11:24:59 -04:00
Radosław Kowalewski
15c1a82d8c Few fixes to make tests pass on windows
* changed / to DIRECTORY_SEPARATOR in expected messages
* cahnged most occurences PHP_EOL to "\n" in tests and src
* added output buffering in test to avoid marking test as risky
2018-04-12 22:41:13 -04:00
Matthew Brown
f15c26d7f4 Change how type impossibilities are treated to improve message types 2018-04-10 01:27:26 -04:00
Matthew Brown
0f0f405b9f Allow mixed property assignment when the user wants it
Fixes #652
2018-04-07 12:13:30 -04:00
Matthew Brown
7a5d4b8516 Fix the right thing 2018-03-20 23:55:26 -04:00
Matthew Brown
67312be2a9 Fix #562 - allow if/else blocks to initialise vars 2018-03-08 09:30:31 -05:00
Matt Brown
09d708981a Add mixed checks to property __set calls 2018-02-21 19:34:21 -05:00
Matt Brown
1df4c3d196 Add DocblockTypeContradiction to find possible issues with docblock types
Fixes #491
2018-02-06 18:44:53 -05:00
Matt Brown
2e443dce85 Revert "Fix private constructor check"
This reverts commit 684eb7923b, because it introduces more problems than it solves
2018-02-05 15:53:39 -05:00
Matt Brown
684eb7923b Fix private constructor check 2018-02-05 13:06:03 -05:00
Matthew Brown
07788076e7 Require all new issues to be documented 2018-01-29 00:39:21 -05:00
Matthew Brown
6bfb27165d Check property defaults again 2018-01-28 21:43:26 -05:00
Matt Brown
72a4f148ff Prevent infinite loops when analysing private functions that call each other 2018-01-24 13:11:23 -05:00
Matthew Brown
9b6b03ff9f Create Config before ProjectChecker, and remove test-specific code from FileChecker 2018-01-21 10:22:04 -05:00
Matt Brown
a253ca68bc Allow array_filter to inspect closure bodies 2018-01-17 16:07:46 -05:00
Matt Brown
2212d7c032 Reinstate $this type after parent call
Fixes #444
2018-01-17 11:00:58 -05:00
Matthew Brown
f3bfb089ad Don’t investigate property mutations if they’re not visible 2018-01-13 01:52:46 -05:00
Matt Brown
2120d258a4 Fix formatting of return type adder 2018-01-11 15:50:58 -05:00
Matt Brown
72848477c2 Add all Possibly* issues to more lenient config
And add granularity to InvalidPropertyAssignment* issues
2018-01-10 10:56:43 -05:00
Matthew Brown
c9173c7da3 Add more specific issues for falsable/nullable invalid return types 2018-01-04 21:36:16 -05:00
Matt Brown
e6aae2f2e2 Fix issue assigning string-typed properties without a string cast 2018-01-02 18:01:59 -05:00
Matthew Brown
d964f96439 Add test that analyses a class with a mapped property 2017-12-30 10:42:06 -05:00
Matthew Brown
57592aca41 Fix #409 - PropertyNotSetInConstructor can be suppressed at the property level 2017-12-27 12:27:59 +01:00
Matthew Brown
45fc9fd5d9 Check LHS of property when RHS is variable 2017-12-18 22:35:03 -05:00
Matthew Brown
dc65c14bc4 Fix properties fetches with self 2017-12-13 22:29:38 -05:00
Matt Brown
eca7351472 Add return-level issues as well as function-level ones
Fixes #379
2017-12-07 15:50:25 -05:00
Matthew Brown
0ea6540018 Fix #358, don’t emit PropertyNotSetInConstructor on public final classes/methods 2017-11-29 23:46:56 -05:00
Matt Brown
1173dcc6a2 Don’t stop reconciling types when encountering problem 2017-11-28 17:42:00 -05:00
Matt Brown
a99135c4d0 Fix #300 - add PossiblyInvalidPropertyFetch 2017-11-15 11:44:13 -05:00
Matt Brown
9111b1c725 Fix #301 - add PossiblyInvalidPropertyAssignment 2017-11-15 11:15:03 -05:00
Tyson Andre
a50783404f Fix build failure - MixedPropertyAssignment should be expected in test.
This is assigning to a property of type mixed?
2017-11-07 17:24:44 -05:00
Matt Brown
81493a639e Add more robust property assignment when property not defined 2017-11-03 12:27:01 -04:00
Matthew Brown
467bbba593 Prevent falsy values from leaking into the type system 2017-10-23 22:04:07 -04:00