orklah
a7b72b865f
remove TPositiveInt usage for TIntRange
2022-01-23 22:04:18 +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
AndrolGenhald
2f2c24cb4f
Add reproducer for stub parent class not being loaded.
2022-01-22 13:30:10 -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
057a99c9f1
fix: Tests / minor bug
2022-01-22 00:00:45 +00:00
Pete Walker
299eca4daa
fix: Add PHP version checks / more tests
2022-01-21 17:31:48 +00: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
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
eb53f7e99c
fix tests
2022-01-20 22:18:03 +01: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
Alberto Piai
9b22d63c5b
fix proc_open stub for php >= 8.0
...
The argument names are defined here:
https://github.com/php/php-src/blob/PHP-8.0.0/ext/standard/basic_functions_arginfo.h#L1773-L1780
2022-01-20 13:57:34 +01:00
orklah
5c4be6bc21
Merge pull request #7435 from orklah/old-phpunit
...
drop phpunit compatibility aliases
2022-01-19 20:36:44 +01:00
orklah
7d07f42790
fix CS
2022-01-19 20:36:09 +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
orklah
52a7f0694e
drop compatibility aliases
2022-01-19 19:29:16 +01:00
1914be4ca1
Rollback
2022-01-19 12:44:55 +01:00
78a125ab95
Fix
2022-01-19 12:33:16 +01:00
d970661182
Add separate issue
2022-01-19 12:20:50 +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
orklah
cb976f8416
fix merge induced errors
2022-01-18 23:07:35 +01:00
adrew
7e623ed48e
Upcast invokable to callable during hof arg analysis
2022-01-19 00:37:05 +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
adrew
379d0d6c49
Add tests
2022-01-18 18:54:47 +03:00
adrew
3886d5b4c6
Add test for high order function arg inference in class context
2022-01-18 13:12:13 +03:00
adrew
fac7115eae
Add simple test for high order function arg inference
2022-01-18 12:48:53 +03:00
adrew
00ce1107d3
Infer partially applied closure arg by previous function arg
2022-01-18 03:02:21 +03:00
Fabien Villepinte
c9eafa15ad
Improve signature of DOMDocument::loadXML()
2022-01-17 22:52:58 +00:00
Matthew Brown
e1d2da792c
More specific test name
2022-01-16 15:34:25 -05:00
Ricardo Boss
26dd4c5b8f
Try to provide literal int types when possible ( fixes #6966 ) ( #7071 )
...
* Fixed vimeo/psalm#6966
* Only accept >= 0 values for mode argument in round()
* Made round() only return float or literal float values and remove unneeded test
* Registered RoundReturnTypeProvider
* Updated cast analyzer to handle single string literal int values as literal ints
* Fixed psalm errors
* Fix invalid property accesses
* Addressed comments
* Added Tests
* Marked RoundReturnTypeProvider as internal
* Fixed CS
2022-01-16 21:33:04 +01:00
Matthew Brown
91902943bd
Make test more of a real-world example
2022-01-16 10:19:51 -05:00
andrew
10012c9e09
Fix self parsing for psalm-if-this-is and psalm-self-out
2022-01-16 16:11:40 +03:00
orklah
de824d6724
Merge pull request #7403 from orklah/readonly_phpdoc_promoted
...
support @readonly for promoted properties
2022-01-16 09:38:37 +01:00
orklah
6578396afb
add test
2022-01-16 09:31:58 +01:00
orklah
3c726e76df
Merge pull request #7401 from orklah/getObjectVarsNoValue
...
Psalm can't be sure get_object_vars will return an empty array unless object is known AND final
2022-01-15 23:27:33 +01:00
orklah
3260b1ad74
make class final in test to revalidate what it's testing
2022-01-15 21:53:05 +01:00
orklah
0beb8e7a4e
fix test
2022-01-15 21:39:29 +01:00
orklah
4344c8ec3f
add test
2022-01-15 21:29:24 +01:00
orklah
e8c8161dd6
fix merge induced errors
2022-01-15 20:32:09 +01:00