Skip to content
Advertisement

How do I create a project based on a specific version of Symfony using composer?

I want to create a project based on Symfony 2.4.6.

These commands:

../composer.phar create-project symfony/framework-standard-edition=v2.4.6 ./
../composer.phar create-project symfony/framework-standard-edition ./ 2.4.6
../composer.phar create-project symfony/framework-standard-edition ./ v2.4.6

all say that they are installing Symfony 2.4.6, but I end up with 2.4.9 in my composer.lock and in vendors/. Is there a way to force creation of a project based specifically on 2.4.6?

Advertisement

Answer

try the Symfony Installer

To create a traditional web application :

symfony new --full my_project_name

and to build a lightweight app like a microservice, console application or API :

symfony new my_project_name

to install the current LTS version :

symfony new my_project_name --version=lts

to install the latest stable version :

symfony new my_project_name --version=stable

to install the development version :

symfony new my_project_name --version=next

to install a specific version :

symfony new my_project_name --version=4.4

OR with composer :

composer create-project symfony/website-skeleton my_project ^4.4.0

to install a full project in the 4.4.X stable version

or :

composer create-project symfony/skeleton my_project ^4.4.0 

to install a lightweight project with fewer requirements

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement