orklah
18ab5a099f
Merge pull request #7309 from orklah/emptyStringKeyedArray
...
fix empty string not quoted in keyed array offset
2022-01-06 09:37:28 +01:00
orklah
a6a0769402
fix test
2022-01-05 22:39:13 +01:00
orklah
72216f9354
fix test
2022-01-05 22:36:22 +01:00
orklah
e7bc6f273a
don't crash when pushing a template to in_array
2022-01-05 22:33:20 +01:00
orklah
7e2b9d0fab
fix empty string in keyed array offset
2022-01-05 22:26:35 +01:00
AndrolGenhald
1b9f57f214
Fix directory separator cross-platform issue.
2021-12-30 16:29:40 -06:00
AndrolGenhald
dd631c0c85
Skip reference tests, allow assertions on magic properties ( fixes #6770 ).
2021-12-30 16:23:59 -06:00
AndrolGenhald
cb9231b62f
Add failing tests for reference property mutation.
2021-12-30 14:44:03 -06:00
AndrolGenhald
3ac497c811
Allow assertions on mutable object properties.
...
All of the functionality is already there, we just have to not prevent it.
2021-12-30 14:07:55 -06:00
orklah
fb97980bf9
fix test
2021-12-26 19:27:13 +01:00
orklah
f7b6c4e1b6
escape more special chars in keyed array names that won't be read by the parser
2021-12-26 19:27:13 +01:00
orklah
bb687aebba
add test
2021-12-15 00:51:59 +01:00
ralila
8fb2e0f885
Handle some partials
2021-12-04 21:55:53 +01:00
Maximilian Bösing
dac82e95dc
qa: re-enable skipped test for class constant assertions
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2021-11-15 18:49:51 +01:00
Aleksandr Zhuravlev
b664850cdc
Added support of asserting properties of objects out of scope
2021-10-17 21:29:25 +13:00
Aleksandr Zhuravlev
657f8e22ed
Made the test marked 7.4
2021-10-14 22:05:40 +13:00
Aleksandr Zhuravlev
cbb67c0672
Stubbed RelfectionNamedType
2021-10-14 11:09:52 +13:00
orklah
2e64854a6c
don't allow getAssertionString to return a part of the Union
2021-10-11 16:07:57 +02:00
orklah
ee4dbafca9
fix test
2021-10-02 10:02:24 +02:00
Fran Moreno
decb397b8e
Add ReflectionProperty::getType() and hasType()
2021-07-10 13:05:57 +02:00
AndrolGenhald
d4590711d6
Fix object-like array keys when combining string and automatic keys ( fixes #5427 ). ( #5428 )
...
* Fix object-like array keys (fixes #5427 ).
* Fix incorrect return types for tests.
* Fix false positive list with literal int key.
2021-03-19 21:44:44 -04:00
Matt Brown
9d979e3467
Fix #5406 - track more changes to assertion type
2021-03-16 16:33:09 -04:00
Matt Brown
c97ee5ccdb
Fix #5258 - allow ReflectionParameeter::hasType() to inform getType() return
2021-03-06 16:54:23 -05:00
Matt Brown
4c65d3b424
Fix #5310 - allow iterable coercion from generic object
2021-03-03 00:13:00 -05:00
Matt Brown
0624098865
Ensure getId() output can always be parsed as a type
...
Ref #5105
2021-01-25 23:41:51 -05:00
Matt Brown
f1107ab4d9
Fix #5049 - assertion of !empty
on bool makes true
2021-01-19 17:19:47 -05:00
Matt Brown
4378bec917
Fix #5025 - prevent crash in assert function during reflection
2021-01-17 12:08:19 -05:00
Bruce Weirdan
89ff4282df
Allow assertions on static class properties ( #4833 )
...
* Minimal implementation for assertions on static properties
* Added inheritance tests
* Add support for `ClassName::$var`
* Import strpos() to keep phpcs happy
* Add support for conditional assertions on static properties
2020-12-21 17:05:44 +00:00
orklah
5222cadfb3
Check from_docblock property to emit the right issue ( #4736 )
2020-11-29 21:40:13 -05:00
Matt Brown
18f3a3721f
Fix #4414 - allow multiple @psalm-assert-if-true on same var
2020-10-25 10:49:39 -04:00
orklah
ead107fa9e
More return types ( #4173 )
...
* add native return types
* redundant phpdoc
2020-09-12 11:24:05 -04:00
Bruce Weirdan
4dcb7183f5
Fix windows tests ( #4040 )
...
* Fix windows tests by not mangling the expectations
* Use platform-dependent directory separator in expected messages
* fix CS
2020-08-22 10:00:36 -04:00
Brown
42c3a703b5
Fix #3741 - detect scalar class constants in if-true assertions
2020-08-12 17:03:41 -04:00
Brown
7367e8e6c2
Allow assertions of non-empty lists on typed lists
...
Fixes #3906
2020-07-29 18:10:43 -04:00
Brown
223b0619c5
Fix #3858 - support @psalm-assert falsy for abort_if expressions
2020-07-21 12:55:11 -04:00
Brown
2399643472
Fix #3811 - allow more complex negations inside boolean expressions
2020-07-13 21:31:58 -04:00
Brown
98622783ec
Allow lists to have their types refined
...
Fixes #3605
2020-06-18 10:01:16 -04:00
Matthew Brown
15e753e279
Fix #3443 - add InvalidDocblock issue for @psalm-assert Foo|!Bar
2020-05-23 22:52:21 -04:00
m0003r
1749c19a29
Fix $assertion_var_id calculation in method calls ( #3115 )
2020-04-09 23:03:53 -04:00
Brown
09663b5938
Fix #3095 - allow intersection of arrays after assertions
2020-04-09 23:02:28 -04:00
m0003r
4d1be3f0c4
Allow plain assertions (@psalm-assert) about $this ( fixes #3105 ) ( #3108 )
...
* Allow plain assertions (@psalm-assert) about $this (fixes #3105 )
* Fix multiple assertion combining
* Fix multiple assertion combining for $this again
* Add test for multiple assertion combining for $this again
2020-04-09 08:15:07 -04:00
Brown
3c9ec90919
Fix deprecated call
2020-04-03 14:56:11 -04:00
Brown
adbe44d7bb
Revert countable checks
2020-01-31 15:24:44 -05:00
Brown
37765098e9
Fix #2725 - allow empty checks on objects that implement countable
2020-01-31 12:55:33 -05:00
Matthew Brown
ff01f41b44
Allow strings in assert annotation
2020-01-27 23:15:50 -05:00
Matthew Brown
8ccd4860e3
fclose should treat resource as passed-by-reference
2020-01-17 13:12:00 -05:00
Matthew Brown
adf230e873
Fix #2636 - allow non-empty-list in assert annotation
2020-01-17 09:06:34 -05:00
Brown
2c7197ab4b
Fix #2578 - improve inference of functions beginning with assert
2020-01-09 15:45:17 -05:00
Matthew Brown
16b8edd583
Fix #2409 - use more robust assertion parsing
2019-12-31 09:10:14 -05:00
Matthew Brown
366e2d30a3
Improve assertions support a bit more
2019-12-30 10:48:50 -05:00