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

136 Commits

Author SHA1 Message Date
8d0c1c62e8
Ensure all template parameters are specified in classes, interfaces, traits 2022-01-31 10:06:31 +01:00
orklah
63b802bff4 remove TPositiveInt 2022-01-23 23:49:23 +01:00
orklah
0e891f25ad refactor description of types in Atomic 2022-01-22 19:34:57 +01:00
Matthew Brown
0a81f8cd6c
Use objects, not strings, for assertions (#7410)
* Use objects, not strings, for assertions

* Remove unnecessary param

* Remove some unnecessary checks

* Fix bad find/replace

* Add note about assertions no longer stored as strings in UPGRADING.md
2022-01-20 17:33:06 -05:00
Matthew Brown
b49682a485 Simplify issue suppression in tests 2022-01-13 14:38:17 -05:00
Matthew Brown
f439d6550b
Ensure that all entries in test arrays have explicit keys (#7386)
* Transformation that updates assertions

* Simplify transformation

* Ensure that all tests have keys

* Fix a few remaining keys
2022-01-13 13:49:37 -05:00
rarila
97e6511fab Set number of lines before and after namespace. 2021-12-15 04:58:32 +01:00
rarila
39402c233d
Return type hints (#7065)
Co-authored-by: ralila <>
2021-12-05 19:51:26 +02:00
ralila
8fb2e0f885 Handle some partials 2021-12-04 21:55:53 +01:00
ralila
711be643c6 Import instead of using fqn exceptions 2021-12-03 20:29:06 +01:00
ralila
245920e53c Import instead of using fqn 2021-12-03 20:11:20 +01:00
orklah
4f223db455 Disable list flag for TKeyedArray after unset 2021-11-26 20:52:34 +01:00
orklah
2cc5c555c2 fix literal string access on a non empty array 2021-10-22 18:17:08 +02:00
orklah
350df114f3
Transform bad offsets (#5817)
* Transform bad offset access

* fix build
2021-05-23 14:43:30 -04:00
Matt Brown
938afc5aea Allow union of 0|positive-int to bypass PossiblyUndefinedIntArrayOffset error 2021-05-23 13:59:40 -04: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
03b54e369b Fix test 2021-02-09 01:37:56 -05:00
Matt Brown
ad0b575080 Better fix for #5180 2021-02-08 23:31:49 -05:00
orklah
665170eadb
add ArrayAccess to SimpleXmlElement (#4934)
* add ArrayAccess to SimpleXmlElement

* add test
2021-01-06 09:44:12 -05:00
Matt Brown
b64eb6d716 Break out array_key_exists tests 2020-12-02 14:42:16 -05:00
Matt Brown
a2b20f094d Fix #4752 - add property base assertions too 2020-12-02 12:43:21 -05:00
Matt Brown
5a200ca442 Fix assertions on unions 2020-12-01 21:12:03 -05:00
Matt Brown
61e374f33b Fix null array access complaints 2020-12-01 20:10:48 -05:00
Matt Brown
0c477da310 Fix test failures 2020-11-25 20:05:09 -05:00
orklah
6f8b463860
Detect trying to access to a list with a negative offset (#4552) 2020-11-15 20:26:50 -05:00
Matt Brown
26b4cd1fb9 Fix #4529 - allow unsetting with complex array key 2020-11-14 08:57:25 -05:00
Matt Brown
324e9d11c3 Fix tests 2020-11-08 11:04:39 -05:00
Matt Brown
462f8ba32b Fix #4397 - allow offsetGet on inside isset 2020-10-25 22:16:43 -04:00
Matt Brown
5743471a19 Don’t merge array and Traversable to iterable when there are intersections 2020-10-12 12:45:31 -04:00
orklah
ead107fa9e
More return types (#4173)
* add native return types

* redundant phpdoc
2020-09-12 11:24:05 -04:00
Brown
c2f492a4ca Add more accomodations for TPositiveInt 2020-09-01 13:03:57 -04:00
Brown
92239add4d Add some backwards-incompatible changes for 4.x 2020-08-30 11:44:14 -04:00
Brown
c0b0036109 Fix #3934 - prevent unsafe use of new static 2020-08-05 19:39:27 -04:00
Brown
42a3cedd31 Fix #3742 - add null to type after possibly null array access 2020-07-05 09:12:07 -04:00
Brown
b84cf74754 Fix #3668 - taint property types for magic properties without @property 2020-06-25 00:24:37 -04:00
orklah
1621a9f3ea
Add checks for duplicated params and returns (#3487) 2020-05-30 16:54:16 -04:00
Brown
640ffdb324 Fix #3323 - make short object-like arrays sealed tuples 2020-05-08 14:36:06 -04:00
Brown
3e0c4cfb75 Fix #3210 - prevent possibly-null array access from destructure 2020-05-02 20:36:41 -04:00
Brown
5bc9b095d1 Allow memoisation of ArrayAccess::offsetGet 2020-04-12 14:43:12 -04:00
Brown
547efcc022 Prevent ArrayAccess on object from being memoised 2020-04-12 14:00:12 -04:00
Matthew Brown
db17c85dd6 Fix #2787 - make accessing undefined objectlike key an error 2020-02-22 00:29:59 -05:00
Brown
0e23fab5d2 Detect bugs similar to that which caused #2832 2020-02-18 12:53:54 -05:00
Brown
6e8088776d Use better return type for SimpleXMLElement::offsetGet 2020-02-18 10:58:56 -05:00
Matthew Brown
966336a475 Improve byref array handling 2020-02-06 23:52:27 -05:00
Matthew Brown
26876b9a13 array_push shouldn’t change list type 2019-12-29 10:20:44 -05:00
Brown
f97a8f0d5b Use more accurate way to determine list size 2019-11-26 16:34:19 -05:00
Brown
589ab5400a Fix ArrayAccess test 2019-11-11 10:48:14 -05:00
lhchavez
216f991b0c Normalize stringified type names (#2239)
This change makes stringified types more normalized. Concretely it sorts
all union types, reconciled types, and sorts the keys within object-like
types.
2019-10-17 01:14:33 -04:00
Matthew Brown
54a31f8cff Be more scrupulous about mixed vars 2019-10-17 00:29:51 -04:00
Brown
e822ec7541 Unsetting list elements should turn to an array 2019-10-09 12:49:31 -04:00