-
Notifications
You must be signed in to change notification settings - Fork 62
Bump to PHPUnit 6, PHP 7, drop dead code #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ed dead code, travis: cleanup
|
|
||
| use PHPUnit\Framework\TestCase; | ||
|
|
||
| final class SlowTest extends TestCase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this final? (and SpeedTrapListener)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The best practice to prevent inheritance. Do you need it?
I learn a lot from this post: http://ocramius.github.io/blog/when-to-declare-classes-final/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting article. no i don't need inheritance from SpeedTrapListener, though if the class is final then the only way to change behaviour is to fork your own version because there is no way to inject new behaviour (eg to change output format).
i wonder if ocramius' comments apply more to code within a larger project rather than packages/components? but thats a philosophical debate for another time... no reason to hold up release.
thanks for all you have done here BTW. nice work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally, thank you!
|
@TomasVotruba Thanks again for showing off all the small improvements we could make! I have merged PHPUnit 6.0 support to master branch. If you're still interested in adding some of these ideas could you open smaller more focused PR's against latest master? Based on the work in this PR we could do these changes in separate PRs:
Let's preserve the direction the master branch is in regarding phpunit.xml, Travis config, classes are not defined final, class method and property visibility remains the same, etc. Feel free to focus on the above PRs! |
|
@johnkary Thanks for the message. I realize I made too many changes. I'll look on those 2 PRs. Or could you send them? I'm in a bit lack of free time now. |
|
@TomasVotruba I will focus on two new features for slowness threshold per-testsuite and per-group. If you have not had time to work on them by then I'll submit PRs. Thanks! |
|
@johnkary Thank you! |
Ref #24
Here are few suggestions to improve code. I noticed there is lot of dead code.
Also mixed PSR-0 and PSR-4 structures was fixed.
And add usage of short arrays
[], isset operator??, return type hints, strict type hints.What do you think about this? Feel free to comment particular commits.