Skip to content

Commit 45ba71b

Browse files
committed
feature #4811 Simplified some Symfony installation instructions (javiereguiluz)
This PR was merged into the 2.3 branch. Discussion ---------- Simplified some Symfony installation instructions | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | #4672 (partially) Before merging, the Symfony Installer must release its new version. Last time I checked, creating a new project based on a branch was ready in the GitHub repository, but not in the distributed installer. Commits ------- 004e0ad Moved the location of the labels c8b16cf Added labels for removed headings 11ac563 Fixed some bash comments a4451ce Updated the new Symfony installation instructions 4904d36 Simplified some Symfony installation instructions
2 parents fbdc177 + 004e0ad commit 45ba71b

File tree

3 files changed

+33
-61
lines changed

3 files changed

+33
-61
lines changed

best_practices/creating-the-project.rst

+6-26
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,15 @@ In the past, Symfony projects were created with `Composer`_, the dependency mana
88
for PHP applications. However, the current recommendation is to use the **Symfony
99
Installer**, which has to be installed before creating your first project.
1010

11-
Linux and Mac OS X Systems
12-
~~~~~~~~~~~~~~~~~~~~~~~~~~
13-
14-
Open your command console and execute the following:
15-
16-
.. code-block:: bash
17-
18-
$ curl -LsS http://symfony.com/installer > symfony.phar
19-
$ sudo mv symfony.phar /usr/local/bin/symfony
20-
$ chmod a+x /usr/local/bin/symfony
21-
22-
Now you can execute the Symfony Installer as a global system command called
23-
``symfony``.
24-
25-
Windows Systems
26-
~~~~~~~~~~~~~~~
27-
28-
Open your command console and execute the following:
29-
30-
.. code-block:: bash
31-
32-
c:\> php -r "readfile('http://symfony.com/installer');" > symfony.phar
11+
.. best-practice::
3312

34-
Then, move the downloaded ``symfony.phar`` file to your projects directory and
35-
execute it as follows:
13+
Use the Symfony Installer to create new Symfony-based projects.
3614

37-
.. code-block:: bash
15+
Read the :doc:`installation chapter </book/installation>` of the Symfony Book to
16+
learn how to install and use the Symfony Installer.
3817

39-
c:\> php symfony.phar
18+
.. _linux-and-mac-os-x-systems:
19+
.. _windows-systems:
4020

4121
Creating the Blog Application
4222
-----------------------------

book/installation.rst

+27-24
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ Installing and Configuring Symfony
66

77
The goal of this chapter is to get you up and running with a working application
88
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.
1110

1211
Installing the Symfony Installer
1312
--------------------------------
1413

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.
1817

1918
.. note::
2019

@@ -29,16 +28,14 @@ ways.
2928
Linux and Mac OS X Systems
3029
~~~~~~~~~~~~~~~~~~~~~~~~~~
3130

32-
Open your command console and execute the following three commands:
31+
Open your command console and execute the following commands:
3332

3433
.. code-block:: bash
3534
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
3937
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.
4239

4340
Windows Systems
4441
~~~~~~~~~~~~~~~
@@ -47,21 +44,21 @@ Open your command console and execute the following command:
4744

4845
.. code-block:: bash
4946
50-
c:\> php -r "readfile('http://symfony.com/installer');" > symfony.phar
47+
c:\> php -r "readfile('http://symfony.com/installer');" > symfony
5148
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
5350
execute it as follows:
5451

5552
.. code-block:: bash
5653
57-
c:\> move symfony.phar c:\projects
58-
c:\projects\> php symfony.phar
54+
c:\> move symfony c:\projects
55+
c:\projects\> php symfony
5956
6057
Creating the Symfony Application
6158
--------------------------------
6259

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:
6562

6663
.. code-block:: bash
6764
@@ -70,7 +67,7 @@ the ``new`` command:
7067
7168
# Windows
7269
c:\> cd projects/
73-
c:\projects\> php symfony.phar new my_project_name
70+
c:\projects\> php symfony new my_project_name
7471
7572
This command creates a new directory called ``my_project_name`` that contains a
7673
fresh new project based on the most recent stable Symfony version available. In
@@ -87,16 +84,22 @@ to meet those requirements.
8784
Basing your Project on a Specific Symfony Version
8885
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8986

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:
9289

9390
.. code-block:: bash
9491
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
9796
98-
# Windows
99-
c:\projects\> 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
100103
101104
If you want your project to be based on the latest :ref:`Symfony LTS version <releases-lts>`,
102105
pass ``lts`` as the second argument of the ``new`` command:

quick_tour/the_big_picture.rst

-11
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,6 @@ On **Linux** and **Mac OS X** systems, execute the following console commands:
3535
$ sudo mv symfony.phar /usr/local/bin/symfony
3636
$ chmod a+x /usr/local/bin/symfony
3737
38-
.. note::
39-
40-
If your system doesn't have cURL installed, execute the following
41-
commands instead:
42-
43-
.. code-block:: bash
44-
45-
$ php -r "readfile('http://symfony.com/installer');" > symfony.phar
46-
$ sudo mv symfony.phar /usr/local/bin/symfony
47-
$ chmod a+x /usr/local/bin/symfony
48-
4938
After installing the Symfony installer, you'll have to open a new console window
5039
to be able to execute the new ``symfony`` command:
5140

0 commit comments

Comments
 (0)