PHPSpec Status July 2008

1 view
Skip to first unread message

Pádraic Brady

unread,
Jul 18, 2008, 7:19:43 AM7/18/08
to PHPSpec - Behavior Driven Design (BDD) for PHP
PHPSpec Status July 2008

By now people would have to be living under a rock not to notice I've
been absent for quite a while from working on PHPSpec. Unfortunately
around February things went a bit wrong with the passing away of a
close friend and the move to a new career for at least a year. With
everything that was happening I pulled out of a lot of online
activities and PHPSpec was no exception.

However, I have been getting back into the rythm of regular
contributions in the open source scene. I spent a while warming up by
working on the Zend Framework, and making the return to my normal
regular blogging. Now that I'm back in business, I'm starting to
revisit PHPSpec and look at where to pick up since February.

My current plan is to round up all bugs and patches to date and roll
out at least one more 0.2.x release for maintenance purposes. I know a
few Matchers are causing problems and I never got around to
synchronising examples in the documentation with the existing source
code.

If you have feature requests for new round of 0.3 releases, now is
your best opportunity to make them known! I'll be forging into that
arena soon.

On the lookout for future enhancements, my sights have turned to the
upcoming PHP 5.3. If you don't follow the internals mailing list
regularly, it was announced recently that PHP 5.3 would include not
only namespaces, but also lambdas and closures ( http://wiki.php.net/rfc#accepted
/ http://wiki.php.net/rfc/closures ). I'm tentatively scheduling PHP
5.3 support for PHPSpec 0.5 (PHP 5.3 has a tentative release schedule
for September/October 2008). This means a 0.3 and 0.4 series of
PHPSpec releases may be the only ones available to PHP 5.2 users.
While this may be inconvenient, PHPSpec is still a very young library
and I don't want to dig myself too deep into backwards compatibility
issues. But your comments are really welcome here. If support for
contrinued PHP 5.2 development for a while longer is popular I will do
just that.

The other problem I'll be focusing on is binding one major element
into PHPSpec, and that is the support for an independent Mock Objects
library - development on PHPMock ceased around the same time as
PHPSpec but I will boot it back up. If anyone want's a review of where
PHPMock might be heading in terms of an API don't hesitate to request
one!

That's really all from me for now. You can expect to see actual
movement in a week or two after I do some catchup on the current
source code and plan forward.

Best regards,
Paddy

Raphael Stolt

unread,
Jul 18, 2008, 8:39:19 AM7/18/08
to phpsp...@googlegroups.com
Hi Pádraic Brady,

Really nice to hear you getting back on PHPSpec development.

Are there any thoughts on a story runner support? I'm currently digging the story style of the easyb BBD framework, but I'm not quite sure if this is possible to mimic/implement with the current (pre 5.3) PHP language features.

Anyway, good to have you back on this one too.

Best regards,

Raphael Stolt

2008/7/18 Pádraic Brady <padrai...@yahoo.com>:

Pádraic Brady

unread,
Jul 18, 2008, 9:06:20 AM7/18/08
to PHPSpec - Behavior Driven Design (BDD) for PHP
Damn - you really are watching BDD developments ;). I just posted to
another forum a topic to debate with a few people the possibility of
creating a DSL in a specification language on top of PHP. I'll present
the idea here in a followup email.

On Jul 18, 1:39 pm, "Raphael Stolt" <raphael.st...@googlemail.com>
wrote:
> Hi Pádraic Brady,
>
> Really nice to hear you getting back on PHPSpec development.
>
> Are there any thoughts on a story runner support? I'm currently digging the
> story style of the easyb <http://www.easyb.org/%20> BBD framework, but I'm
> not quite sure if this is possible to mimic/implement with the current (pre
> 5.3) PHP language features.
>
> Anyway, good to have you back on this one too.
>
> Best regards,
>
> Raphael Stolt
>
> 2008/7/18 Pádraic Brady <padraic.br...@yahoo.com>:
> > /http://wiki.php.net/rfc/closures). I'm tentatively scheduling PHP

