@@ -10,43 +10,57 @@ Installing & Setting up the Symfony Framework
10
10
Do you prefer video tutorials? Check out the `Stellar Development with Symfony `_
11
11
screencast series.
12
12
13
- To create your new Symfony application, first make sure you're using PHP 7.1 or
14
- higher and have ` Composer `_ installed. If you don't, start by ` installing Composer `_.
13
+ Installing Symfony
14
+ ------------------
15
15
16
- Create your new project by running:
16
+ Before creating your first Symfony application, make sure to meet the following
17
+ requirements:
18
+
19
+ * Your server has PHP 7.1 or higher installed (and :doc: `these PHP extensions </reference/requirements >`
20
+ which are installed and enabled by default by PHP);
21
+ * You have `installed Composer `_, which is used to install PHP packages;
22
+ * You have installed the :doc: `Symfony local web server </setup/symfony_server >`,
23
+ which provides all the tools you need to develop your application locally.
24
+
25
+ Once these requirements are installed, open your terminal and run any of these
26
+ commands to create the Symfony application:
17
27
18
28
.. code-block :: terminal
19
29
20
- $ composer create-project symfony/website-skeleton my-project
30
+ # run this if you are building a traditional web application
31
+ $ symfony new --full my_project
21
32
22
- This will create a new ``my-project `` directory, download some dependencies into
23
- it and even generate the basic directories and files you'll need to get started.
24
- In other words, your new app is ready!
33
+ # run this if you are building a microservice, console application or API
34
+ $ symfony new my-project
25
35
26
- .. tip ::
36
+ The only difference between these two commands is the number of packages
37
+ installed. The ``--full `` option installs all the packages that you usually
38
+ need to build web apps. Therefore, the installation size will be much bigger.
27
39
28
- The `` website-skeleton `` is optimized for traditional web applications. If
29
- you are building microservices, console applications or APIs, consider
30
- using the much simpler `` skeleton `` project:
40
+ Both commands will create a new `` my-project/ `` directory, download some
41
+ dependencies into it and even generate the basic directories and files you'll
42
+ need to get started. In other words, your new app is ready!
31
43
32
- .. code-block :: terminal
44
+ .. seealso ::
33
45
34
- $ composer create-project symfony/skeleton my-project
46
+ If you can't use the ``symfony `` command provided by the Symfony local web
47
+ server, use the alternative installation commands based on Composer and
48
+ displayed on the `Symfony download page `_.
35
49
36
50
Running your Symfony Application
37
51
--------------------------------
38
52
39
53
On production, you should use a web server like Nginx or Apache (see
40
54
:doc: `configuring a web server to run Symfony </setup/web_server_configuration >`).
41
55
But for development, it's more convenient to use the
42
- :doc: `Symfony Local Web Server </setup/symfony_server >`.
56
+ :doc: `Symfony Local Web Server </setup/symfony_server >` installed earlier .
43
57
44
58
This local server provides support for HTTP/2, TLS/SSL, automatic generation of
45
59
security certificates and many other features. It works with any PHP application,
46
60
not only Symfony projects, so it's a very useful development tool.
47
61
48
- ` Download the Symfony local web server `_, install it, move into your new project
49
- directory and start the local web server as follows:
62
+ Open your terminal, move into your new project directory and start the local web
63
+ server as follows:
50
64
51
65
.. code-block :: terminal
52
66
@@ -113,13 +127,6 @@ command which displays information about the app:
113
127
114
128
$ php bin/console about
115
129
116
- Checking for Security Vulnerabilities
117
- -------------------------------------
118
-
119
- Symfony provides a utility called the "Security Checker" to check whether your
120
- project's dependencies contain any known security vulnerability. Check out
121
- the integration instructions for `the Security Checker `_ to set it up.
122
-
123
130
The Symfony Demo application
124
131
----------------------------
125
132
@@ -153,8 +160,9 @@ Go Deeper with Setup
153
160
154
161
.. _`Stellar Development with Symfony` : http://symfonycasts.com/screencast/symfony
155
162
.. _`Composer` : https://getcomposer.org/
156
- .. _`installing Composer` : https://getcomposer.org/download/
163
+ .. _`installed Composer` : https://getcomposer.org/download/
157
164
.. _`Download the Symfony local web server` : https://symfony.com/download
165
+ .. _`Symfony download page` : https://symfony.com/download
158
166
.. _`the Security Checker` : https://github.com/sensiolabs/security-checker#integration
159
167
.. _`The Symfony Demo application` : https://github.com/symfony/demo
160
168
.. _`symfony/symfony-demo` : https://github.com/symfony/demo
0 commit comments