From a47f65fbfa01b4ffe0ab953a219fd87f5304df9b Mon Sep 17 00:00:00 2001 From: Jan Nedbal Date: Fri, 15 Sep 2023 13:17:55 +0200 Subject: [PATCH] readme: mention arrow functions in forbidCheckedExceptionInCallable (#161) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e913762..7e27dda 100644 --- a/README.md +++ b/README.md @@ -376,7 +376,7 @@ parameters: ``` ### forbidCheckedExceptionInCallable -- Denies throwing [checked exception](https://phpstan.org/blog/bring-your-exceptions-under-control) in callables (Closures and First class callables) as those cannot be tracked as checked by PHPStan analysis, because it is unknown when the callable is about to be called +- Denies throwing [checked exception](https://phpstan.org/blog/bring-your-exceptions-under-control) in callables (Closures, Arrow functions and First class callables) as those cannot be tracked as checked by PHPStan analysis, because it is unknown when the callable is about to be called - It allows configuration of functions/methods, where the callable is called immediately, those cases are allowed and are also added to [dynamic throw type extension](https://phpstan.org/developing-extensions/dynamic-throw-type-extensions) which causes those exceptions to be tracked properly in your codebase (!) - By default, native functions like `array_map` are present. So it is recommended not to overwrite the defaults here (by `!` char). - It allows configuration of functions/methods, where the callable is handling all thrown exceptions and it is safe to throw anything from there; this basically makes such calls ignored by this rule