The Symfony Installer is a command line tool that helps you to create new Symfony applications. It requires PHP 5.4 or higher.
Open a terminal and execute the following commands:
sudo mkdir -p /usr/local/bin
sudo curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony
sudo chmod a+x /usr/local/bin/symfony
This creates a global symfony
executable that can be called from anywhere. You have to do this only once: now you can create as many Symfony projects with it as you want.
Once the installer is installed, you can use it to create a new Symfony project. Run the following command:
symfony new my_project_name
This command will create a new directory (called my_project_name
) containing the most recent version of the Symfony Standard Edition. It will also install all of its dependencies (including the actual Symfony components) using Composer.
If you want to select a specific Symfony version instead of the latest one, you can use the optional second argument of the new
command.
To select a minor version:
symfony new my_project_name 3.2
To select a patch version:
symfony new my_project_name 3.2.9
To select a beta version or release candidate:
symfony new my_project 2.7.0-BETA1
symfony new my_project 2.7.0-RC1
To select the most recent Long Term Support (LTS) version:
symfony new my_project_name lts