1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-11 16:59:45 +01:00
Commit Graph

69 Commits

Author SHA1 Message Date
kkmuffme
8efbf386c3 fix bad class 2024-03-19 21:17:26 +01:00
kkmuffme
ea825c626d Explicitly set value in config to fix warning in tests 2024-03-19 21:06:20 +01:00
3b66272aa0 More rector fixes 2023-10-21 20:45:09 +02:00
kkmuffme
b4126326eb make stubbed constant types configurable with comment
Fix https://github.com/vimeo/psalm/issues/4024
2023-07-03 22:28:25 +02:00
orklah
8e636086b3
put config to true to prevent deprecations for new config files (#9857)
* put config to true to prevent deprecations for new config files
2023-06-19 22:02:29 +02:00
kkmuffme
51fd63cfbb fix CI warnings 2023-06-13 16:59:25 +02:00
kkmuffme
08d515d7af don't autoload AllowDynamicProperties 2023-06-07 08:41:44 +02:00
kkmuffme
ed9fbab1c4 don't autoload Mockery/Closure 2023-06-07 08:31:53 +02:00
shvlv
d6aff3ed20
Parse class constant for PhpStorm Meta override 2023-01-24 12:24:52 +02:00
Bruce Weirdan
de96494fee
Allow omitting argument offsets for map-type overrides in phpstorm.meta
Fixes vimeo/psalm#8758
2022-11-27 16:36:34 -04:00
748a74bb2c Merge remote-tracking branch 'origin/4.x' into HEAD 2022-10-16 13:41:27 +02:00
kkmuffme
5c39e66b15 fix tests 2022-09-15 19:38:51 +02:00
orklah
fac55576ab Merge remote-tracking branch 'upstream/4.x' into upstream-master7 2022-02-12 09:59:55 +01:00
orklah
24ae96b373 remove usage of totallyTyped internally 2022-02-12 09:51:06 +01:00
AndrolGenhald
3510f55e31 Check for indirect circular dependencies with stubbed parents. 2022-01-22 13:56:10 -06:00
AndrolGenhald
c24cf9aa8c Add test for circular reference with stub class. 2022-01-22 13:54:44 -06:00
Bruce Weirdan
d19aad7db1
Display target PHP version
Historically it was often not quite clear to users what PHP version
Psalm assumes, and why. This PR addresses this issue by printing the
version and where we got it from right before scanning the files.
2021-11-27 02:18:09 +02:00
Matt Brown
ae1fd44b13 Resolve build issues 2021-03-22 19:37:49 -04:00
AndrolGenhald
45694d37d4
Fix composer major.minor version detection (fixes #5415) (#5416)
* Fix composer major.minor version detection (fixes #5415)

* Add PHP 8 polyfill dependency.

* Fix version check.
2021-03-18 09:42:01 -04:00
Bruce Weirdan
205fdd197e
Wrap entrypoints into IIFE to protect their variables (#5366)
* Wrap entrypoints into IIFE to protect their variables

Fixes vimeo/psalm#5359

* Add tests for Psalm variable isolation

* Capture environment before registering autoloader
2021-03-11 00:14:22 -05:00
Bruce Weirdan
65f0fb0288
Allow multiple version-dependent method stubs (#5337)
Fixed vimeo/psalm#4836
2021-03-06 17:18:51 -05:00
Bruce Weirdan
beca4a127f
Suppress test issues with Symony functions used with ::class constant (#5335)
These appeared in symfony/symfony#40203
2021-03-06 15:29:15 -05:00
Vincent Langlet
a80d5b736b
Rename stub to avoid phpstorm conflict (#5213) 2021-02-13 18:42:34 -05:00
Adrien LUCAS
6f1f680b2d
Add option to dump taint graph (#5080)
* Add option to dump taint graph

* Fix types

* Simplify types

Co-authored-by: Matthew Brown <github@muglug.com>
2021-01-22 16:04:15 -05:00
orklah
f9fccb2b2d
implement DTO for plugins (#4881)
* implement DTO for plugins

* introduce EventHandler + reintroduce legacy API for plugins
2021-01-06 09:05:53 -05:00
Bruce Weirdan
c27cd3d472
Fix windows builds (#4775)
* Choco now offers PHP 8 only

* Bump build deps to allow PHP 8 builds

* Bump slevomat

* Disable coverage to allow paratest

* Bump dummy project version to allow testing on PHP 8
2020-12-04 15:11:14 -05:00
Matt Brown
27d928b684 Add failing testcase for #4705 2020-12-01 10:26:45 -05:00
Matt Brown
8799e1a337 Break apart complex method 2020-11-09 00:58:45 -05:00
orklah
10f2966dcb
return types (#4311)
* return types

* remove willReturn for void methods
2020-10-12 15:02:52 -04:00
Matt Brown
bf98e5b30c Remove by-ref 2020-10-05 09:16:01 -04:00
Matt Brown
ea47548dd0 4.x - Prevent AfterFunctionCallAnalysisInterface from rewriting return types 2020-10-04 23:39:20 -04:00
Bruce Weirdan
d9776aa710
Fixes crash due to class/filename mismatch (#4247)
Introduced in 56cddd16bf
2020-09-26 13:31:38 -04:00
orklah
37a2f8a33d
unused use statements (#4228) 2020-09-22 01:10:46 -04:00
Bruce Weirdan
cd110c7e2f
Added @psalm-stub-override for classlikes and methods (#4177)
Fixes vimeo/psalm#1252
2020-09-13 16:40:31 -04:00
orklah
ead107fa9e
More return types (#4173)
* add native return types

* redundant phpdoc
2020-09-12 11:24:05 -04:00
orklah
8c7423505a
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
2020-09-06 19:36:47 -04:00
orklah
73f6fcde48
Short list syntax (#4102)
* Short list syntax

* revert unrelated CS
2020-09-02 00:17:41 -04: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