Fix phpdoc type in promptForMissingArgumentsUsing#58768
Merged
taylorotwell merged 2 commits intolaravel:12.xfrom Feb 12, 2026
Merged
Fix phpdoc type in promptForMissingArgumentsUsing#58768taylorotwell merged 2 commits intolaravel:12.xfrom
taylorotwell merged 2 commits intolaravel:12.xfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
in #58565 another of the new types is for
PromptsForMissingInput::promptForMissingArgumentsUsing. When using a callable to fully control the missing argument prompt such as using laravel/prompts, the union return type isn't quite correct. When specifying a callable return type, multiple return types should be wrapped in parentheses, not the entire\Closureblock.PHPStan docs ref - https://phpstan.org/writing-php-code/phpdoc-types#callables
PHPStan repros here:
Error (current phpdoc) - https://phpstan.org/r/a1815f96-87f0-45eb-920a-3759e941e682
Fixed - https://phpstan.org/r/8d1bd604-6a48-4e7e-8d60-17a76f420ebf
Here's the actual code that is triggering the error:
PHPStan error: