Brown
35d376cbe7
Fix #3164 - allow nested templates in conditional classes
2020-04-17 00:46:27 -04:00
lhchavez
be87bb7300
Support intersection types for object-like arrays ( #3064 )
...
This change allows expressing the intersection of multiple object-like
arrays. The resulting type will contain the (merged via intersection)
properties of all the object-like arrays involved in the intersection.
This should allow to express the resulting type of an `array_merge()`
operation, which is tricky to do in the context of a templated type.
2020-04-08 09:35:53 -04:00
Brown
41b165c096
Remove stray comma
2020-04-07 11:17:52 -04:00
Brown
067104e170
Fix #3084 - keep track of upper and lower bounds of inferred template types
2020-04-07 00:13:56 -04:00
Brown
f3d278609e
Remove blank line
2020-04-04 10:14:32 -04:00
Brown
eef4feea0b
Throw TypeParseTreeException if template type not recognised
2020-04-04 09:26:19 -04:00
Brown
e3ff856cac
Improve treatment of static in intersection
2020-03-27 19:17:44 -04:00
Brown
467da32f84
Fix instanceof static and isa (static::class) handling
2020-03-24 18:58:15 -04:00
Matthew Brown
6058725256
Add prototype for conditional return type
2020-03-22 10:44:48 -04:00
Matthew Brown
0aca01faea
Improve fix to #2805
2020-03-14 01:09:12 -04:00
Brown
3c416482ec
Fix #2932 - don’t crash when trying to expand callable object-like array
2020-03-09 10:56:37 -04:00
Matthew Brown
202fb7026a
Convert explicit array<mixed, ...> to array<array-key, ...>
2020-02-22 11:04:58 -05:00
Brown
bba44e5354
Add interpolation support
2020-02-13 17:37:52 -05:00
Matthew Brown
07a53f6b81
Fix #2789 - Numeric should not be a reserved class name
2020-02-11 22:34:34 -05:00
Brown
d5f71bf529
Localise template checks to class being tested
2020-02-06 16:38:45 -05:00
Matthew Brown
f981c61990
Add slashes
2020-02-02 11:04:29 -05:00
Matthew Brown
b67f661604
Fix #2735 - interpret template check in context of class-string generation
2020-02-02 10:51:18 -05:00
Matthew Brown
5eb2ebc508
Add more type-system protections for bad array args
2020-01-29 23:41:17 -05:00
Matthew Brown
8ccd4860e3
fclose should treat resource as passed-by-reference
2020-01-17 13:12:00 -05:00
Brown
03030d4887
Fix #2583 - don’t convert scalar terms in @method annotations
2020-01-10 11:29:18 -05:00
Matthew Brown
9fa2db1b6c
Move Union::getTypes to Union::getAtomicTypes
2020-01-04 12:20:26 -05:00
Matthew Brown
16b8edd583
Fix #2409 - use more robust assertion parsing
2019-12-31 09:10:14 -05:00
Matthew Brown
79be178146
Add associative-array as an alias of array
2019-12-30 17:01:10 -05:00
Matthew Brown
55c2f7faa2
Fix #2508 - don’t replace templated types with generic ones inside own function
2019-12-28 18:38:02 -05:00
Matthew Brown
068afa09d3
Add very basic implementation for class-string-map
...
Fixes #1969
2019-12-27 12:49:28 -05:00
Matthew Brown
2f2cd85a6a
Identify invalid static property array assignment
2019-12-27 10:34:51 -05:00
Matthew Brown
a4191171bf
Fix #2483 - treat intersecting PHPDocs from interfaces better
2019-12-20 01:42:57 +00:00
Matthew Brown
ab03ac06f4
Add support for spread operator before type as well
...
Ref #2429
2019-12-19 00:29:01 +00:00
Brown
6d02aa86e8
Reconcile string emptiness a bit better
2019-12-13 15:51:54 -05:00
Brown
79f3a5d371
Allow empty string parsing
2019-12-11 10:52:46 -05:00
Brown
af63f87689
Fix dumb;
2019-12-09 17:42:22 -05:00
Brown
c8d8244e73
Fix copy/paste snafu
2019-12-09 17:35:50 -05:00
Brown
aaffdbc79f
Add support for non-empty scalar
...
Ref #2449
2019-12-09 17:06:10 -05:00
Brown
78a3894403
Fix Psalm errors
2019-11-21 11:03:18 -05:00
Brown
06653f6322
Fix #2362 - support single value type in docblocks
2019-11-21 10:44:24 -05:00
Matthew Brown
2369bac943
Preserve self refs where possible
2019-11-16 19:59:08 -05:00
Jáchym Toušek
f2c82fa212
Add support for Iterator<X> type ( #2285 )
...
* Add support for Iterator<X> type
* Fix tests
2019-10-30 18:00:27 +00:00
Matthew Brown
1d6ca9bd7d
Allow callable-array type in docblocks
2019-10-20 15:33:57 -04:00
Brown
67b32f463e
Support assertions on lists
2019-10-10 10:57:43 -04:00
Matthew Brown
51cfd556d6
Add non-empty-list support
2019-10-08 22:53:55 -04:00
Brown
16c33d1565
Add support for list type
...
Fixes #2209
2019-10-08 18:44:46 -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
900cfc0f05
Improve handling of external-mutation-free objects created in pure functions
2019-08-31 09:49:32 -04:00
Matthew Brown
b4213a9035
Don’t lower-case resource when converting ( #2063 )
2019-08-25 13:02:58 -04:00
Brown
bdac01582d
Fix #1989 - support fully-qualified params in @method annotations
2019-08-08 17:25:56 -04:00
Matthew Brown
b2c0993cdc
Add framework for taint analysis to Psalm
...
Ref #611
2019-08-04 10:37:36 -04:00
Jeffrey Yoo
73a6fbe557
catch cases of invalid use of backslash ( #1983 )
2019-08-01 16:10:12 -04:00
Brown
9aa0fd022c
Fix potential coercion gotcha
2019-07-10 14:48:15 -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