|
6 | 6 | Requirements for Running Symfony
|
7 | 7 | ================================
|
8 | 8 |
|
9 |
| -To run Symfony, your system needs to adhere to a list of requirements. You |
10 |
| -can easily see if your system passes all requirements by running the |
11 |
| -``web/config.php`` in your Symfony distribution. Since the CLI often uses |
12 |
| -a different ``php.ini`` configuration file, it's also a good idea to check |
13 |
| -your requirements from the command line via: |
| 9 | +Symfony 4.0 requires **PHP 7.1.3** or higher to run, in addition to other minor |
| 10 | +requirements. To make things simple, Symfony provides a tool to quickly check if |
| 11 | +your system meets all those requirements. Run this command to install the tool: |
14 | 12 |
|
15 | 13 | .. code-block:: terminal
|
16 | 14 |
|
17 |
| - $ php bin/symfony_requirements |
| 15 | + $ cd your-project/ |
| 16 | + $ composer require requirements-checker |
18 | 17 |
|
19 |
| -Below is the list of required and optional requirements. |
| 18 | +Beware that PHP can define a different configuration for the command console and |
| 19 | +the web server, so you need to check requirements in both environments. |
20 | 20 |
|
21 |
| -Required |
22 |
| --------- |
| 21 | +Checking Requirements for the Web Server |
| 22 | +---------------------------------------- |
23 | 23 |
|
24 |
| -* PHP needs to be a minimum version of PHP 5.5.9 |
25 |
| -* `JSON extension`_ needs to be enabled |
26 |
| -* `ctype extension`_ needs to be enabled |
27 |
| -* Your ``php.ini`` needs to have the ``date.timezone`` setting |
| 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. |
28 | 27 |
|
29 |
| -Optional |
30 |
| --------- |
| 28 | +Once you've fixed all the reported issues, uninstall the requirements checker |
| 29 | +to avoid leaking internal information about your application to visitors: |
31 | 30 |
|
32 |
| -* You need to have the PHP-XML module installed |
33 |
| -* You need to have at least version 2.6.21 of libxml |
34 |
| -* PHP tokenizer needs to be enabled |
35 |
| -* mbstring functions need to be enabled |
36 |
| -* iconv needs to be enabled |
37 |
| -* POSIX needs to be enabled (only on \*nix) |
38 |
| -* Intl needs to be installed with ICU 4+ |
39 |
| -* APC 3.0.17+ (or another opcode cache needs to be installed) |
40 |
| -* ``php.ini`` recommended settings |
41 |
| - |
42 |
| - * ``short_open_tag = Off`` |
43 |
| - * ``magic_quotes_gpc = Off`` |
44 |
| - * ``register_globals = Off`` |
45 |
| - * ``session.auto_start = Off`` |
| 31 | +.. code-block:: terminal |
46 | 32 |
|
47 |
| -Doctrine |
48 |
| --------- |
| 33 | + $ cd your-project/ |
| 34 | + $ composer remove requirements-checker |
49 | 35 |
|
50 |
| -If you want to use Doctrine, you will need to have PDO installed. Additionally, |
51 |
| -you need to have the PDO driver installed for the database server you want |
52 |
| -to use. |
| 36 | +Checking Requirements for the Command Console |
| 37 | +--------------------------------------------- |
53 | 38 |
|
54 |
| -.. _`JSON extension`: https://php.net/manual/book.json.php |
55 |
| -.. _`ctype extension`: https://php.net/manual/book.ctype.php |
| 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