1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-29 20:28:59 +01:00
Commit Graph

47 Commits

Author SHA1 Message Date
Matt Brown
fb81fa13f4
Ensure Stringable is always available to tests that need it 2021-01-29 11:44:35 +01:00
Matt Brown
951c3715f7
Fix tests 2021-01-29 11:44:33 +01:00
Matt Brown
35fd64bf74
Fix test type 2021-01-29 11:44:33 +01:00
Matt Brown
106747487b
Fix #4429 - any class with a __toString method in PHP8 assumed to implement Stringable 2021-01-29 11:44:33 +01:00
Matt Brown
6310aff7e5
4.x - skip Stringable test if not in PHP 8.0 2021-01-29 11:39:52 +01:00
Matt Brown
ffcae7c7a9
Add support for Stringable 2021-01-29 11:39:47 +01:00
orklah
db45ff1ba4
More return types (#4173)
* add native return types

* redundant phpdoc
2021-01-29 11:38:57 +01:00
Brown
9bfe50b20a Always analyse cast expressions
Fixes #3577
2020-06-12 17:25:46 -04:00
Nobu Funaki
abef8008bc
Fix InvalidCast after is_callable([$val, '__toString']) check (#3372)
Support is_callable() with an array argument similar to method_exists()
2020-05-16 08:50:43 -04:00
Brown
e65bffc94f Support intersections with __toString
Fixes #3149
2020-04-26 20:04:41 -04:00
Matthew Brown
933dff9e20 Fix #2712 - allow __toString to have more specific type 2020-01-29 22:28:40 -05:00
Brown
43041836dd Fix #2026 - add support for calling __toString implicitly after method_exists 2019-08-16 11:33:58 -04:00
Brown
e85794038f Fix #1704 - improve type coercion complaints 2019-05-29 14:22:15 -04:00
Brown
57a585240c Allow is_subclass_of/is_a to inform shape of mixed arg 2019-05-06 10:06:05 -04:00
Matthew Brown
c772914910 Add some formatting 2019-03-23 14:27:54 -04:00
Matthew Brown
472ab29d74 Add PossiblyInvalidCast for more refined checks 2019-03-17 17:10:51 -04:00
Matthew Brown
e3d8ebf612 Add test for #1451 2019-03-17 16:41:34 -04:00
Matthew Brown
bf586bf93b Fix #1471 - report issue with string casting inside string 2019-03-17 16:31:56 -04:00
Bruce Weirdan
9bdc9f774f More provider typing 2019-03-02 08:43:19 -05:00
Matthew Brown
d1cf9d61ba Fix #1398 - improve casting rules for resource 2019-03-01 00:50:22 -05:00
Matthew Brown
9d8c2792e2 Add array-key type and improve general type handling
Fixes #1144
2019-01-05 00:15:53 -05:00
Matthew Brown
4688b25fd9 Move internal classes to own namespace 2018-11-12 11:20:59 -05:00
Brown
0352babece Fix buggy handling of class with __toString being passed to string|object 2018-10-04 15:29:01 -04:00
Matt Brown
dce8d14e1b Fix syntax errors in tests 2018-09-17 12:15:45 -04:00
Matt Brown
f844f86a6c Improve type coercion checks in strict mode 2018-08-28 17:42:39 -04:00
Matthew Brown
1946bc0085 Allow resource to be cast to string 2018-04-30 00:19:35 -04:00
Matthew Brown
33be97b1f8 Check for to-string casts in strict operands mode 2018-03-18 14:42:23 -04:00
Matthew Brown
e862e4ddb1 Make all plugin methods static
cc @TysonAndre
2018-02-11 20:56:34 -05:00
Matt Brown
2120d258a4 Fix formatting of return type adder 2018-01-11 15:50:58 -05:00
Matthew Brown
52fc81e4ab Remove need for a __toString return type
Fixes #364
2017-12-05 23:47:50 -05:00
Matthew Brown
9774131876 Fix #224 - explicit string casts fail when no __toString present 2017-10-07 11:27:54 -04:00
Matt Brown
10b511284a Improve null coalesce test and improve linting 2017-06-20 14:38:13 -04:00
Matthew Brown
72e1221a2f Fix #168 and add test case 2017-06-11 19:20:07 -04:00
Matthew Brown
d6909193ea Add additional formatting changes 2017-05-26 20:05:57 -04:00
Jon Ursenbach
11bc153deb Rewriting and streamlining every unit test with data providers. (#147)
* Rewriting and streamlining every unit test with data providers.

All unit tests have been rewritten into PHPUnit data providers
to reduce the amount of unnecessary code-reuse through out the
test suite.
2017-04-24 23:45:02 -04:00
Matt Brown
dc26d2df04 Fix #144 - prevent innaccurate __toString warning 2017-04-21 14:23:09 -04:00
Matt Brown
a7872472be Add stubbing tests and modify config initialisation 2017-01-31 19:22:05 -05:00
Matthew Brown
b3726c9de5 Use getcwd() for the project’s base, not the config file parent directory 2017-01-16 18:33:04 -05:00
Matt Brown
6e6106c080 Add docblocks to tests 2017-01-13 14:07:23 -05:00
Matthew Brown
17329015dc Discriminate between checking, visiting and analyzing in method names 2017-01-07 15:09:47 -05:00
Matthew Brown
7609ca02c0 Fix #32 by evaluating all class references in files lazily 2017-01-04 23:42:58 -05:00
Matthew Brown
8b5e066ba6 Add case-sensitive function names 2016-12-30 13:09:00 -05:00
Matthew Brown
18e7c65430 Emit more InvalidOperand issues 2016-12-29 00:14:06 -05:00
Matthew Brown
52b3e1ba8c Simplify test config setup; 2016-12-18 19:00:32 -05:00
Matt Brown
c91e457c28 Add psalm.xml support for checking tests 2016-12-14 12:55:23 -05:00
Matt Brown
154d023a9d Add more robust config testing 2016-12-14 12:28:38 -05:00
Matt Brown
b3106c68bb Fix #6 - raise error with erroneous __toString 2016-12-09 12:48:02 -05:00