As it stands PEAR sucks. It's complicated, clumsy and is full of utter garbage (sorry).
PHP is rapidly dying because we don't have any decent way of writing code that can easily build on the work of others. What we need is a simple, open package management system like rubygems.
We now have decent support for namespaces, class autoloading and archives. I propose we abandon PEAR (and PEAR2, sorry guys) and indeed all of the XML files and channels and what-not and start again.
Well written, re-usable PHP should be:
- PHP 5.3+
- Autoloading, integrate well into different codebases
- Leave the include_path alone, not depend on CWD
- Consistent way of running test suites (think rake)
The package manager should be:
- Terse! (phark install pheasant)
- Multiple versions installed system wide, configured per environment (think virtualenv)
- Channel agnostic, support git, svn, pear channels (see pearhub)
- Allow a project to lock on a particular set of dependancy versions (Gemfile.lock)
- Allow dependancies on pecl
- Installable via pear (yes, I realize the irony)
Accordingly, I am going to try and write Phark in under 2000 lines of code. If it's not possible, I'm jumping ship and never looking back. Any takers?
LOC comparison between projects with different objectives can be tricky.
Don't get me bad here, please. What I meant is that Doctrine has a nice architecture for what it does. The second version is already done, they are just waiting for Symfony 2. What we should aim as Doctrine did is to plan a lot first, than put hans on code. Otherwise it could just happen as it did with PEAR2.
In Pear2 they haven't planned what they were going to do, the just had a list of things they wanted. Some people just started coding and done. They try to cure cancer and forget the real problem: the end user.
I completely agree with the quote, I just fear to waste time in something worst and more complicated to maintain than Pear itself or even worst, to realize in the middle of the way that we missed some point and could do something much different.