Comments (11)
@pavarnos You're right, removing support for PHPUnit_Framework_TestCase
would be a BC break. I'd like 2.0 to target PHP 7.0+ and PHPUnit 6+ so we'll be updating the listener to support the new PHPUnit namespaces.
from phpunit-speedtrap.
sorry i wasn't clear. By PEAR style i meant underscore separated namespacing a la "PHPUnit_Framework_TestCase"
Moving to PSR4 "" namespaces will break compatibility with phpunit 5 which is a BC break potentially requiring a v2.0 release?
from phpunit-speedtrap.
Could you send PR for that? It could be simple to merge.
from phpunit-speedtrap.
are you concerned about legacy (PEAR style) namespace support? do we need two versions of the class?
from phpunit-speedtrap.
I don't think so.
from phpunit-speedtrap.
I haven't had a chance yet to look at PHPUnit 6. Changing this library listener's base class would require a minor version bump to 1.1. A successful PR would make this change, update any APIs required by the base class, and bump the minimum PHPUnit version to ^6.0 in composer.json to target the latest PHPUnit.
from phpunit-speedtrap.
@pavarnos Could you clarify your question about supporting PEAR namespace support? Currently this library assumes the Composer autoloader is used, or that their project implements its own autoloading methods.
phpunit-speedtrap will autoload with Composer's PSR-0 autoloader as defined in composer.json https://github.com/johnkary/phpunit-speedtrap/blob/master/composer.json#L21
from phpunit-speedtrap.
Take a look at Mockery mockery/mockery#691 who just came up with a clever solution
from phpunit-speedtrap.
@pavarnos Thank you for linking, that IS creative!
Mockery is a larger, feature-rich library important to many PHPUnit users. They regularly add new features and refine APIs to make their library better. If they maintain BC it increases trust between the library and its users. Both old and new users benefit.
I see phpunit-speedtrap as a very focused library without many frills. There are not many features beyond slowness threshold and reporting configuration. Aside from a few output-related GitHub issue requests there hasn't been demand to increase its feature set. I'm comfortable that phpunit-speedtrap v1.0.1 will work great for 95% of people using PHP < 7 and PHPUnit < 6.
Supporting only PHP 7+ and PHPUnit 6+ in future versions will be easier on maintainers because there are less configurations to worry about, and the codebase can focus on the latest language features. Supporting less version will keep the codebase focused.
from phpunit-speedtrap.
#25 looks awesome. Thanks @TomasVotruba
from phpunit-speedtrap.
After merging #26 the master branch now supports PHPUnit 6 and their new namespaces.
There are a few new things I'd like the library to support before we tag v2.0:
- Feature: Custom slowness threshold per-test suite #27 @johnkary
- Feature: Custom slowness threshold per-group -- Should be easier after a PR for per-test suite is available
- Support: PHP 7 language improvements (scalar type hinting, strict types, etc.) @TomasVotruba
- Support: PSR-4 support @TomasVotruba
from phpunit-speedtrap.
Related Issues (20)
- Documentation usage example HOT 2
- PHPUnit 10 support HOT 2
- Output could contain convenient way to run/view slow test using a profiler HOT 1
- Fatal error with Symfony 3.4 and symfony/phpunit-bridge HOT 4
- First test always report a lot of time HOT 5
- Compatibility with phpunit 8?
- Does not work when running phpunit via paratest HOT 3
- Switch over to using hooks instead of implementing deprecated TestListener HOT 5
- Display @dataProvider parameters HOT 3
- Disable in coverage test HOT 3
- Only output slowness report when explicitly enabled HOT 2
- Add development section to README
- Compatibility with PHPUnit 9 HOT 1
- Fix needed for phpunit 9.5
- Replace Travis CI with GitHub Actions
- Output total time taken by slow tests HOT 2
- Automatically annotate slow tests HOT 4
- Option to create report file
- Feature request: output list of fastest tests executed HOT 1
- How to Fail Slow Tests?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpunit-speedtrap.