Difference between new project command and create-project command

Asked

Viewed 1,028 times

5

What is the difference between commands laravel new nome-projeto and composer create-project laravel/laravel nome-projeto --prefer-dist?

In both cases the result is the same but in the case of via Poser, the folder with the project takes up much more space.

How best to work for the 5.1 version of the framework?

1 answer

3


The difference between them is very subtle. Both will use Composer to install the dependencies of your project.

The difference is that the --prefer-dist will download from the releases of the project and the laravel new of a own domain (http://cabinet.laravel.com/latest.zip).

I think the composer create-project more flexible as it is possible to install a specific version, in the Laravel Installer this is not possible.

About the size of the project, they both look exactly the same:

Dirs

  • About the size of the folder, I’m confirming the size here. Maybe it’s a wrong measurement, or Composer create-project didn’t download directly from dist

  • good gmsantos , very well explained, I thought that the new Laravel would be better since through it the project gets much smaller in my tests. Here the project gave around 20Mb with the create Composer

  • I think my problem with the new Laravel is being caused by running it in windows. As soon as I run the command I have received the following return [Symfony Component Process Exception Runtimeexception] TTY mode is not supported on Windows Platform. Although the project has created all directories I will search more about the error and put here if I find the solution

  • In the case of " [Symfony Component Process Exception Runtimeexception] TTY mode is not supported on Windows Platform" error, the error was related to the Composer version. Following the steps of the question http://answall.com/questions/120127/erro-ao-creameproject_laravel I did the update of Composer and when generating the projects via New Format and New Format the size of the project was identical. Following the information from gmsantos, I will adopt Composer create for the new projects. Thank you for your help

Browser other questions tagged

You are not signed in. Login or sign up in order to post.