|
6 | 6 | Requirements for Running Symfony |
7 | 7 | ================================ |
8 | 8 |
|
9 | | -Symfony 3.4 requires **PHP 5.5.9** or higher to run, in addition to other minor |
| 9 | +Symfony 4.0 requires **PHP 7.1.3** or higher to run, in addition to other minor |
10 | 10 | requirements. To make things simple, Symfony provides a tool to quickly check if |
11 | | -your system meets all those requirements. |
| 11 | +your system meets all those requirements. Run this command to install the tool: |
| 12 | + |
| 13 | +.. code-block:: terminal |
| 14 | +
|
| 15 | + $ cd your-project/ |
| 16 | + $ composer require requirements-checker |
12 | 17 |
|
13 | 18 | Beware that PHP can define a different configuration for the command console and |
14 | 19 | the web server, so you need to check requirements in both environments. |
15 | 20 |
|
16 | 21 | Checking Requirements for the Web Server |
17 | 22 | ---------------------------------------- |
18 | 23 |
|
19 | | -Symfony includes a ``config.php`` file in the ``web/`` directory of your project. |
20 | | -Open that file with your browser to check the requirements. |
| 24 | +The requirements checker tool creates a file called ``check.php`` in the |
| 25 | +``public/`` directory of your project. Open that file with your browser to check |
| 26 | +the requirements. |
21 | 27 |
|
22 | | -Once you've fixed all the reported issues, delete the ``web/config.php`` file |
23 | | -to avoid leaking internal information about your application to visitors. |
| 28 | +Once you've fixed all the reported issues, uninstall the requirements checker |
| 29 | +to avoid leaking internal information about your application to visitors: |
24 | 30 |
|
25 | | -Checking Requirements for the Command Console |
26 | | ---------------------------------------------- |
| 31 | +.. code-block:: terminal |
27 | 32 |
|
28 | | -Open your console or terminal, enter in your project directory, execute this |
29 | | -command and fix the reported issues: |
| 33 | + $ cd your-project/ |
| 34 | + $ composer remove requirements-checker |
30 | 35 |
|
31 | | -.. code-block:: terminal |
| 36 | +Checking Requirements for the Command Console |
| 37 | +--------------------------------------------- |
32 | 38 |
|
33 | | - $ cd my-project/ |
34 | | - $ php bin/symfony_requirements |
| 39 | +The requirements checker tool adds a script to your Composer configuration to |
| 40 | +check the requirements automatically. There's no need to execute any command; if |
| 41 | +there is any issue, you'll see them in the console output. |
0 commit comments