0

i want to kwow the real difference these two command implicate :

 symfony new my_project_name --full
 composer create-project symfony/website-skeleton my_project_name

anyone could teach me ?

3
  • Does this answer your question? Newest symfony installer vs composer Commented Jan 5, 2020 at 21:56
  • i've already read it, but i would to know if "symfony new" and "composer create-project" are really similar as is explain in the stackoverflow.com/questions/27765895/… thread, or if they implicate a really difference like explained in the symfony doc here symfony.com/doc/current/… but i think i've understood my misunderstanding and it seems to offer the possibility to don't install symfony server when using composer create-project. Commented Jan 5, 2020 at 22:15
  • Basically identical as far as Symfony is concerned. Using the "symfony new" command causes your project to be automatically committed to git. That is about the only difference I have noticed. The web server bundle is no longer available under Symfony 5. The Symfony folks want you to use the installer because the executable is also used to access the Symfony Cloud service. Commented Jan 6, 2020 at 0:03

1 Answer 1

1

Summary

It does doesn't matter which way you go. Both commands will get you to the same place.

Composer

Composer is a dependency manager.

composer create-project is equivalent to:

  1. git clone some/project which creates a local copy
  2. composer install which installs the project's dependencies.

Composer Example

Let's say you have the following project:

  • /project-folder/
    • hello-script.php
    • composer.json

In the hello-script.php:

<?php
//hello-script.php
require "vendor/autoload.php";

use \Doctrine\Common\Inflector\Inflector;

echo 'hello script';
echo Inflector::ucwords('hello script', '-_ ');

In the composer.json file:

{
    "require": {
        "doctrine/inflector": "^1.3"
    }
}

To pull down the hello-script dependency Inflector you would run:

composer install

Results

To test you can run php hello-script.php on your command line.

//Output
hello script
Hello Script

Symfony

Symfony is a framework. It is a suite of tools for generating and serving a web application. The Symfony commands give you the ability to create new projects, serve the projects.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.