Skip to content

Make $calleeReflection of FunctionCallParametersCheck::check() optional - #6899

Merged
ondrejmirtes merged 1 commit into
2.3.xfrom
optional-callee-reflection
Nov 1, 2026
Merged

ondrejmirtes merged 1 commit into
2.3.xfrom
optional-callee-reflection

Conversation

@ondrejmirtes

Copy link
Copy Markdown
Member

Fixes phpstan/phpstan#15626.

6f5c6ba added a required $calleeReflection parameter to FunctionCallParametersCheck::check(). Larastan and phpstan-laravel call check() with 25 arguments, so they throw ArgumentCountError and fail the Larastan, phpstan-laravel and calebdw/phpstan-laravel integration jobs (https://github.com/phpstan/phpstan/actions/runs/41301047434).

This defaults the parameter to null, which its type already allows. Callers that omit it skip only the parameter-closure-type-extension acceptance fallback from 6f5c6ba. All callers in phpstan-src still pass it.

Larastan and phpstan-laravel call check() with 25 arguments, so the new
required parameter from 6f5c6ba made them throw ArgumentCountError.

Fixes phpstan/phpstan#15626

Amp-Thread-ID: https://ampcode.com/threads/T-01a19770-5331-74b2-963f-e324ae0f7635
@ondrejmirtes
ondrejmirtes merged commit 0749d19 into 2.3.x Nov 1, 2026
1026 of 1035 checks passed
@ondrejmirtes
ondrejmirtes deleted the optional-callee-reflection branch November 1, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FunctionCallParametersCheck::check() gained a required parameter, breaking Larastan and phpstan-laravel

1 participant