I needed to use PEST from Symfony2. I've done some changes to transform it into a PSR-0 compliant library so that the Symfony autoloader can load the classes properly.
Transformation into a (hopefully) PSR-0 compliant library
I'm a little reluctant about pulling this in. It will probably introduce incapability with older versions of PHP (probably anything before 5.3?) .... then again I'm not really sure if Pest works with anything older than 5.3 as-is.... to be honest, I just refuse to accept \ as a namespace separator :) Maybe we'll just put this into a branch for now?
Yeah. That's the best solution. I suppose there are still a lot of people around who do not need to always have PSR-0 compliant libraries :-)
Alright I'll put it in a branch for now and merge in any future changes from master. Once things stabilize a bit (are both the PSR-0 and Zend module formats still in contention?) we'll PSR-0-ify master.
fyi, here is what I've added in autoload.php to register Pest to autoload in Symfony2:
'Pest' => __DIR__.'/../vendor/pest',
Thanks @pasinter. I should have mentioned that :-)
Merge branch 'master' of git://github.com/educoder/pest
Are you creating a PSR-0 branch? Could you also add Composer compatibility (composer.json) to that branch?
Im looking for composer support too. Related question: how do you use composer with a project such as pest which does not have a composer.json?
Thanks jrschumacher, I didn't see this option whilst browsing the docs
Guys, really sorry about not paying enough attention to this. Would anyone be interested in taking over Pest maintenance? Would be great to see Symfony2-compliant branch, plus there's a big queue of pull requests that need to be looked at.... I created a ticket (#39) to open discussion about this.
Just to follow up on the composer question... to get Pest to work as it is today you have to use the "classmap" autoload feature which will extract the locations of each class in the library and tie it into the Composer autoloader.
Something like this (the path may be slightly off):
Just in case anyone missed it, PEST is now officially Composer compatible and listed on Packagist.