Skip to content

Conversation

vrana
Copy link

@vrana vrana commented Sep 23, 2025

This disallows calling random strings and arrays. Calling callables is still allowed.

@ondrejmirtes
Copy link
Member

These are already reported by PHPStan: https://phpstan.org/r/1b1f3185-cd4c-4264-862c-65c9b7af45a0

Line 6: Trying to invoke string but it might not be a callable.
Line 18: Trying to invoke array{'PDO', string} but it might not be a callable.

@vrana
Copy link
Author

vrana commented Sep 23, 2025

You are right, I'm sorry. I originally wanted to enforce using first-class-callables (and disallow strings and arrays) but I'm not sure if it makes sense here.

@vrana vrana closed this Sep 23, 2025
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.

2 participants