Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[Security] getTargetPath of TargetPathTrait must return string or null #29408
Personally I have banned
Let me elaborate:
I have a class that I use this trait. If we go with the solution of
if we go just with the
Never said it is minor.. except if you were not referring to me.. But since you mention it the BC it depends I believe in the way that you look at this.
If someone was depending on the docbloc then it is not a BC.. That is what the code should do and it is just a bug fix. If someone was depending on the actual implementation and he was actually checking about
My point of view tends towards to the direction that it is a bug. The docblock says string. If someone was depending on null he should commit PR and never the less he should check against emtpy string as well.
Yea I know what you meant.. so let's not keep going in loops.. You said your PoV and I said mine.. In this specific case I believe there is no right or wrong so someone has to take a decision.
Judging by the above I feel that you are not certain either... and also the fact that @ro0NL posted an accepted PR doing otherwise. So I will need you (@nicolas-grekas) to give me the final direction.
Also I need to know what about tests.. If this is limited to a docblock change then no test changes is required since there is no way to actually reproduce this in the way they are written. Too much mocking that it will just make it silly. I would be happy to refactor tests as well on this PR using an actual
If we stay with the change as is in my thinking tests should be all about giving