I worked again on PEAR Manager, and since I
didn’t explain exactly what is this project about I’ll try to explain it in this
post. The idea behind PEAR Manager is to create a web interface where you can
find informations that could help you to upgrade your system to new versions
(stable, alpha or beta),
downgrade easily, possibility to read about new packages and add them to your
system with all their dependence.
Administrators use generally PEAR in command line to upgrade. But I found this
procedure not helpful to the developers (End users of PEAR) and maintainers of
PEAR packages. The idea of PEAR Manager can help to increase PEAR beta testers,
make the availability of new packages to a more large community… And maybe
this could be a step to make PEAR more friendly as PHP.
It’s not a PEAR installer, but a package maintenance and discovery tool. The
maintenance task is to upgrade to stable, beta or alpha version if available,
downgrade or uninstall. The discovery tool allow to browse available packages
not installed on your system.
You can see the percentage of PEAR that you’re using currently. A default
PEAR install is about 3% of Pear Packages ! An advanced usage will be
about 7% (10 pear packages). We’ll say 10% … and what about the other packages
? They’ll be shipped with some applications otherwise we’ll never hear
about them.
Maybe I’m talking about the feature that make PEAR if an included package
isn’t available in current install, will download it in real time from web then
include it ? Availability is the key of the net experience !
Anyway, back again to the Pear Manager, I’ve played with some code but I
didn’t checked in the current Pear packages, like the Registry class. We never
talk about this class, I never heard about it if it wasn’t this project. Anyway,
to see the current installed package :
$registry = new PEAR_Registry(”c:/php4/PEAR”);
$pkgs = $registry->_listPackages();
$pkgs_counter = count($all_pkg);
Then to retrieve the current package installed information you just use
$package = “PHPUnit”;
$registry = new PEAR_Registry(”c:/php4/PEAR”);
$pkg_info = $registry->_packageInfo($package);
I’ve asked this question before but didn’t get any answer, even if it was so
obvious when I see it now ! I’m talking too much these days, but I’ll try to
continue this talk another time.
To be continued…
Tags: No Tags





No Responses
Leave a Response