Thursday, November 18, 2010

ruby gem like system for php

With the advent of phar I feel the time is nigh for a ruby gem/perl cpan-esque system for distributing packages/sharing code. I know pear exists but honestly how does one distribute a package via pear? proposals? cvs? I am imagining something where you point it to a github project and it generates a phar, increments the version number, when ever you tell it a release is viable.

It would also be slick to be able to do something like:

rock::require('somePackage');
namespace somePackage;

funcDefinedInSomePackage();
$x = new ClassFromSomePackage;


Where rock::require at dev time would check for the latest version of "somePackage" on the server, if it is newer than what is there (or it is not there at all) it will download the phar, put it in the library and then load the phar.