Brown
0fc3398631
Move parsing methods into internal namespace
2020-05-13 19:12:45 -04:00
Brown
d8cd30b34a
Fix #3340 - catch more errors in @method type parsing
2020-05-11 18:39:07 -04:00
Brown
83fe3a2fd9
Complain about malformed @property annotation
2020-04-26 10:10:14 -04:00
Brown
13d9354cde
Fix #3107 - prevent bad @method with dash
2020-04-09 12:16:58 -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
3c9ec90919
Fix deprecated call
2020-04-03 14:56:11 -04:00
Brown
af4a7cabe9
Fix #3057 and add support for @psalm-yield annotation
2020-04-02 22:38:10 -04:00
iggyvolz
94b246b987
Initial commit ( #3013 )
2020-03-24 18:32:57 -04:00
Brown
1e480ade12
Fix bugs
2020-03-24 14:49:05 -04:00
leightonthomas
06f7df9974
Fix #1799 - support trailing commas in type aliases
2020-03-05 15:36:28 -05:00
Matthew Brown
f64cdd2ca2
Fix #2798 - strip out trailing commas in object-like @return types
2020-02-12 09:18:43 -05:00
Matthew Brown
b3f6b56f9c
Add support for @psalm-readonly-allow-private-mutation
2020-02-02 15:56:08 -05:00
Matthew Brown
93fc1b1cc7
Fix #2729 - allow mutation of otherwise-readonly properties
2020-02-02 15:35:12 -05:00
Matthew Brown
d5d4a1826d
Add initial support for @mixin Foo
2020-01-02 23:50:19 -05:00
Matthew Brown
508c2e268a
Process phpstan-template in class docblocks
2019-12-29 16:08:09 -05:00
Matthew Brown
1b54d058aa
Fix #2488 - add support for @phpstan- annotations
2019-12-20 10:49:10 +00:00
Matthew Brown
15cd62d332
Fix #2484 - add support for spaces in assert-if-true types
2019-12-19 19:24:26 +00:00
Brown
2f9b1ff665
Fix too-long line
2019-12-11 11:40:47 -05:00
Brown
e564d67214
Add support for simple default arrays in @method docblocks
...
Fixes #2455
2019-12-11 11:29:00 -05:00
Matthew Brown
d6a731be73
Fix #2441 - add error when @template type is missing
2019-12-08 21:19:29 -05:00
Matthew Brown
baef67e0d8
Fix evaluation order of covariant template params before invariant ones
2019-11-30 01:02:23 -05:00
Brown
78a3894403
Fix Psalm errors
2019-11-21 11:03:18 -05:00
Brown
b29227aaf6
Allow taints to be removed via annotation
2019-10-15 16:25:27 -04:00
Matthew Brown
0ae04c9743
Fix #2148 - support arrays properly
2019-09-21 21:50:11 -04:00
Brown
c5ef2516b5
Fix #2150 - add detection for unnecessary @var annotations
...
And also remove them from codebase
2019-09-19 11:59:43 -04:00
Matthew Brown
78175c9765
Support @psalm-readonly too
2019-09-08 15:12:30 -04:00
Matthew Brown
b61d0c6dcd
Fix #2104 - only treat @method returns as separate if attached to method name
2019-09-07 22:30:09 -04:00
Matthew Brown
dcc4de59df
Change @immutable to @psalm-immutable
2019-08-31 18:43:45 -04:00
Matthew Brown
f20dc16295
Make @immutable work properly
2019-08-31 10:07:23 -04:00
Matthew Brown
7886d5a408
Add support for @psalm-mutation-free annotation on methods
2019-08-31 00:47:12 -04:00
Brown
b7b4baff8f
Add support for @immutable
...
Fixes #1272
2019-08-30 12:36:35 -04:00
Matthew Brown
c5f62d261d
Remove redundant @psalm-suppress in Psalm’s codebsae
2019-08-18 16:10:12 -04:00
Matthew Brown
2a5e0d8f39
Fix #1444 - track unused suppressions
2019-08-18 14:27:50 -04:00
Matthew Brown
2146f73782
Prepare for tracking unused suppressions
...
Ref #1444
2019-08-18 12:25:48 -04:00
Brown
2b2988b072
Fix #2019 - allow union in @throws
2019-08-13 15:44:18 -04:00
Matthew Brown
7ed30cd5b0
Add support for @readonly annotation
2019-08-11 16:01:37 -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
Tyson Andre
5d5a9c6eac
Remove redundant casts and unused use statements ( #1955 )
...
* Remove redundant casts
(not sure about older versions of php-parser)
* Remove unused use statements
2019-07-18 23:37:36 -04:00
Matthew Brown
3df248eea2
Add concept of purity to functions and methods
2019-07-18 01:31:48 -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
e4e48d2d06
Add support for templated @var on return statements
2019-06-26 16:33:43 -04:00
Brown
1864d9a2be
Allow templated @var on return docblocks
2019-06-26 16:26:14 -04:00
Matthew Brown
31c8a2e4d7
Add offsets to type tokenisation
...
Ref #1832
2019-06-22 23:30:40 -04:00
Brown
b12f05185a
Fix #1799 - support trailing commas in object-like docblock types
2019-06-18 17:47:06 -04:00
Matthew Brown
a0866da88e
Strip extranous data
2019-06-16 12:45:02 -04:00
Brown
7a6395490c
Allow @property to contain union types
2019-06-14 10:45:00 -04:00
Brown
b1d1ab974c
Preserve formatting of callable type
2019-06-06 14:27:49 -04:00
Brown
0221282074
Be resilient to docblock spaces
2019-06-06 13:57:00 -04:00
Brown
20422cf223
Fix #1730 - parse @param * $foo
properly
2019-06-03 15:46:25 -04:00