1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00
Commit Graph

6748 Commits

Author SHA1 Message Date
Brown
45ea5d0bfe Add a couple more shortcuts for common pattern
Fixes #3563
2020-06-12 11:18:34 -04:00
Brown
9ca6c868b7 Fix #3563 - add workaround for == true 2020-06-12 10:58:44 -04:00
Brown
8c2f1d7683 Fix capitalisation 2020-06-11 13:40:28 -04:00
Brown
8a0776c8e5 Fix tests 2020-06-11 12:19:34 -04:00
Tim van Dijen
7fa48f3508
Fix return type for preg_grep (#3565) 2020-06-11 11:59:14 -04:00
Brown
f67b61f6cc Fix reconciliation of template param to literal string
Fixes #3510
2020-06-11 11:58:31 -04:00
Brown
16189782ab Inherit whether methods are sealed from parent
Ref #3561
2020-06-11 11:28:41 -04:00
Brown
ec0a4c7c96 Require ReflectionMethod get a class-string 2020-06-11 11:07:57 -04:00
wnbsmart
07c7c30ad6
Pass unused created variable (#3560) 2020-06-10 17:28:04 -04:00
Jáchym Toušek
c6611cfcd1
Update ext-ds stubs (#3559) 2020-06-10 17:27:39 -04:00
Gregor Harlan
235093ecc4
Add PharData::offsetGet/offsetExists to CallMap (#3557) 2020-06-10 17:26:22 -04:00
Brown
5617e9d7c9 Fix array_values call 2020-06-09 19:06:08 -04:00
Brown
286a8f911a Add support for static mixin calls
Fixes #3552
2020-06-09 18:39:52 -04:00
Andrei Petre
2eb0d34696
Fix #3521 - Add --set-baseline filename to --config file if present (#3547) 2020-06-09 09:18:52 -04:00
Joe Hoyle
b9311f62fb
Support global functions in getSymbolInformation and getSymbolLocation (#3477)
* Support global functions in getSymbolInformation and getSymbolLocation

Currently codebase-wide defined function are not found in `Codebase::getSymbolLocation` or `Codebase::getSymbolInformation`. This means hovers via the LSP on functions not in the current file, or "go to definition" do not work for non-locally defined functions.

It looks to me that this might have been an oversight, as methods do support this.

For stubbed functions, "go to definition" will open the stub file, which is also quite hadny.

* No need to catch expections, they are already in a try block.

* Add empty checks returning null

Co-authored-by: Matthew Brown <github@muglug.com>
2020-06-08 11:20:54 -04:00
Brown
a6c0991073 Fix #3532 - expand type alias types recursively 2020-06-07 12:01:04 -04:00
Matthew Brown
91e76f7173 Fix #3536 - Make method return type provider aware of original called method 2020-06-06 23:35:08 -04:00
Matthew Brown
0ac739fd48 Fix #3534 - allow magic method call on mixin 2020-06-06 23:28:32 -04:00
Matthew Brown
739d23e5f0 Use alias 2020-06-06 23:27:25 -04:00
Matthew Brown
3d7288afcb Fix #3529 - static intersected with itself is static 2020-06-06 20:10:50 -04:00
Matthew Brown
ce445636e7 Fix #3535 - match template param class constants properly 2020-06-06 20:02:14 -04:00
Matthew Brown
74a34f066c Don’t check classes if literal strings are allowed
Fixes #3538
2020-06-06 19:31:42 -04:00
Brown
4f87cca55b Fix #3537 - improve parsing for @mixin annotations 2020-06-06 18:15:24 -04:00
Brown
d578c44a37 Add more mocking to tests 2020-06-06 16:57:25 -04:00
Matthew Brown
243c09de37
Make property protected 2020-06-06 12:24:16 -04:00
Matthew Brown
45e831252f
Remove property 2020-06-06 12:23:29 -04:00
Matthew Brown
05962fd51c
Update FakeFileReferenceCacheProvider.php 2020-06-06 12:11:33 -04:00
Matthew Brown
a1fd68975f
Use getinstance shortcut 2020-06-06 12:06:31 -04:00
Brown
831482951a Fix things 2020-06-06 11:23:05 -04:00
Brown
376f761db4 Skip broken test 2020-06-06 10:34:49 -04:00
Brown
fcf0a681d9 Fix #3531 - ignore mixed returns from template 2020-06-06 10:33:49 -04:00
Brown
438eb17e58 Fix #3367 - ensure --diff works after second run, not third 2020-06-05 12:09:38 -04:00
Claas Augner
8638fdc733
Allow composer/semver ^2 || ^3 (#3525) 2020-06-04 17:45:12 -04:00
Brown
cf92361338 Fix #3522 - only use property pass-through when it’s visible 2020-06-04 16:15:07 -04:00
Brown
f6aa9cb11b Relocate tests 2020-06-04 16:07:00 -04:00
Brown
a4aa44494f Fix #3519 - prevent empty callable string 2020-06-04 15:40:53 -04:00
Marco Perone
ca84712ece
add and correct links to how-psalm-works (#3523) 2020-06-04 15:32:18 -04:00
Šimon Podlipský
596213c2c3
Make ext-ds to array return list<V> (#3520) 2020-06-04 09:56:00 -04:00
Matthew Brown
c9ee691595
Fix suppression 2020-06-04 09:55:32 -04:00
Ivan Kurnosov
08943ea409
Fix #3517 - Changed ignoreInternalFunctionFalseReturn default to true (#3518)
In config.xsd and the documentation
2020-06-03 22:29:09 -04:00
Brown
5c80dc3299 Fix #3515 - add merge method to Vector 2020-06-03 16:50:01 -04:00
Brown
fd74d3284d Add support for PHPParser 4.5.0 2020-06-03 14:58:08 -04:00
LeSuisse
1f8dc26d1d
Fix signatures of stream_filter_append and stream_filter_prepend (#3514)
filterparams is not restricted to an array, it is perfectly to pass a
class or any other value.

See https://github.com/php/php-src/blob/php-7.4.6/ext/standard/streamsfuncs.c#L1171
2020-06-03 12:50:40 -04:00
Brown
7caaa64825 Fix #3418 - don’t override with send type when @psalm-yield is given 2020-06-02 13:27:17 -04:00
Brown
4d149de764 Fix #3506 - prevent black classes in throws check 2020-06-01 14:56:27 -04:00
Markus Staab
efcc28be02
Fixed mysql::$insert_id type (#3496)
* Fixed mysql::$insert_id type

* Update PropertyMap.php

* Update src/Psalm/Internal/PropertyMap.php
2020-05-31 18:53:30 -04:00
Brown
be8fd3ea19 Fix #3481 - treat an iterable like a Traversable when comparing to object 2020-05-31 01:22:43 -04:00
Brown
86b894eca5 Treat iterables as traversable when comparing to named object 2020-05-31 00:55:45 -04:00
Brown
c1d8912a9b Bust cache more 2020-05-30 19:11:57 -04:00
Brown
4e21e54ee1 Fix #3491 - provide correct types for substitution 2020-05-30 19:11:41 -04:00