Philip Ardery
Philip Ardery
another problem with including the constants file in `phpstan.neon` is that, in theory, it could suppress other valid errors. If I define a constants in `constants.php` and require that file...
it looks like someone else reported this years ago: https://github.com/phpstan/phpstan/issues/768 https://phpstan.org/r/05b59186b28d090c4d27f859dc106a21
@ondrejmirtes you suggest in [this comment](https://github.com/phpstan/phpstan/issues/768#issuecomment-632858204) that the issue is resolved, but I'm still experencing it on the latest PHPStan with php 7.4. Or maybe my issue is slightly different...
P.S. the following alternate constant definition does not solve the situation, so [this comment](https://github.com/phpstan/phpstan/issues/768#issuecomment-444736739) doesn't apply to our use case here. ``` # phpstan-test/constant.php
slightly more complicated example with additional layer of nesting: https://phpstan.org/r/a8e3c30f-7d08-49fa-9525-40229e8ed393
nevermind, i think I see my issue, will reopen if its still a problem
never mind, it didn't work: https://phpstan.org/r/fafe865a-f33a-4a28-a58c-5496cab9e898
right, but there are times when its valid/useful/necessary to call method names dynamically. This issue is specifically about dynamic function calls. Maybe it's not easy/possible to implement coverage for that...
I wish 1 applied to me, but it doesn't, unfortunately. I don't fully understand 2, but I trust you. Looks like the same issue affects `call_user_func`: https://phpstan.org/r/7f71878b-40d3-4193-abb3-c583a4b2c46a So I guess...
related: https://github.com/phpstan/phpstan/issues/2920