Repository navigation
Handle ini_get and session_id failures for PHPStan level 7 - #1674
Conversation
cpeel
left a comment
There was a problem hiding this comment.
This is one of those cases where PHPstan is being stupid.
Returns
falseif the configuration option doesn't exist.
But all of these are guaranteed to exist because we set them up on line 3.
I'd really rather tell PHPstan to stuff it than make the code more convoluted just to appease it.
84dddf1 to
ec1d6cd
Compare
So.... reading the (docs and comments for ini_set)[https://www.php.net/manual/en/function.ini-set.php], it turns out there are corner cases where I've tried using PHPDoc hints on most of the The more terse solution would be just to cast to string/int. Technically that's a behavioural change, but we can go with that if you like. Let me know what you think. |
|
What if we rethink this just a bit and use either file globals (namespaced globals?) or some other simple data structure to store these session config values. Then use that to |
...so use local variables instead.
ec1d6cd to
027bb6d
Compare
No description provided.