1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-15 10:57:08 +01:00
Commit Graph

74 Commits

Author SHA1 Message Date
Brown
9935f647ab Fix some magic method calls when a return type provider exists 2020-08-31 18:56:45 -04:00
Brown
92239add4d Add some backwards-incompatible changes for 4.x 2020-08-30 11:44:14 -04:00
Brown
76bd5b6278 Refactor type comparison 2020-07-21 19:40:35 -04:00
Brown
7c7ebd068f Make invalidation more robust 2020-07-03 12:59: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
Matthew Brown
427f470806 Fix #3586 - ensure templated trait params more accurate 2020-06-13 16:37:39 -04:00
Matthew Brown
739d23e5f0 Use alias 2020-06-06 23:27:25 -04:00
Brown
118b700436 Simplify sink mapping for internal calls 2020-05-25 13:10:06 -04:00
Brown
6fc18af42e Fix #3163 - map object-like arrays too 2020-04-19 18:46:24 -04:00
Brown
2188b6736f Fix #3162
Descend into inherited templates to prevent function-defined templates mapping inappopriately
2020-04-19 12:19:39 -04:00
Brown
5db9f0e8c0 Fix #2722 - change behaviour to inherit params to match just on position
And not name + position
2020-04-08 00:54:17 -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
72104a52ad Improve file invalidation when using --diff mode 2020-04-02 17:18:04 -04:00
Brown
971ae50bea Do prep work for #3024 - improve handling of absent class references 2020-03-26 12:35:27 -04:00
Matthew Brown
311bd19a6a Fix #2983 - inherited lists should have their template types localised 2020-03-18 16:23:09 -04:00
Matthew Brown
50eb12e562 Fix implementation kink 2020-03-15 16:14:09 -04:00
Matthew Brown
3339c12179 Temp, slightly hacky fix 2020-03-15 16:00:15 -04:00
Matthew Brown
532ce576cc Fix #2974 - interpret interfaces a little better 2020-03-15 15:49:13 -04:00
Matthew Brown
766effb0db Improve accuracy of diff generation 2020-03-06 13:48:59 -05:00
Matthew Brown
f3d7ed6de7 Remove var_dump 2020-03-06 13:15:52 -05:00
Matthew Brown
7f9e6b893e Increase processor consumption 2020-03-06 13:13:18 -05:00
Matthew Brown
dc74f2b4de Add specific cast 2020-03-06 13:05:55 -05:00
Matthew Brown
10b807b4f6 Fix reference generation from methods in --diff mode 2020-03-06 13:02:34 -05:00
Brown
548d9fca2c Add references to property-defining classes 2020-02-26 16:49:14 -05:00
Matthew Brown
653353709a Use MethodIdentifier object instead of string 2020-02-14 20:54:26 -05:00
Matthew Brown
477d38e6eb
Suppress issue 2020-02-13 18:20:24 -05:00
Brown
210d65d0d6 Add a few lowercase-string types 2020-02-13 17:52:23 -05:00
Matthew Brown
9fa2db1b6c Move Union::getTypes to Union::getAtomicTypes 2020-01-04 12:20:26 -05:00
Brown
5f5a942a32 Improve handling of interface-implementing edge-case 2020-01-02 15:24:03 -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
a4191171bf Fix #2483 - treat intersecting PHPDocs from interfaces better 2019-12-20 01:42:57 +00:00
Matthew Brown
3ef93fd795 Add slash 2019-12-15 13:34:12 -05:00
Matthew Brown
090ad90de3 Fix build issues 2019-12-15 13:28:38 -05:00
Matthew Brown
72f3c306d7 Fix #2471 - don’t erroneously template class-strings 2019-12-15 13:23:04 -05:00
Brown
1f07ea7ee7 Tighten up Psalm’s inference 2019-11-25 15:20:31 -05:00
Brown
0bcb7863f3 Use better system for storing inferred types and assertions 2019-11-25 11:44:54 -05:00
Matthew Brown
3d9c94e29a Fix #2363 - catch possible class not found errors when getting method 2019-11-21 08:56:47 -05:00
Matthew Brown
5910a362ea Improve report output of taint analysis 2019-10-19 17:59:10 -04:00
Brown
94001aad4a Fix #2208 - handle templated property types appropriately 2019-10-04 13:51:36 -04:00
Brown
d6e084ec9c Remove false-positive for callmap function arg 2019-08-13 14:53:31 -04:00
2e3s
f15cc7dd5b Mark private properties unused when referenced only in constructor (#1962)
* Mark private properties unused when referenced only in constructor

If a private property is used only in constructor then most likely
it's a dead code since there is no need to have the class property.
But such static properties can be accessed between the calls.

* Ignore the private property issue on alter

* Fix the related dead code psalm

* Add a missing condition into the test
2019-07-21 23:29:16 -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
Matthew Brown
c0b86bd40d Use uppercase template_type_extends keys 2019-06-24 23:43:04 -04:00
Brown
69b05f5052 Improve handling of parent method calls 2019-06-24 17:45:10 -04:00
Matthew Brown
2d5f332ebf Fix #1781 by improving handling of callmap options 2019-06-15 16:10:48 -04:00
Brown
9c4599a0f0 Add better support for inheriting docblocks 2019-06-11 11:19:57 -04:00
Marco Pivetta
624c7bc6fb Renamed Fn to TFn to allow for PHP 7.4 compatibility 2019-06-03 08:21:25 -04:00
Matthew Brown
c356c452ec Fix #1692 - allow magic annotations on all interfaces without config flag 2019-05-26 23:35:03 -04:00
Matthew Brown
a3a208a7c9 Remove unused variables 2019-05-12 23:13:27 -04:00