Change default "create-project" version to stable #957

Closed
Vrtak-CZ opened this Issue Jul 30, 2012 · 14 comments

Comments

Projects
None yet
7 participants

Then Alpha 4 switch default "minimum-stability" to stable why "create-project" still use dev (create-project without version parameter)?

Owner

Seldaek commented Aug 10, 2012

I think create-project is very useful to start hacking on something, so in that sense getting the master branch checked out makes sense, but of course it depends on your use case. We could add a --stability=<...> flag that you can pass to restrict it.

Contributor

fprochazka commented Aug 10, 2012

I see. But why not make it the other way? Is/was there some discussion I've missed?

$ composer create-project nette/sandbox

and if I'd like to work on dev

$ composer create-project --dev nette/sandbox
Owner

Seldaek commented Aug 11, 2012

Well --dev is used to enable dev requirements, so it should be --stability=... IMO, but now the question remains of what the default should be (stable or dev)

I think default should be stable (consistent with minimum-stability).

@ghost

ghost commented Aug 23, 2012

I think create-project should borrow how require handles changing the default:

$ php composer.phar create-project nette/sandbox=dev-master
$ php composer.phar create-project nette/sandbox=1.0-beta1
$ php composer.phar create-project nette/sandbox=1.2.1

Since I was already familiar how I could add a requirement to an existing project, I expected to be able to do this when creating a project. Using this approach would provide a sense of consistency when using Composer.

EDIT: I vote for using stable as default.

I vote stable as default

Contributor

stof commented Sep 21, 2012

@Seldaek As symfony is advocating this command as a way to start projects, I would vote for stable by default. I told people to use an explicit version at least 20 times in the last few days.

Contributor

sminnee commented Nov 4, 2012

We're looking to advocate this as the best way to start new SilverStripe projects as well; stable as default with a stability parameter would be great.

AFAIK the --stability switch doesn't exist yet, right?

Contributor

bamarni commented Nov 15, 2012

I don't think people usually have their root project installable through composer, so this command shoud mostly be used to install a skeleton framework/cms, the other cases look like some hacks, eg. install a dependency package to fix a bug.

That's why I'd go further than 'stable' and suggest that it also removes VCS history by default instead of asking, and an option could be passed in order to avoid this (eg. --keep-history).

Seldaek closed this in dee9bcb Nov 24, 2012

Owner

Seldaek commented Nov 24, 2012

Just pushed the --stability (-s) flag, and added @kherge's suggestion to allow for composer create-project foo/bar=1.0.0 path/

Owner

Seldaek commented Nov 24, 2012

Also default stability of create-project is now stable.

Contributor

bamarni commented Nov 24, 2012

@Seldaek: what do you think of my proposal about the vcs history? As
most frameworks will likely document this command as the recommended way
to get it installed, it would make sense not to bother people with that,
imo keeping the history should depend on wether or not the --dev
option is passed and be straightforward, an option could still be passed
in order to override the behavior.

Owner

Seldaek commented Nov 24, 2012

@bamarni it's already the default option in the prompt, so I think it's ok. In non-interactive mode it's cleared by default, so you can advertise that people do composer create-project -n foo/bar too. Also this whole thing is not needed when it's installed from a zip file, which will largely be the case now I guess with the default stability set to stable.

Contributor

bamarni commented Nov 24, 2012

Also this whole thing is not needed when it's installed from a zip
file, which will largely be the case now I guess with the default
stability set to stable.

I hadn't thought about that, this looks great then, thx.

@digitalkaoz digitalkaoz pushed a commit to digitalkaoz/composer that referenced this issue Nov 22, 2013

@Seldaek Seldaek Add --stability and support for package:version and package=version t…
…o create-project, fixes #957
d7d902a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment