1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00
psalm/stubs
Marco Pivetta d9a0cc5311 Prevent usage of callable objects in ReflectionFunction::__construct()
As per @weirdan's feedback, we can prevent
the usage of `object` instances that
implement `__invoke()`, as well as `array`
callables, by declaring the ctor argument of
`ReflectionFunction` to be either a real `Closure`,
or a `callable-string`.

While this may not be 100% of scenarios, it is a
healthy way to identify errors in userland.

Ref: https://github.com/vimeo/psalm/pull/8722#discussion_r1027151421
2022-12-06 11:19:16 +01:00
..
extensions Add stubs for ext-random (PHP 8.2) 2022-11-02 15:59:56 +03:00
CoreGenericClasses.phpstub Configure a correct attribute target in stubs/CoreGenericClasses.phpstub 2022-08-24 21:32:26 +02:00
CoreGenericFunctions.phpstub Allowed taints to pass through urlencode() 2022-12-05 17:25:36 -06:00
CoreGenericIterators.phpstub Merge remote-tracking branch 'origin/4.x' into HEAD 2022-11-08 10:25:04 +01:00
CoreImmutableClasses.phpstub Make array shapes strict by default (#8701) 2022-11-11 20:14:21 -05:00
ext-apcu.phpstub bugfix/#7912: Add Iterator implements to stub 2022-05-17 23:55:44 +02:00
Php80.phpstub Declaring more precise types and purity boundaries on ext-reflection symbols in .phpstub files 2022-12-06 11:08:30 +01:00
Php81.phpstub Declaring more precise types and purity boundaries on ext-reflection symbols in .phpstub files 2022-12-06 11:08:30 +01:00
Php82.phpstub Declaring more precise types and purity boundaries on ext-reflection symbols in .phpstub files 2022-12-06 11:08:30 +01:00
phpparser.phpstub Add support for strict arrays, fix type alias intersection, fix array_is_list assertion on non-lists (#8395) 2022-11-05 22:34:42 +01:00
phpredis.phpstub some more string values 2022-10-09 17:01:38 +02:00
Reflection.phpstub Prevent usage of callable objects in ReflectionFunction::__construct() 2022-12-06 11:19:16 +01:00
SPL.phpstub Fix template param for SplDoublyLinkedList. 2022-10-14 11:54:53 +05:30