Brown
92239add4d
Add some backwards-incompatible changes for 4.x
2020-08-30 11:44:14 -04:00
Brown
cf5aa5c5cd
Fix #4083 - namespace docblock method classes the proper way
2020-08-29 11:46:24 -04:00
Matthew Brown
ef0486ce35
Add some pure annotations
2020-08-23 13:52:31 -04:00
Bruce Weirdan
7adc25c421
Improve import errors ( #3997 )
...
* Better errors for invalid type imports
Fixes vimeo/psalm#3885
* Finishing touches
Docs, schema, CS
* Drop unused import
* Drop more unused imports
2020-08-16 22:53:53 -04:00
Matthew Brown
72ecb57def
Improve names of things
2020-08-14 00:27:33 -04:00
Matthew Brown
6085e42fc1
Detect mismatching param names effectively
2020-08-10 09:58:43 -04:00
Matthew Brown
73321339a3
Bump nikic/php-parser
2020-08-09 16:23:43 -04:00
Brown
c0b0036109
Fix #3934 - prevent unsafe use of new static
2020-08-05 19:39:27 -04:00
Daniel Melchior
fa73c7c9d9
Fix #3757 - allow multiple mixins ( #3772 )
2020-08-05 15:49:19 -04:00
Brown
42ad366dc8
psalm-internal no longer requires internal annotation
...
cc @bdsl
2020-07-26 10:47:48 -04:00
Brown
76bd5b6278
Refactor type comparison
2020-07-21 19:40:35 -04:00
Brown
42a3cedd31
Fix #3742 - add null to type after possibly null array access
2020-07-05 09:12:07 -04:00
Olle Härstedt
d8e8ce428e
Add new annotation: @psalm-self-out ( #3650 )
...
* Add new config: sealAllMethods
* Add some more tests
* Fix codesniffer issue with preg_quote
* Fix missing method in test
* New tag @self-out (WIP)
* Add self_out_type to method storage
* Add some notes
* More work on self-out (WIP)
* More work on self-out (WIP)
* Use psalm-self-out instead of self-out
* Remove extra file
* Cleanup
* Wrap around try-catch - how to check if a method has/should have storage?
* New method hasStorage()
* Fix indentation
* Fix some errors
* Fix indentation
* Cast storage type to type
* Add proper use-statement in method storage
* Correct test class name
* Allow self_out to be null
* method_id can be string (why, when?)
Co-authored-by: Olle <noemail>
2020-07-01 18:10:24 -04:00
Brown
4c368da75e
Fix #3721 - prevent crash on empty @method
2020-07-01 09:00:33 -04:00
Brown
e8be2c500e
Support taint flows in more functions
2020-06-22 17:53:03 -04:00
Brown
fbe3433edd
Use escape terminology
2020-06-21 11:43:08 -04:00
Brown
dc83c2e2fc
Add annotation for taint sources
2020-06-21 00:58:56 -04:00
Brown
2c5c9e95e1
Don’t add two @return docblocks after @method
2020-06-20 15:30:47 -04:00
Brown
edbeec2c6a
Fix @method annotation namespacing
2020-06-20 15:18:22 -04:00
Brown
8f2e28c36b
Improve tainting of specializable classes
2020-06-19 01:22:51 -04:00
Andrei Petre
3497ca07b6
Extending final class is prohibited #3037 ( #3576 )
2020-06-13 00:29:59 -04:00
Brown
a6c0991073
Fix #3532 - expand type alias types recursively
2020-06-07 12:01:04 -04:00
Brown
4f87cca55b
Fix #3537 - improve parsing for @mixin annotations
2020-06-06 18:15:24 -04:00
orklah
1621a9f3ea
Add checks for duplicated params and returns ( #3487 )
2020-05-30 16:54:16 -04:00
Brown
30907f0269
Clean up comment parsing
2020-05-28 22:14:41 -04:00
Brown
b932163d5d
Make parser a little cleaner
2020-05-28 14:31:17 -04:00
Brown
a2b6326a84
Change specialize-call to taint-specialize
2020-05-26 14:18:43 -04:00
Brown
e72288c85f
Don’t error on badly-formatted taint annotation
2020-05-22 22:38:03 -04:00
Brown
8632cdb3cd
Improve taint tracking during scanning phase
2020-05-22 12:33:48 -04:00
Matthew Brown
187b944680
Add faster taint analysis
2020-05-22 12:33:29 -04:00
Brown
2d92943625
Add support for expansion of type aliases
2020-05-15 00:15:48 -04:00
Brown
006c6e09f1
Add more details to type alias creation
2020-05-14 00:41:50 -04:00
Brown
190c9ce27e
Use TypeAlias object to allow future extension
2020-05-13 19:29:59 -04:00
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