Closed ilazaridis closed 1 year ago
Hi, yeah, that makes sense. I even thought it's already supported but I was wrong :-) I§ll look at it for some of the next releases but feel free to send a PR, the param type and value is figured around here (note to mostly myself, but feel free to follow it too) https://github.com/spaze/phpstan-disallowed-calls/blob/332969d0aa67ddb8597c2f1248268d69ebf5f9c7/src/DisallowedHelper.php#L121-L125 and some tests in https://github.com/spaze/phpstan-disallowed-calls/blob/332969d0aa67ddb8597c2f1248268d69ebf5f9c7/tests/Calls/FunctionCallsTest.php
Awesome! I will have a look, thank you.
Changes are ready, 2 problems though:
JSON_ERROR_ON_THROW
is supported after 7.3In any case php 7.2 is not supported anymore and even 7.4 support is ending in 4 days.
Wdyt ? Do you consider changing the php version in composer soon ?
I'd very much like to jump straight to supporting just PHP 8.1+ but as PHPStan itself supports ^7.2|^8.0
I think we should support the same versions.
Hello,
it would be awesome if instead of the order of the parameter declared as an integer, the named parameter could be used.
So for example in
instead of
4
,flags
could be used, so that we don't need to define all the ommited parameters beforeflags
.