@@ -6,15 +6,14 @@ Installing and Configuring Symfony
6
6
7
7
The goal of this chapter is to get you up and running with a working application
8
8
built on top of Symfony. In order to simplify the process of creating new
9
- applications, Symfony provides an installer that must be installed before
10
- creating the first application.
9
+ applications, Symfony provides an installer application.
11
10
12
11
Installing the Symfony Installer
13
12
--------------------------------
14
13
15
- Using the Symfony Installer is the only recommended way to create new Symfony
16
- applications. This installer is a PHP application that has to be installed
17
- only once and then it can create any number of Symfony applications.
14
+ Using the ** Symfony Installer ** is the only recommended way to create new Symfony
15
+ applications. This installer is a PHP application that has to be installed in your
16
+ system only once and then it can create any number of Symfony applications.
18
17
19
18
.. note ::
20
19
@@ -29,16 +28,14 @@ ways.
29
28
Linux and Mac OS X Systems
30
29
~~~~~~~~~~~~~~~~~~~~~~~~~~
31
30
32
- Open your command console and execute the following three commands:
31
+ Open your command console and execute the following commands:
33
32
34
33
.. code-block :: bash
35
34
36
- $ curl -LsS http://symfony.com/installer > symfony.phar
37
- $ sudo mv symfony.phar /usr/local/bin/symfony
38
- $ chmod a+x /usr/local/bin/symfony
35
+ $ sudo curl -LsS http://symfony.com/installer -o /usr/local/bin/symfony
36
+ $ sudo chmod a+x /usr/local/bin/symfony
39
37
40
- This will create a global ``symfony `` command in your system that will be used
41
- to create new Symfony applications.
38
+ This will create a global ``symfony `` command in your system.
42
39
43
40
Windows Systems
44
41
~~~~~~~~~~~~~~~
@@ -47,21 +44,21 @@ Open your command console and execute the following command:
47
44
48
45
.. code-block :: bash
49
46
50
- c:\> php -r " readfile('http://symfony.com/installer');" > symfony.phar
47
+ c:\> php -r " readfile('http://symfony.com/installer');" > symfony
51
48
52
- Then, move the downloaded ``symfony.phar `` file to your projects directory and
49
+ Then, move the downloaded ``symfony `` file to your projects directory and
53
50
execute it as follows:
54
51
55
52
.. code-block :: bash
56
53
57
- c:\> move symfony.phar c:\p rojects
58
- c:\p rojects\> php symfony.phar
54
+ c:\> move symfony c:\p rojects
55
+ c:\p rojects\> php symfony
59
56
60
57
Creating the Symfony Application
61
58
--------------------------------
62
59
63
- Once the Symfony Installer is ready , create your first Symfony application with
64
- the ``new `` command:
60
+ Once the Symfony Installer is available , create your first Symfony application
61
+ with the ``new `` command:
65
62
66
63
.. code-block :: bash
67
64
@@ -70,7 +67,7 @@ the ``new`` command:
70
67
71
68
# Windows
72
69
c:\> cd projects/
73
- c:\p rojects\> php symfony.phar new my_project_name
70
+ c:\p rojects\> php symfony new my_project_name
74
71
75
72
This command creates a new directory called ``my_project_name `` that contains a
76
73
fresh new project based on the most recent stable Symfony version available. In
@@ -87,16 +84,22 @@ to meet those requirements.
87
84
Basing your Project on a Specific Symfony Version
88
85
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89
86
90
- If your project needs to be based on a specific Symfony version, pass the version
91
- number as the second argument of the ``new `` command:
87
+ In case your project needs to be based on a specific Symfony version, use the
88
+ optional second argument of the ``new `` command:
92
89
93
90
.. code-block :: bash
94
91
95
- # Linux, Mac OS X
96
- $ symfony new my_project_name 2.3.23
92
+ # use the most recent version in any Symfony branch
93
+ $ symfony new my_project_name 2.3
94
+ $ symfony new my_project_name 2.5
95
+ $ symfony new my_project_name 2.6
97
96
98
- # Windows
99
- c:\p rojects\> php symfony.phar new my_project_name 2.3.23
97
+ # use a specific Symfony version
98
+ $ symfony new my_project_name 2.3.26
99
+ $ symfony new my_project_name 2.6.5
100
+
101
+ # use the most recent LTS (Long Term Support) version
102
+ $ symfony new my_project_name lts
100
103
101
104
If you want your project to be based on the latest :ref: `Symfony LTS version <releases-lts >`,
102
105
pass ``lts `` as the second argument of the ``new `` command:
0 commit comments