orklah
c2c25ada84
add ArrayAccess to SimpleXmlElement ( #4934 )
...
* add ArrayAccess to SimpleXmlElement
* add test
2021-01-29 11:47:27 +01:00
Matt Brown
f8e22ab7ac
Break out array_key_exists tests
2021-01-29 11:47:12 +01:00
Matt Brown
ace372bfb4
Fix #4752 - add property base assertions too
2021-01-29 11:47:12 +01:00
Matt Brown
2d1222ddec
Fix assertions on unions
2021-01-29 11:47:11 +01:00
Matt Brown
d6b98f2afe
Fix null array access complaints
2021-01-29 11:47:11 +01:00
Matt Brown
ecbb5c77b2
Fix test failures
2021-01-29 11:46:26 +01:00
orklah
2f368244a4
Detect trying to access to a list with a negative offset ( #4552 )
2021-01-29 11:46:11 +01:00
Matt Brown
4fff920952
Fix #4529 - allow unsetting with complex array key
2021-01-29 11:46:10 +01:00
Matt Brown
36af6d70d2
Fix tests
2021-01-29 11:46:05 +01:00
Matt Brown
c16d779bca
Fix #4397 - allow offsetGet on inside isset
2021-01-29 11:44:32 +01:00
Matt Brown
0934988ec7
Don’t merge array and Traversable to iterable when there are intersections
2021-01-29 11:39:52 +01:00
orklah
db45ff1ba4
More return types ( #4173 )
...
* add native return types
* redundant phpdoc
2021-01-29 11:38:57 +01:00
Brown
b94de0c8b8
Add more accomodations for TPositiveInt
2021-01-29 11:38:51 +01:00
Brown
c96ba8d1f5
Add some backwards-incompatible changes for 4.x
2021-01-29 11:38:48 +01: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
Brown
54d5a25077
Remove known array offsets after altering array
2019-10-09 10:36:55 -04:00
Matthew Brown
38de68f507
array_values should preserve array non-emptiness
2019-10-08 22:22:58 -04:00
Brown
16c33d1565
Add support for list type
...
Fixes #2209
2019-10-08 18:44:46 -04:00
Brown
b0aaede9e1
Add support for checking integer array offsets
2019-10-04 11:08:08 -04:00
Matthew Brown
d85fbaec09
Add stricter checks after first isset
2019-10-03 21:34:56 -04:00
Brown
2c9a082b3e
Fix #2172 - only complain about missing offset if it’s really missing
2019-09-25 19:02:49 -04:00
Matthew Brown
9ad6c36d9b
Conditionally verify that array offsets exist ( #2147 )
...
* Check array offsets idea
* Clean up some issues
* Add a few light fixes
* Add docs
2019-09-18 14:21:06 -04:00
Matthew Brown
5d94e340ee
Remove unused suppressions in tests
2019-08-18 15:34:32 -04:00
Matthew Brown
b5eb63bb2d
Revert "Coerce value with array-offset to array|ArrayAccess"
...
This reverts commit a8a67bc7e7
.
2019-08-07 00:36:45 -04:00
Matthew Brown
a8a67bc7e7
Coerce value with array-offset to array|ArrayAccess
...
Fixes #1986
2019-08-07 00:31:53 -04:00
Matthew Brown
da42be175f
Apply PHPCS fixes
...
Fixes #1880
2019-07-05 16:27:53 -04:00
LeSuisse
f29826b958
Fully qualify constants and function calls ( #1849 )
...
This should give a small performance boost.
Part of #1837 .
The change is enforced via phpcs and can be autofixed
with phpcbf.
2019-06-26 16:52:29 -04:00
Brown
7b4dbb1c85
Fix #1826 - don’t allow mixed unions when combining with object-like array
2019-06-20 20:13:36 -04:00
Matthew Brown
53506fb879
Fix #1770 - fix notice that should not be
2019-06-12 09:13:59 -04:00
Matthew Brown
c38108f95d
Fix byref array assignment
...
Fixes #1702
2019-06-08 10:32:46 -04:00
Brown
81b6a6f496
Support assertions on class constants
2019-05-28 12:31:46 -04:00
Matthew Brown
518330dcf4
Fix class constant assertions on self/static
2019-05-27 13:33:14 -04:00
Matthew Brown
97eab1a2e6
Fix bad string key assertion
2019-05-27 10:10:21 -04:00