1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00
Commit Graph

41 Commits

Author SHA1 Message Date
orklah
6e3546d900
return types (#4311)
* return types

* remove willReturn for void methods
2021-01-29 11:39:53 +01:00
Matt Brown
ca03d84776
Remove by-ref 2021-01-29 11:39:48 +01:00
Matt Brown
67d995b67f
4.x - Prevent AfterFunctionCallAnalysisInterface from rewriting return types 2021-01-29 11:39:47 +01:00
Bruce Weirdan
ecec9dd040
Fixes crash due to class/filename mismatch (#4247)
Introduced in 56cddd16bf
2021-01-29 11:39:43 +01:00
orklah
e3e5a55907
unused use statements (#4228) 2021-01-29 11:39:42 +01:00
Bruce Weirdan
4319132057
Added @psalm-stub-override for classlikes and methods (#4177)
Fixes vimeo/psalm#1252
2021-01-29 11:39:34 +01:00
orklah
db45ff1ba4
More return types (#4173)
* add native return types

* redundant phpdoc
2021-01-29 11:38:57 +01:00
orklah
1348e61afb
add native param types (#4137)
* add native param types

* redundant phpdoc

* add more param types and adds "?" to nullable types

* remove redundant phpdoc

* add more param types and remove redundant phpdoc

* add more param types and remove redundant phpdoc
2021-01-29 11:38:54 +01:00
orklah
becac547fb
Short list syntax (#4102)
* Short list syntax

* revert unrelated CS
2021-01-29 11:38:52 +01:00
Brown
209d17c868 Fix #2891 - treat autoloaded constants better 2020-08-13 09:14:27 -04:00
Toshiyuki Goto
e0d1655582
Add an unqualified classes in PHPUnit/Framework/Assert/Functions.php to $knownBadClasses (#3985) 2020-08-11 07:33:11 -04:00
Matthew Brown
73321339a3 Bump nikic/php-parser 2020-08-09 16:23:43 -04:00
Bruce Weirdan
56047dd094
Use composer/package-versions-deprecated instead of ocramius/package-versions (#3846)
It allows wider range of PHP versions in addition to supporting both
Composer v1 and v2

Fixes vimeo/psalm#3844
2020-07-20 04:53:16 -04:00
Bruce Weirdan
931d35a703
Collect and scan files included by the autoloaders (#3183)
Refs vimeo/psalm#2861
2020-07-11 17:17:22 -04:00
Brown
a5da803a21 Fix test to work better 2020-07-08 17:42:19 -04:00
Brown
831482951a Fix things 2020-06-06 11:23:05 -04:00
Brown
438eb17e58 Fix #3367 - ensure --diff works after second run, not third 2020-06-05 12:09:38 -04:00
Matthew Brown
43189b3d55 Allow types to be traversed 2020-03-14 23:54:51 -04:00
Matthew Brown
2e6fe993a8 Fix #2890 - phpstorm.meta.php scanner should be insensitive to method names 2020-03-01 17:11:44 -05:00
Matthew Brown
ced092874a Make config generation smarter 2020-02-17 22:05:58 -05:00
Philip Hofstetter
f6983fd883 allow setting php version from config or composer.json
if a composer.json is present and a PHP version requirement is
configured, we set the php version to the minimal PHP version that
satisfies the composer requirement.

Additionally, this adds a `phpVersion` attribute to the <psalm> tag. If
that's set, it takes precedence over what has been detected in
composer.json.

And finally, the --php-version command line flag continues to work and
takes precedence over the setting in the <psalm> tag

this fixes #2628
2020-01-30 08:48:53 -05:00
Bruce Weirdan
17857163fc Modular config files (#2635)
This change introduces an option to have the configuration split across
several files using standard XInclude tags. This may be useful for more
complex configs, or to include auto-generated parts into a manually
written config file.
2020-01-16 15:57:52 -05:00
Тальгат Хайруллов
39a822759d #2579 TooManyArguments was triggered if the variadic function declared at the autoloader file. Fixed. (#2580) 2020-01-12 11:33:38 -05:00
Bruce Weirdan
9027bc6190 Added SuicidalAutoloader test (#2399)
The idea behind this is that Psalm should not use project autoloader for
its own things. So if we have a project with autoloader and no code,
then any project autoloader hit means Psalm failed to load something
itself.

Right now it highlights several issues in CoreGenericClasses stub:
- usage of `callback` instead of `callable`
- `@property-read` not resolving template parameters
2019-11-30 00:09:07 -05:00
Brown
aa5d82d30d Fix #2228 - load functions defined on traits included in a class 2019-10-15 12:09:08 -04:00
Matthew Brown
0b4981f01b Fix #1551 - do better at inferring class constant types 2019-09-14 14:26:31 -04:00
Brown
12eeb8b320 Fix #1935 - clear stub grandchildren 2019-07-11 18:23:02 -04:00
Brown
7d05568e22 Add skipped test for broken stubbing behaviour
Ref #1935
2019-07-11 12:51:43 -04:00
Matthew Brown
da42be175f Apply PHPCS fixes
Fixes #1880
2019-07-05 16:27:53 -04:00
Matthew Brown
802016757c Fix #1891 - don’t enter class_alias if the class doesn’t exist 2019-07-04 15:46:24 -04:00
Matthew Brown
ca53019d6b Simplify class completion lookup
Ref #1822
2019-06-29 21:32:26 -04:00
Brown
6514f2084c Fix #1860 - be less restrictive about class_exists checks 2019-06-28 10:17:59 -04:00
Barney Laurance
4c57c67e2f Add end to end tests that invoke psalm as a separate process (#1798)
* Add end to end tests that invoke psalm as a separate process

* Assert that psalm --init creates config file
2019-06-16 15:56:00 -04:00
Matthew Brown
158a2150a7 Fix #1752 - don’t enter if/else when class/interfaces/functions don’t exist 2019-06-09 23:50:28 -04:00
Brown
e85794038f Fix #1704 - improve type coercion complaints 2019-05-29 14:22:15 -04:00
Brown
f336720e06 Fix vendor path 2019-05-29 11:58:58 -04:00
Matthew Brown
11509cdc10 Remove ignored symlink 2019-05-23 22:31:54 -04:00
Brown
30cbcb6c36 Add ImplementedParamTypeMismatch issue
Fixes #1633
2019-05-14 15:44:46 -04:00
Matthew Brown
307cdbbbb3 Fix #1626 - detect dead code found in #1624 2019-05-12 20:49:37 -04:00
Brown
335b04186b Add autodiscovery of --init folders based on composer.json 2019-05-09 19:19:33 -04:00
Brown
d75ac7f55d Move test fixtures to a single directory 2019-05-09 18:23:14 -04:00