Code Monkey home page Code Monkey logo

Comments (11)

johnkary avatar johnkary commented on May 24, 2024 2

@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.

pavarnos avatar pavarnos commented on May 24, 2024 1

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.

TomasVotruba avatar TomasVotruba commented on May 24, 2024

Could you send PR for that? It could be simple to merge.

from phpunit-speedtrap.

pavarnos avatar pavarnos commented on May 24, 2024

are you concerned about legacy (PEAR style) namespace support? do we need two versions of the class?

from phpunit-speedtrap.

TomasVotruba avatar TomasVotruba commented on May 24, 2024

I don't think so.

from phpunit-speedtrap.

johnkary avatar johnkary commented on May 24, 2024

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.

johnkary avatar johnkary commented on May 24, 2024

@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.

pavarnos avatar pavarnos commented on May 24, 2024

Take a look at Mockery mockery/mockery#691 who just came up with a clever solution

from phpunit-speedtrap.

johnkary avatar johnkary commented on May 24, 2024

@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.

pavarnos avatar pavarnos commented on May 24, 2024

#25 looks awesome. Thanks @TomasVotruba

from phpunit-speedtrap.

johnkary avatar johnkary commented on May 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.