Carlton Gibson

unread,
Jul 18, 2008, 10:39:40 AM7/18/08
to phpsp...@googlegroups.com
Hi.

> If you have feature requests for new round of 0.3 releases, now is
> your best opportunity to make them known! I'll be forging into that
> arena soon.

I'd really like a PHPSpec to PHPUnit converter. (I think PHPUnit can
do this for SimpleTest, yes?) Reason: I prefer writing PHPSpec spec
but PHPUnit tests are the ones needed for Zend Framework, in
particular.

If wanted, I'd be willing to contribute time to this. I'm guessing the
leg work would be in codifying an equivalence table with templates of
some sort...

The other thing would be auto spec generation... I have a script for
building contexts with pending examples from a plain text spec. I'd be
happy to contribute this (with a bit of bullet-proofing.) Going the
other way, it would be nice to be able to add a @spec ... tag to a
docblock and have PHPSpec generate a (skeletal) example. (Idea again
from PHPUnit... and yes I know we *should* write the specs first...;-)
Again I'm happy to contribute time.

Regards,
Carlton

Pádraic Brady

unread,
Jul 18, 2008, 11:59:46 AM7/18/08
to PHPSpec - Behavior Driven Design (BDD) for PHP
I'll probably start a new topic with some ideas a bit later (I know
we're crossing into the weekend when replies are light ;), but any can
wait for Monday).

In brief there are two strategies.

1. Convert unit tests from one library to another's format
2. Allow a library to run and collect results from another's test
suite

Personally, I wouldn't mind having both options since adoption is a
two way street and changing to PHPSpec (or from it ;)) should be
easily accomplished using one of the above.

Carlton Gibson

unread,
Jul 18, 2008, 12:57:46 PM7/18/08
to phpsp...@googlegroups.com
Hi Paddy,

My own thinking has only got as far as converting PHPSpec to PHPUnit.
Apart from the translation of the the actual spec call to an assert --
which should be a case of just working out the mapping of parameters
-- it seems fairly trivial: "itShould..." seems to translate fairly
well to "testItShould...". (The natural wording of unit tests isn't so
conducive for the other way however: e.g. "testAccepts..." doesn't
work as "itShouldAccepts...")

I'll be interested to read your thoughts.

Regards,
Carlton


2008/7/18 Pádraic Brady <padrai...@yahoo.com>:

gregor....@googlemail.com

unread,
Jul 21, 2008, 5:43:41 AM7/21/08
to PHPSpec - Behavior Driven Design (BDD) for PHP
Hello Paddy,

that's really good news.

> If you have feature requests for new round of 0.3 releases, now is
> your best opportunity to make them known! I'll be forging into that
> arena soon.

Please output the line number of a failed spec. (Actually I don't
know, how hard this is to extract from the traceback stack, but it
would be a really useful feature.)

> On the lookout for future enhancements, my sights have turned to the
> upcoming PHP 5.3. If you don't follow the internals mailing list
> regularly, it was announced recently that PHP 5.3 would include not
> only namespaces, but also lambdas and closures (http://wiki.php.net/rfc#accepted
> /http://wiki.php.net/rfc/closures). I'm tentatively scheduling PHP
> 5.3 support for PHPSpec 0.5 (PHP 5.3 has a tentative release schedule
> for September/October 2008). This means a 0.3 and 0.4 series of
> PHPSpec releases may be the only ones available to PHP 5.2 users.

If this only means, that on the development / testing system, you need
5.3, I think, that this is OK.

Thanks,
Gregor

massive

unread,
Sep 16, 2008, 5:16:15 AM9/16/08
to PHPSpec - Behavior Driven Design (BDD) for PHP
Any news on the 0.3.0 release yet?
Reply all
Reply to author
Forward
0 new messages