1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-14 10:17:33 +01:00
Commit Graph

8168 Commits

Author SHA1 Message Date
orklah
c3ad520b1b
Merge pull request #7110 from AndrolGenhald/bugfix/stub-parent-class
Fix stub parent class not loaded.
2022-01-22 21:17:07 +01:00
orklah
2d8ef787f3 remove files that were wrongly reintroduced 2022-01-22 21:14:05 +01:00
AndrolGenhald
3510f55e31 Check for indirect circular dependencies with stubbed parents. 2022-01-22 13:56:10 -06:00
AndrolGenhald
9a064c04cf Fix invalid trailing comma. 2022-01-22 13:56:10 -06:00
AndrolGenhald
2262cb65d3 Check for circular references with stubbed classes. 2022-01-22 13:56:08 -06:00
AndrolGenhald
db67d2c6e8 Add support for checking parent classes and interfaces from stubs. 2022-01-22 13:54:42 -06:00
orklah
0e891f25ad refactor description of types in Atomic 2022-01-22 19:34:57 +01:00
orklah
841d4f4429 improve support for enum_exists 2022-01-22 18:27:24 +01:00
orklah
070a1cc7a3 fix merge induced errors 2022-01-22 18:05:32 +01:00
orklah
af1888b631 Merge remote-tracking branch 'upstream/4.x' into upstream-master4 2022-01-22 17:48:42 +01:00
orklah
d1a946c221
Merge pull request #7454 from petewalker/feat/native-intersections
feat: Handle native intersection types
2022-01-22 11:18:54 +01:00
Pete Walker
be6ce777ff
chore: Better exception messages 2022-01-22 10:12:48 +00:00
Pete Walker
057a99c9f1
fix: Tests / minor bug 2022-01-22 00:00:45 +00:00
Pete Walker
41a3807693
fix: Lint issue 2022-01-21 17:39:01 +00:00
Pete Walker
299eca4daa
fix: Add PHP version checks / more tests 2022-01-21 17:31:48 +00:00
Toon Verwerft
6b789bb5a7 [TypeProvider] Provide argument types during FunctionParamsProviderEvent 2022-01-21 16:32:40 +01:00
Pete Walker
a3bdf1ba8c
feat: Handle native intersection types
Adds native intersection type handling to psalm, removing the previous `UnexpectedValueException`.

Where an intersection is found in the parse tree, the types are resolved using the existing `Type::intersectUnionTypes` function, which I assume is being used when they're encountered in the existing docblock annotations.

I've added a handful of tests to cover this, but they're certainly not exhaustive. Are there any specific edge cases I should target?

This change feels way too simple... so apologies if I've missed something fundamental..!
2022-01-21 12:59:55 +00:00
orklah
35577dfd28 fix typo 2022-01-21 00:29:22 +01:00
orklah
f9b26acf6e Array key exists assert both ways 2022-01-21 00:26:37 +01:00
orklah
f9e392316f remove unused imports 2022-01-21 00:17:06 +01:00
orklah
fe9d3f02a8 nitpicks 2022-01-20 23:47:41 +01:00
Matthew Brown
0a81f8cd6c
Use objects, not strings, for assertions (#7410)
* Use objects, not strings, for assertions

* Remove unnecessary param

* Remove some unnecessary checks

* Fix bad find/replace

* Add note about assertions no longer stored as strings in UPGRADING.md
2022-01-20 17:33:06 -05:00
orklah
6f1a5e8a47
Merge pull request #7417 from klimick/partially-applied-closure-inference
Contextual type inference for high order function arg
2022-01-20 21:03:46 +01:00
orklah
2f052a8781
Merge pull request #7437 from orklah/mb_internal_encoding
create a return type provider for mb_internal_encoding
2022-01-20 20:51:08 +01:00
orklah
2aeaadee5b
Merge pull request #7442 from M1ke/m1ke/config-threads
Allow config to define thread count
2022-01-20 19:39:00 +01:00
Matthew Brown
1ff3161584 Remove array_unique call 2022-01-20 11:36:18 -05:00
Matthew Brown
70479444e3 Remove untested likely-unnecessary code 2022-01-20 11:29:36 -05:00
Matthew Brown
473631fb34 Remove unused & untested code in AlgebraAnalyzer 2022-01-20 11:16:33 -05:00
m1ke
6107148fce Alter order of precedence and upated docs to match 2022-01-20 15:24:21 +00:00
m1ke
0dc4249d43 Fix phpcs 2022-01-20 10:09:15 +00:00
m1ke
2fdae4ae16 Use config threads if lower than detected threads 2022-01-20 09:50:01 +00:00
m1ke
1b8f337748 Allow psalm to load threads from the config 2022-01-20 09:49:45 +00:00
orklah
ac858e353d create a return type provider for mb_internal_encoding 2022-01-19 21:45:44 +01:00
orklah
5a6dccd4a9
Merge pull request #7420 from orklah/remove-old-things
Remove forbidEcho
2022-01-19 20:32:19 +01:00
orklah
bbfdd57d5c
Merge pull request #7363 from zoonru/81_returntypewillchange
PHP 8.1: Report missing typehints in overridden native methods
2022-01-19 20:31:54 +01:00
Vincent
f7252417e4 Fix typing (ref #7430) 2022-01-19 13:49:41 +01:00
1914be4ca1
Rollback 2022-01-19 12:44:55 +01:00
38945018f5
Run analysis on all PHP versions 2022-01-19 12:39:08 +01:00
d970661182
Add separate issue 2022-01-19 12:20:50 +01:00
e54d666a2e
cs-fix 2022-01-19 12:06:38 +01:00
d8be15a83d
More legacy php changes 2022-01-19 12:06:38 +01:00
c98930d6ce
Fix syntax 2022-01-19 12:06:38 +01:00
cee9eb0ead
PHP 8.1: Report missing typehints in overridden native methods 2022-01-19 12:06:35 +01:00
Vincent
7b25ca75f4 Resolve generics of inherited pseudo methods (fix #7419) 2022-01-19 11:45:19 +01:00
adrew
5fb1df8de7 Fix psalm issues in CallableTypeComparator 2022-01-19 00:48:50 +03:00
adrew
7e623ed48e Upcast invokable to callable during hof arg analysis 2022-01-19 00:37:05 +03:00
adrew
fca72ee151 Fix psalm issues 2022-01-18 22:05:32 +03:00
orklah
477c0113c2 Merge remote-tracking branch 'upstream/4.x' into upstream-master3 2022-01-18 18:37:04 +01:00
orklah
dceaa117cf remove forbidEcho 2022-01-18 18:25:18 +01:00
orklah
5f749c8a33 remove forbidEcho 2022-01-18 18:14:39 +01:00