From d5778488d4fbd1a62fd56860202d5e1f3cf84db3 Mon Sep 17 00:00:00 2001 From: ogizanagi Date: Thu, 3 Dec 2015 17:31:28 +0100 Subject: [PATCH] Update docs accordingly to min PHP version requirement --- book/forms.rst | 4 +--- book/security.rst | 2 -- components/dom_crawler.rst | 6 ------ components/form/introduction.rst | 7 +------ components/var_dumper/introduction.rst | 5 ----- contributing/code/patches.rst | 8 ++++---- cookbook/configuration/micro-kernel-trait.rst | 6 ------ cookbook/deployment/azure-website.rst | 4 ++-- .../security/_ircmaxwell_password-compat.rst.inc | 13 ------------- cookbook/security/entity_provider.rst | 2 -- create_framework/introduction.rst | 7 +++---- reference/configuration/security.rst | 5 ----- reference/requirements.rst | 7 +------ 13 files changed, 12 insertions(+), 64 deletions(-) delete mode 100644 cookbook/security/_ircmaxwell_password-compat.rst.inc diff --git a/book/forms.rst b/book/forms.rst index cab2b60a11b..384cc9cbd8e 100644 --- a/book/forms.rst +++ b/book/forms.rst @@ -95,8 +95,6 @@ from inside a controller:: $form = $this->createFormBuilder($task) ->add('task', TextType::class) - // If you use PHP 5.3 or 5.4 you must use - // ->add('task', 'Symfony\Component\Form\Extension\Core\Type\TextType') ->add('dueDate', DateType::class) ->add('save', SubmitType::class, array('label' => 'Create Task')) ->getForm(); @@ -1978,4 +1976,4 @@ Learn more from the Cookbook .. _`form_div_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig .. _`Cross-site request forgery`: http://en.wikipedia.org/wiki/Cross-site_request_forgery .. _`view on GitHub`: https://github.com/symfony/symfony/tree/master/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form -.. _`2.8 UPGRADE Log`: https://github.com/symfony/symfony/blob/2.8/UPGRADE-2.8.md#form \ No newline at end of file +.. _`2.8 UPGRADE Log`: https://github.com/symfony/symfony/blob/2.8/UPGRADE-2.8.md#form diff --git a/book/security.rst b/book/security.rst index 5f410cac2ac..e0d5c3cb2a0 100644 --- a/book/security.rst +++ b/book/security.rst @@ -510,8 +510,6 @@ else, you'll want to encode their passwords. The best algorithm to use is // ... )); -.. include:: /cookbook/security/_ircmaxwell_password-compat.rst.inc - Of course, your users' passwords now need to be encoded with this exact algorithm. For hardcoded users, you can use an `online tool`_, which will give you something like this: diff --git a/components/dom_crawler.rst b/components/dom_crawler.rst index 2bb74fb4ac4..f9a3fe030f3 100644 --- a/components/dom_crawler.rst +++ b/components/dom_crawler.rst @@ -300,12 +300,6 @@ and :phpclass:`DOMNode` objects: The ``html`` method is new in Symfony 2.3. - .. caution:: - - Due to an issue in PHP, the ``html()`` method returns wrongly decoded HTML - entities in PHP versions lower than 5.3.6 (for example, it returns ``•`` - instead of ``•``). - Links ~~~~~ diff --git a/components/form/introduction.rst b/components/form/introduction.rst index 36a13fb9d28..a6515aa3aac 100644 --- a/components/form/introduction.rst +++ b/components/form/introduction.rst @@ -398,8 +398,6 @@ is created from the form factory. $form = $formFactory->createBuilder() ->add('task', TextType::class) - // If you use PHP 5.3 or 5.4, you must use - // ->add('task', 'Symfony\Component\Form\Extension\Core\Type\TextType') ->add('dueDate', DateType::class) ->getForm(); @@ -426,8 +424,6 @@ is created from the form factory. $form = $this->createFormBuilder() ->add('task', TextType::class) - // If you use PHP 5.3 or 5.4, you must use - // ->add('task', 'Symfony\Component\Form\Extension\Core\Type\TextType') ->add('dueDate', DateType::class) ->getForm(); @@ -439,8 +435,7 @@ is created from the form factory. As you can see, creating a form is like writing a recipe: you call ``add`` for each new field you want to create. The first argument to ``add`` is the -name of your field, and the second is the fully qualified class name. If you -use PHP 5.5 or above, you can use ``::class`` constant of a form type. The Form +name of your field, and the second is the fully qualified class name. The Form component comes with a lot of :doc:`built-in types `. Now that you've built your form, learn how to :ref:`render ` diff --git a/components/var_dumper/introduction.rst b/components/var_dumper/introduction.rst index 8f11a198c4d..9e97e3ec15d 100644 --- a/components/var_dumper/introduction.rst +++ b/components/var_dumper/introduction.rst @@ -145,11 +145,6 @@ Example:: } } -.. tip:: - - If you still use PHP 5.3, you can extend the - :class:`Symfony\\Component\\VarDumper\\Test\\VarDumperTestClass` instead. - Dump Examples and Output ------------------------ diff --git a/contributing/code/patches.rst b/contributing/code/patches.rst index 7d5ef0c3452..b4f0b2ba4fa 100644 --- a/contributing/code/patches.rst +++ b/contributing/code/patches.rst @@ -14,14 +14,14 @@ Before working on Symfony, setup a friendly environment with the following software: * Git; -* PHP version 5.3.9 or above; +* PHP version 5.5.9 or above; * `PHPUnit`_ 4.2 or above. .. caution:: - Before Symfony 2.7, the minimal PHP version was 5.3.3. Please keep - this in mind, if you are working on a bug fix for earlier versions - of Symfony. + Before Symfony 2.7, the minimal PHP version was 5.3.3. Before Symfony 3.0, + minimal version was 5.3.9. Please keep this in mind, if you are working on a + bug fix for earlier versions of Symfony. Configure Git ~~~~~~~~~~~~~ diff --git a/cookbook/configuration/micro-kernel-trait.rst b/cookbook/configuration/micro-kernel-trait.rst index 79f1d474f6d..7e4563f34bb 100644 --- a/cookbook/configuration/micro-kernel-trait.rst +++ b/cookbook/configuration/micro-kernel-trait.rst @@ -11,12 +11,6 @@ as one file? This is possible thanks to the new you to start with a tiny application, and then add features and structure as you need to. -.. note:: - - The MicroKernelTrait requires PHP 5.4. However, there's nothing special about - this trait. If you're using PHP 5.3, simply copy its methods into *your* kernel - class to get the same functionality. - A Single-File Symfony Application --------------------------------- diff --git a/cookbook/deployment/azure-website.rst b/cookbook/deployment/azure-website.rst index 0480442fabd..54c6175b55f 100644 --- a/cookbook/deployment/azure-website.rst +++ b/cookbook/deployment/azure-website.rst @@ -96,8 +96,8 @@ and how to properly configure PHP for a production environment. Configuring the latest PHP Runtime ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Even though Symfony only requires PHP 5.3.9 to run, it's always recommended -to use the most recent PHP version whenever possible. PHP 5.3 is no longer +Even though Symfony only requires PHP 5.5.9 to run, it's always recommended +to use the most recent PHP version whenever possible. Earlier versions are no longer supported by the PHP core team, but you can update it easily in Azure. To update your PHP version on Azure, go to the **Configure** tab of the control diff --git a/cookbook/security/_ircmaxwell_password-compat.rst.inc b/cookbook/security/_ircmaxwell_password-compat.rst.inc deleted file mode 100644 index 3f96c454488..00000000000 --- a/cookbook/security/_ircmaxwell_password-compat.rst.inc +++ /dev/null @@ -1,13 +0,0 @@ -.. caution:: - - If you're using PHP 5.4 or lower, you'll need to install the ``ircmaxell/password-compat`` - library via Composer in order to be able to use the ``bcrypt`` encoder: - - .. code-block:: json - - { - "require": { - ... - "ircmaxell/password-compat": "~1.0.3" - } - } diff --git a/cookbook/security/entity_provider.rst b/cookbook/security/entity_provider.rst index ced1039a28a..5b435ecf799 100644 --- a/cookbook/security/entity_provider.rst +++ b/cookbook/security/entity_provider.rst @@ -291,8 +291,6 @@ name ``our_db_provider`` isn't important: it just needs to match the value of the ``provider`` key under your firewall. Or, if you don't set the ``provider`` key under your firewall, the first "user provider" is automatically used. -.. include:: /cookbook/security/_ircmaxwell_password-compat.rst.inc - Creating your First User ~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/create_framework/introduction.rst b/create_framework/introduction.rst index 1d1bb864639..ead809f4ca8 100644 --- a/create_framework/introduction.rst +++ b/create_framework/introduction.rst @@ -69,7 +69,7 @@ Before You Start Reading about how to create a framework is not enough. You will have to follow along and actually type all the examples included in this tutorial. For that, -you need a recent version of PHP (5.3.9 or later is good enough), a web server +you need a recent version of PHP (5.5.9 or later is good enough), a web server (like Apache, NGinx or PHP's built-in web server), a good knowledge of PHP and an understanding of Object Oriented programming. @@ -109,9 +109,8 @@ start with the simplest web application we can think of in PHP:: printf('Hello %s', $input); -If you have PHP 5.4, you can use the PHP built-in server to test this great -application in a browser (``http://localhost:4321/index.php?name=Fabien``). -Otherwise, use your own server (Apache, Nginx, etc.): +You can use the PHP built-in server to test this great +application in a browser (``http://localhost:4321/index.php?name=Fabien``): .. code-block:: bash diff --git a/reference/configuration/security.rst b/reference/configuration/security.rst index 7ebc489b2eb..22c99a171e2 100644 --- a/reference/configuration/security.rst +++ b/reference/configuration/security.rst @@ -354,11 +354,6 @@ for the hash algorithm. Using the BCrypt Password Encoder --------------------------------- -.. caution:: - - To use this encoder, you either need to use PHP Version 5.5 or install - the `ircmaxell/password-compat`_ library via Composer. - .. configuration-block:: .. code-block:: yaml diff --git a/reference/requirements.rst b/reference/requirements.rst index a0f9e262846..9ff4d99665d 100644 --- a/reference/requirements.rst +++ b/reference/requirements.rst @@ -21,16 +21,11 @@ Below is the list of required and optional requirements. Required -------- -* PHP needs to be a minimum version of PHP 5.3.9 +* PHP needs to be a minimum version of PHP 5.5.9 * JSON needs to be enabled * ctype needs to be enabled * Your ``php.ini`` needs to have the ``date.timezone`` setting -.. caution:: - - Be aware that Symfony has some known limitations when using PHP 5.3.16. - For more information see the `Requirements section of the README`_. - Optional --------