Replies: 2 comments 4 replies
-
|
FIY @silasjoisten, @OskarStark |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I feel like the safe repository will need to expose a phpstan extension in order to improve some type inference, relying on the one done by PHPStan. Like
But I assume lot of similar inference are missed for other safe functions. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using thecodingmachine/safe in my project. Since PHPStan v2.1.41 the following code reports an error:
While PHPStan is able to correctly handle this: https://phpstan.org/r/87107f22-a7a4-459a-92bd-7d2a52b4a054
However, using the
\Safe\preg_matchwrapper it fails to do so. How may I be able to have best of both worlds? Do I need to patch thecodingmachine/safe, if so how should it look like? Avoid using it? Third option?Beta Was this translation helpful? Give feedback.
All reactions