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?

@karlforshaw
Copy link

Has this conversation moved elsewhere? died?

@augustohp
Copy link

Maybe it died, but we could schedule a kick-off online meeting to discuss things better, it would be a lot better I think ...

@augustohp
Copy link

Also we can create a mailing-list, if you pass your e-mails i can create and put everyone on it ...

@lox
Copy link
Author

lox commented Dec 13, 2010

I'm planning on writing up some more on it this weekend, definitely hasn't died, just waiting for a spare minute! Now that Google Groups is back, perhaps I'll create a mailing list over there.

@augustohp
Copy link

For those who are interested the list is: https://groups.google.com/group/phark-dev/

@jdp
Copy link

jdp commented Dec 30, 2010

I'm very interested in the development of a more modern PHP package system. It's something I've wanted for a while, out of frustration with PEAR and PECL, and longing for hybrid package and environment managers like rip or virtualenv and pip. I'd also be glad to help out.

@rowanmanning
Copy link

@lox is this still alive? I'd love to lend a hand or just to see this built! PEAR is large and monolithic, I want installing PHP packages to be as enjoyable as using homebrew :)

@lox
Copy link
Author

lox commented May 5, 2011

Not dead! Thanks for reminding me!

@rowanmanning
Copy link

rowanmanning commented May 5, 2011 via email

@lox
Copy link
Author

lox commented May 7, 2011

Ok, rowan got me motivated, so I've written up a README and created the start of the project.

https://github.com/lox/phark

Going to start some discussion on the phark-dev list around package definitions. Can't decide between a Homebrew like system with recipes to define a package, or a ruby gemspec like system where each package has to conform to a best practice layout.

@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