RequireFileExistsRule: enable __DIR__ only for bleeding edge#5879
Conversation
Should it behind the same opt-in flag instead then ? |
I don't think so, because the opt in flag the new behaviour from #5862 is meant to be generally available in phpstan 3.0 and should be enabled with bleeding edge to verify it works as expected |
The new behavior consider
That's the only concern I have, should it really be generally available ? Maybe it has to be behing usePathConstantsAsConstantString + bleedingEdge and in 3.0 it will be behind usePathConstantsAsConstantString. Looking at the doc of https://phpstan.org/config-reference#usepathconstantsasconstantstring ; it explicitely say
So I understand by this doc that the #5862 behavior should be behind the flag ? |
|
if I put it behind from my POV the goal of #5862 is, that at the time the |
VincentLanglet
left a comment
There was a problem hiding this comment.
I don't see why it shouldn't also be behind usePathConstantsAsConstantString but I agree it has to be behing bleeding edge anyway
the rule, which was improved with #5862, did only work before when a opt-in
usePathConstantsAsConstantString: trueflag was used. I feel this mean only very few users had it in use.with the mentioned PR, the rule covers more real world use-cases, because the added behaviour does not depend on the opt-in flag.
to play it save, lets enable the newly added logic only in bleeding edge for now