mix phoenix.new is old. It is still in your machine because it is installed locally and not distributed as part of Phoenix. Use mix archive.uninstall phoenix.new to remove it.
Part of the confusion, I think, is that the description for both phx.new and phoenix.new are the same. My understanding is that phoenix.new creates a 1.2 version and phx.new creates a 1.3 version. Is that correct? I also have both listed, and mix archive.uninstall doesn’t find the old phoenix.new. Also, “mix help” lists phoenix.new, but “mix archive” does not have it listed.
Yes, as the phoenix 1.3 generators still ship with the old long form, that’s as intended to make transition easier. But now they should create a correctly versioned skeleton.
The main difference is that of the directory structure. Using phoenix.new you’ll get a directory called web which will contain controllers, views, templates and models etc (this is not recommended), while using phx.new you’ll get controllers, views, templates and models etc under lib/yourapp_web and this is the recommended way to generate the project. Under the lib directory besides the yourapp_web directory you’ll also have yourapp directory which will contain the main logic of your application in form of different contexts.
Following is the tree structure of two applications created with the two commands,
There’s one thing to understand with mix tasks. They can be local to a project brought in by dependencies and manually installed to be globally available.
phx.new and phoenix.new are the globally installed archives for creating a phoenix project. All other phx.* and phoenix.* tasks are not globally installed at all, but are local to a project if you have phoenix installed as dependency, which is the reason why you cannot remove them. They’re part of a dependency therefore there’re available.
Phoenix 1.4 will no longer ship with the old generators, which is why they’ll no longer be available as soon as one is using that version.