Skip to content

Instantly share code, notes, and snippets.

@lox
Created November 23, 2010 04:03
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lox/711221 to your computer and use it in GitHub Desktop.
Save lox/711221 to your computer and use it in GitHub Desktop.
A proposal for a sane php package manager

Proposal for Phark, a sane php package manager

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?

@paulccarey
Copy link

this looks awsome, I miss my bundler and this looks like it may well fill the gap!

@zquintana
Copy link

I'm all in! I'd love this for a few projects I'm working on currently (a Rails like PHP 5.4 framework and blogging software built on it). Would be great for easily integrating things like php-activerecord and php-sprockets into projects. Let's get it started! I'll help.

@dersam
Copy link

dersam commented Jun 11, 2012

Is this dead? I'd like to contribute, but the project doesn't seem to have had any active work in the past few months.

@zquintana
Copy link

I'm not sure if its dead, but I'd look at composer. I started to contribute there. Good project so far with a fairly active community. Not quite like gem but a start. getcomposer.org. I hope no one gets mad at me for pushing another project :)

@lox
Copy link
Author

lox commented Jun 11, 2012

At this stage, I think composer is light-years ahead of Phark. Unfortunately I never had the time to dedicate to the project to get it off the ground.

Highly recommend http://getcomposer.org and http://packagist.com, I'm using them personally and at 99designs. I'll update the project README for Phark.

@dersam
Copy link

dersam commented Jun 11, 2012

Composer looks like exactly what I was looking for- thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment