-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
foaly-nr1
commented
Nov 14, 2017
Thank you for the MR. I am not a fan of the style changes you made (although there is something to be said for invoking static methods, statically) so I applied the other changes manually to master. Thanks again. |
Thanks for your explanation! Below my response 😊 The interface changed in 6.4 – the methods used to be instance methods, now they’re static. So I changed the method calls. PHP isn’t strict enough to enforce the interface, but to me it’s still a breach of contract. Not just code style. |
Nope. The methods have been static for over 10 years. Don't take my word for it, check out this 11 year old class: https://github.com/sebastianbergmann/phpunit/blob/2.3/Framework/Assert.php Over the course of those 10+ years, most people including myself have been using the instance invocation. The examples in PHPUnit use it (which is probably the main reason why everyone is doing it). In other, non-PHPUnit code, I would not do this (breach of contract is a bit strong, but at the very least it is obfuscation). But for PHPUnit tests I don't see much harm and thus little reason to break with convention. As far as the "test" method name prefix vs None of this is a specifically hot button issue for me, I would much rather discuss design and features, but I hope this sheds some light on why didn't merge your PRs. |