Skip to content

List the minor requirements in requirements.rst #10862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 39 additions & 6 deletions reference/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,44 @@

.. _requirements-for-running-symfony2:

Requirements for Running Symfony
================================
Requirements for Running Symfony 4
==================================

Symfony 4 requires **PHP 7.1.3** or higher to run, in addition to other minor
requirements. To make things simple, Symfony provides a tool to quickly check if
your system meets all those requirements. Run this command to install the tool:
requirements:

PHP Extensions
~~~~~~~~~~~~~~
* The `Ctype`_ extension must be available
* The `iconv`_ extension must be available
* The `JSON`_ extension must be available
* The `PCRE`_ extension must be available (minimum version 8.0)
* The `Session`_ extension must be available
* The `SimpleXML`_ extension must be available
* The `Tokenizer`_ extension must be available

Please note that all these extensions are installed and enabled by default
in PHP 7+.

Other Requirements
~~~~~~~~~~~~~~~~~~
* The cache directory must me writable by the web server
* The logs directory must be writable by the web server
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it the case when installing the default skeleton? By default logs are outputted to stderr so it looks like an arbitrary limitation (especially annoying in a containerized environment).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it's the case, that's a feature provided by the kernel: ensuring there is a writeable directory available for logs (and cache) - unrelated to the actual logger that is used (or not)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One known issue is that the debug-pack installs Monolog... then the logs aren't outputted to stderr anymore (Monolog is a transient deps of EasyCorp/easy-log-handler, that is part of this pack). But in prod, no logs directory should be necessary.


Checking Requirements with Symfony Requirements Checker
-------------------------------------------------------
To make things simple, Symfony provides a tool to quickly check if
your system meets these requirements. In addition, the tool will
also provide recommendations if applicable.

Run this command to install the tool:

.. code-block:: terminal

$ cd your-project/
$ composer require symfony/requirements-checker

Beware that PHP can define a different configuration for the command console and
Beware that PHP may use different configurations for the command console and
the web server, so you need to check requirements in both environments.

Checking Requirements for the Web Server
Expand All @@ -38,4 +63,12 @@ Checking Requirements for the Command Console

The requirements checker tool adds a script to your Composer configuration to
check the requirements automatically. There's no need to execute any command; if
there is any issue, you'll see them in the console output.
there are any issues, you'll see them in the console output.

.. _iconv: http://php.net/manual/en/book.iconv.php
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should use https + short URLs: e.g. https://php.net/book.iconv here

.. _JSON: http://php.net/manual/en/book.json.php
.. _Session: http://php.net/manual/en/book.session.php
.. _Ctype: http://php.net/manual/en/book.ctype.php
.. _Tokenizer: http://php.net/manual/en/book.tokenizer.php
.. _SimpleXML: http://php.net/manual/en/book.simplexml.php
.. _PCRE: http://php.net/manual/en/book.pcre.php