Skip to content

Commit 8f88036

Browse files
committed
Fix ForbidCheckedExceptionInCallableRule for PHPStan fiber processing
Refactor the rule to use Scope::getFunctionCallStackWithParameters() instead of relying on node processing order, which broke with PHPStan's fiber-based processing. The new implementation: - Uses scope's call stack to determine if callable is immediately invoked - Handles IIFEs (immediately invoked function expressions) separately - Properly resolves named arguments to correct parameters Note: There's a PHPStan bug with named argument parameter matching that affects edge cases. Fix: phpstan/phpstan-src#4791
1 parent 419b09f commit 8f88036

File tree

2 files changed

+159
-165
lines changed

2 files changed

+159
-165
lines changed

0 commit comments

Comments
 (0)