Matthew Brown
e8618371fb
Refine isset checks
2019-10-17 01:09:21 -04:00
Matthew Brown
e620c2cfa4
Fix issue creating empty array offsets
2019-10-08 21:23:16 -04:00
Brown
60214ab0c7
Allow assertions on arbitrary offsets without isset
2019-10-03 18:40:47 -04:00
Brown
ebe8bedb20
Allow assertions on class constants
2019-10-03 18:13:04 -04:00
Brown
ca06277f30
Add better support for previous key types
2019-10-03 15:43:17 -04:00
Brown
549aee47f1
Fix bug asserting array emptiness
2019-10-03 15:27:55 -04:00
Matthew Brown
3182aa51ee
Add currently-broken test
2019-10-02 01:18:57 -04:00
Matthew Brown
24977fb021
Fix small bug
2019-10-02 01:17:45 -04:00
Brown
d225374d6d
Fix #2156 - do better inference after isset
2019-10-01 19:31:08 -04:00
Brown
56856f3da0
Break up assert tests
2019-10-01 17:09:34 -04:00
Matthew Brown
0ae04c9743
Fix #2148 - support arrays properly
2019-09-21 21:50:11 -04:00
Matthew Brown
264131c211
Fix #2121 - no internal error on funk assertion syntax
2019-09-21 21:22:31 -04:00
Brown
e6f90ab83f
Fix #2146 - check count args length
2019-09-19 15:07:49 -04:00
lhchavez
ae2c6715a7
Allow @psalm-assert to propagate member assertions to the caller's context ( #2100 )
...
This change injects method call assertions that involve member variables
to the caller context by replacing `$this->` with the lhs of the member
call.
Fixes : #2099
2019-09-05 21:00:02 -04:00
Brown
22ba3ada7b
Fix #2081 - allow Assert::true to replace assert() calls
2019-08-29 11:53:36 -04:00
Tyson Andre
b88fe2cfe0
Fix typos ( #2003 )
2019-08-11 17:13:43 -04:00
Matthew Brown
460120ec45
Fix #1994 - make assert-if-true work for $this properties
2019-08-10 09:12:02 -04:00
Matthew Brown
3516b48173
Break out templated assertion tests
2019-07-21 01:10:33 -04:00
Matthew Brown
6cbf499f14
Fix #1922 - ignore iterable/array when transforming assertions
2019-07-09 07:38:37 -04:00
Matthew Brown
5c4ac97546
Fix #1915 - allow @psalm-assert-if-true to operate on $this
2019-07-07 15:06:03 -04:00
Matthew Brown
bceb4efde9
Fix #1911 - allow proper namespaces in union assertions
2019-07-07 09:14:23 -04:00
Matthew Brown
da42be175f
Apply PHPCS fixes
...
Fixes #1880
2019-07-05 16:27:53 -04:00
Matthew Brown
efe096c7ab
Fix #1897 - add support for unions in @psalm-assert annotations
2019-07-04 15:05:55 -04:00
Matthew Brown
13779e760e
Fix #1736 - forbid | in @psalm-assert
2019-06-05 00:46:55 -04:00
Brown
9b508d932d
Improve specificity of explicit negated expression checks
2019-05-28 19:15:47 -04:00
Brown
c9cfa7f010
Add error when reconciling impossible types
2019-05-28 18:33:23 -04:00
Matthew Brown
b2fb80978e
Fix assertions with single templated class-string
2019-05-27 12:17:20 -04:00
Brown
f728d797cf
Fix #1665 - allow -if-true & -if-false assertions on static methods
2019-05-22 17:49:38 -04:00
Brown
4a434d9a2f
Add separate issue for undefined classes in docblocks
2019-05-15 18:41:26 -04:00
Matthew Brown
c772914910
Add some formatting
2019-03-23 14:27:54 -04:00
Matthew Brown
17235cedf9
Allow sequential unsets with missing keys
2019-03-11 01:54:32 -04:00
Matthew Brown
907244cd23
Don’t assert on non-empty checks
2019-03-11 01:35:09 -04:00
Matthew Brown
95b986d2d4
Fix #1367 - allow assertions on mixed arrays to define objectlike type
2019-03-10 23:38:30 -04:00
Matthew Brown
b0853bcde6
Fix #1376 - allow nonzero numeric array key asssertions
2019-03-10 17:54:03 -04:00
Bruce Weirdan
9bdc9f774f
More provider typing
2019-03-02 08:43:19 -05:00
Matthew Brown
8bc17e47be
Fix #1227 - allow genric params in @psalm-assert
2019-01-22 23:42:54 -05:00
Matthew Brown
a7005014c2
Fix #987 - namespace asserted classes
2019-01-12 11:40:19 -05:00
Matthew Brown
f5378bdca8
Improve function call resolution
2019-01-05 14:50:11 -05:00
Matthew Brown
9efd40e321
Fix #1095 - prevent complex assertion redundant condition
2018-11-29 23:25:30 -05:00
Brown
f3599a8b6c
Allow assertSame(null, ...)
2018-11-16 11:50:07 -05:00
Brown
425b6321aa
Add better understanding of when floats and ints can be equal
2018-11-16 11:04:45 -05:00
Brown
08d9940259
Change ^ to = when annotating assertions
2018-11-16 10:13:52 -05:00
Matthew Brown
e8716f636e
Prevent templated assertions on union types with > 1 atomic
2018-11-16 00:56:57 -05:00
Brown
029b6e5ac4
Allow assertions to be made on template params
2018-11-15 18:50:08 -05:00
Brown
254a14f621
Allow assertion redundant conditions to be suppressed
2018-11-14 13:44:20 -05:00
Brown
3ba2510096
Prevent bleeding of assert vars into context
2018-11-14 13:12:31 -05:00
Brown
4904ffe8ea
Complain about redundant conditions on custom asserts
2018-11-14 12:25:17 -05:00
Matthew Brown
4688b25fd9
Move internal classes to own namespace
2018-11-12 11:20:59 -05:00
Brown
aef9fecaa3
Fix #1045 - check intersection classes exist
2018-10-30 10:34:02 -04:00
Matthew Brown
d1baff4b92
Fix #1044 - allow templated params in assert
2018-10-30 09:20:34 -04:00