Skip to content
This repository has been archived by the owner on Feb 11, 2019. It is now read-only.

Equivilent of .ruby-version or .rvmrc #50

Closed
philsturgeon opened this issue Oct 1, 2014 · 3 comments
Closed

Equivilent of .ruby-version or .rvmrc #50

philsturgeon opened this issue Oct 1, 2014 · 3 comments

Comments

@philsturgeon
Copy link
Contributor

In a similar vein to #21, it would be good to have something in the the project directory - that can be be committed to VCS - which lists a PHP version constraint.

Right now, you can make an environment, it uses whatever PHP happens to live with highest precidence in the PATH, then uses that.

If somebody else picks up the same project, they dont know which version the other developer used unless they share the env folder with them somehow, which sounds... gross.

The two similar systems I'm most familiar with are rbenv and rvmrc.

rbenv places a .ruby-version in your directory, so you can just run rbenv local to use whatever has been suggested.

rvm is pretty much the same. It can support .ruby-version or a .rvmrc which contains a bit more, like the name of the environment (gemset) as well as the number. It also takes a switch to specify if it should create that env if it doesnt exist.

I know virtphp stays out of the way of php version specific stuff, allowing systems like to do a lot of the lifting. That makes it kinda tough to specifically have virtphp know anything about php versions. We can't just have virtphp check a .php-version and see 5.6.0 and instantly have it know that it needs 5.6.0, but... it would be kinda slick.

Especially if the more longform can be done, with a file called .virtphprc containing:

virtphp create example-env --php=5.6.0

Am I taking out of my backend here or do you guys think something like this could be done?

@philsturgeon
Copy link
Contributor Author

(Btw im totally volunteering my services but I'll need some guidance.)

@jakerella
Copy link
Member

@philsturgeon I think this is exactly what #21 is hoping to do... and your services are very welcome. :)

The best way to start is to read the "Contributing" section of the README (which I'm guessing you already knew). It's a pretty typical fork-branch-PR situation once you're ready. As for the code, if you need help making sense of it, I'm sure one of us could jump on a hangout with you some time.

@philsturgeon
Copy link
Contributor Author

This issue is probably a bit superfluous then, I'll just keep the chat going on #21.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants