danielstjules/pho — pull request #4 by ciarand (2013-12-30 20:28:59+00:00)
Title: 5.3 compatibility for "legacy" applications

This PR adds 5.3 compatibility at the expense of the short array syntax (`[]`), anything involving `Closure::bindTo`, and one instance of some late static binding weirdness.

- Most of the changes are switching short array syntax to `array()` calls. They're ugly, but they're backward compatible

- There are 6 instances of a version_compare call being added. 3 of those are in the specs, 3 of those are in the source. Comparisons in the specs are used to skip tests that only work with `Closure::bindTo` calls, and the comparisons in the source are used to avoid `bindTo` calls. This is, imo, the ugliest part of this code. I'm open to suggestions on how to improve it

- Some of the specs (especially the reporter specs) were using bound-to objects to store and pass around variables. I've replaced those calls with references. Again, it's ugly but it's backward compatible

I've also modified the composer file to allow >= 5.3, and added 5.3 as a build target for [Travis][travis]. All the tests pass on all environments.

[travis]: https://travis-ci.org/ciarand/pho

I know this seems a little pretentious to assume that you event want to bother with 5.3 support, but it's intended to be less of a suggestion and more of a "hey if you're interested" kind of PR. Either way I need this for work, so I'll be maintaining my fork for the foreseeable future.

Thanks for the awesome library. :+1: