views:

93

answers:

3

I normally work on Python projects and we have a good tool called virtualenv for setting up project environments. Does something similar exist for PHP? I have not been able to find one.

A: 

eclipse helios for php developers

Mowgli
Not quite what I'm talking about here. I use emacs anyway :)
dcolish
A: 

As far as I know there isn't really a way of doing this in PHP without having to install loads of tools. My best guess would be to set up a VCS, such as Git, and use branches to mimic environments. It's ugly, but it works.

Yorick Peterse
+1  A: 

Hmm, maybe PEAR does what you want. PEAR is a repository of various useful classes. You can download them, but you also use the Command Line to manage packages. Apart from this, there is nothing I know that would do this. There is phing to automate build processes. It's like Java's Ant. And some frameworks have RAD tools to setup projects, but those are usually aimed at the framework specific parts.

Gordon
Yeah, I have been looking at PEAR but its not 100% clear to me how I can have a per project include path. I'll look into that some more. I certainly think the tool I'm looking for should use PEAR.
dcolish
@dcolish you can set the [include path at runtime](http://de2.php.net/manual/en/function.set-include-path.php) or do you mean you want have all the libs you download from PEAR for the application in the application folder?
Gordon
I meant the latter. I'd like to have the project specific libs be part of the project only. I do not want to have them available system wide. This way I can possibly pin versions of libs based on a projects needs.
dcolish
@dcolish I am not sure the pear manager can install in specific directories. You might have more luck with Phing then. Or maybe Zend_Tool from the Zend Framework. That's an extensible command line tool.
Gordon
@Gordon I did some more digging and I think PEAR/Pyrus will do exactly what I need. I can set the include_path in a variety of config files specifically for that project. I don't think it will be hard to script this out.
dcolish
@dcolish Cool. Didnt now Pyrus. Will have a look at it.
Gordon