STERFIELD

Differences between Symfony 2.0.x and latest Symfony versions installation

Differences between Symfony 2.0.x and latest Symfony versions installation

There is a bit differences between Symfony 2.0.x and latest Symfony versions.

For symfony 2.o.x, firstly download the zip file from http://symfony.com/download(Legacy Release/Pick a specific version)

File and folder structure in symfony 2.0.x ,

Symfony

– app

– bin

– deps

– deps.lock

– src

– web

There is no “vendor” folder after archiving symfony 2.o.x.

To create “vendor” folder including all required third-party bundles: assetic, bundles, doctrine, monolog, symfony, twig etc

Please open Terminal(command line):

$ cd /var/www/html/Symfony/

* please be sure to add https to all links in “deps” file.

example:

[original data in deps]

[symfony]

    git=http://github.com/symfony/symfony.git

    version=v2.0.1

[edited]

[symfony]

    git=https://github.com/symfony/symfony.git

    version=v2.0.1

Then if it’s firstly installation symfony, type:

$ php bin/vendors install

bin/vendors will firstly look “deps” files and will automatically create “vendor” folder under /var/www/html/Symfony/

Or if you want to add new bundle or update existing ones:

$ php bin/vendors update

If you want to know, which symfony version did you install?

$ php app/console –version

If you want to know, how to use “php app/console” command,

$ php app/console –help

##############################

In Symfony latest version (2.3 or 2.4):

We can install symfony via terminal easily.

Please install composer:(on Linux disto)

$ curl -sS https://getcomposer.org/installer | php (assumed that you’ve already installed “curl” command)

$ mv composer.phar /usr/local/bin/composer

If so, you’ve already installed “composer” in your computer and can use “composer” command in Terminal.

$ cd /var/www/html/

Then composer will install symfony 2.3.7 (as above command) to /var/www/html/Symfony

Folder and file structure in symfony 2.3.7:

– app

– bin

– composer.json

– composer.lock

– src

– vendor

– web

$ cd Symfony

$ composer install

composer command will firstly look “composer.json” and automatically install required bundles.

If you want to add new bundle or update existing one,

$ composer update

If you want to know, which symfony version did you install?

$ php app/console –version

The End!

Author Profile

著者近影

スターフィールド編集部

SHARE

合わせて読みたい