Skip to content

Consistency changes #11195

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 7 commits into from
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion bundles/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ The ``Configuration`` class to handle the sample configuration looks like::
}
}

.. versionadded:: 4.2
.. deprecated:: 4.2

Not passing the root node name to ``TreeBuilder`` was deprecated in Symfony 4.2.

Expand Down
2 changes: 1 addition & 1 deletion components/config/definition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ implements the :class:`Symfony\\Component\\Config\\Definition\\ConfigurationInte
}
}

.. versionadded:: 4.2
.. deprecated:: 4.2

Not passing the root node name to ``TreeBuilder`` was deprecated in Symfony 4.2.

Expand Down
2 changes: 1 addition & 1 deletion components/serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ The ``CsvEncoder`` encodes to and decodes from CSV.
You can pass the context key ``as_collection`` in order to have the results
always as a collection.

.. versionadded:: 4.2
.. deprecated:: 4.2

Relying on the default value ``false`` is deprecated since Symfony 4.2.

Expand Down
4 changes: 2 additions & 2 deletions components/var_dumper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ server, which outputs it to its own console or to an HTML file:
.. code-block:: terminal

# displays the dumped data in the console:
$ ./bin/console server:dump
$ php bin/console server:dump
[OK] Server listening on tcp://0.0.0.0:9912

# stores the dumped data in a file using the HTML format:
$ ./bin/console server:dump --format=html > dump.html
$ php bin/console server:dump --format=html > dump.html

Inside a Symfony application, the output of the dump server is configured with
the :ref:`dump_destination option <configuration-debug-dump_destination>` of the
Expand Down
1 change: 1 addition & 0 deletions controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ use:
$ php bin/console make:crud Product

.. versionadded:: 1.2

The ``make:crud`` command was introduced in MakerBundle 1.2.

.. index::
Expand Down
2 changes: 1 addition & 1 deletion controller/upload_file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ There are some important things to consider in the code of the above controller:
use the :method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::guessExtension`
method to let Symfony guess the right extension according to the file MIME type;

.. versionadded:: 4.1
.. deprecated:: 4.1

The :method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getClientSize`
method was deprecated in Symfony 4.1 and will be removed in Symfony 5.0.
Expand Down
9 changes: 4 additions & 5 deletions doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ which will help generate some code:
.. code-block:: terminal

$ composer require symfony/orm-pack
$ composer require symfony/maker-bundle --dev
$ composer require --dev symfony/maker-bundle

Configuring the Database
~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -117,6 +117,7 @@ need. The command will ask you some questions - answer them like done below:
(press enter again to finish)

.. versionadded:: 1.3

The interactive behavior of the ``make:entity`` command was introduced
in MakerBundle 1.3.

Expand Down Expand Up @@ -332,9 +333,7 @@ to experiment:
$ php bin/console make:controller ProductController

Inside the controller, you can create a new ``Product`` object, set data on it,
and save it!

.. code-block:: php
and save it::

// src/Controller/ProductController.php
namespace App\Controller;
Expand Down Expand Up @@ -731,7 +730,7 @@ data into your project (i.e. "fixture data"). Install it with:

.. code-block:: terminal

$ composer require doctrine/doctrine-fixtures-bundle --dev
$ composer require --dev doctrine/doctrine-fixtures-bundle

Then, use the ``make:fixtures`` command to generate an empty fixture class:

Expand Down
3 changes: 2 additions & 1 deletion doctrine/registration_form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Make sure MakerBundle is installed:

.. code-block:: terminal

$ composer require symfony/maker-bundle --dev
$ composer require --dev symfony/maker-bundle

If you need any other dependencies, MakerBundle will tell you when you run each
command.
Expand Down Expand Up @@ -50,6 +50,7 @@ To easiest way to build your registration form is by using the ``make:registrati
command:

.. versionadded:: 1.11

The ``make:registration-form`` was introduced in MakerBundle 1.11.0.

.. code-block:: terminal
Expand Down
14 changes: 7 additions & 7 deletions form/form_themes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -287,30 +287,30 @@ following complex example where a ``TaskManagerType`` has a collection of

class TaskManagerType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options = array())
public function buildForm(FormBuilderInterface $builder, array $options = [])
{
// ...
$builder->add('taskLists', CollectionType::class, array(
$builder->add('taskLists', CollectionType::class, [
'entry_type' => TaskListType::class,
'block_name' => 'task_lists',
));
]);
}
}

class TaskListType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options = array())
public function buildForm(FormBuilderInterface $builder, array $options = [])
{
// ...
$builder->add('tasks', CollectionType::class, array(
$builder->add('tasks', CollectionType::class, [
'entry_type' => TaskType::class,
));
]);
}
}

class TaskType
{
public function buildForm(FormBuilderInterface $builder, array $options = array())
public function buildForm(FormBuilderInterface $builder, array $options = [])
{
$builder->add('name');
// ...
Expand Down
2 changes: 1 addition & 1 deletion frontend/encore/reactjs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Using React? First enable support for it in ``webpack.config.js``:

.. code-block:: terminal

$ yarn add --dev @babel/preset-react
$ yarn add @babel/preset-react --dev
$ yarn add react react-dom prop-types

Enable react in your ``webpack.config.js``:
Expand Down
2 changes: 1 addition & 1 deletion messenger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ like this:

.. code-block:: terminal

$ bin/console messenger:consume-messages amqp
$ php bin/console messenger:consume-messages amqp

The first argument is the receiver's service name. It might have been created by
your ``transports`` configuration or it can be your own receiver.
Expand Down
2 changes: 1 addition & 1 deletion messenger/multiple_buses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ You can also restrict the list to a specific bus by providing its name as argume

.. code-block:: terminal

$ bin/console debug:messenger
$ php bin/console debug:messenger

Messenger
=========
Expand Down
2 changes: 1 addition & 1 deletion quick_tour/the_big_picture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Install and run it with:

.. code-block:: terminal

$ composer require server --dev
$ composer require --dev server
$ php bin/console server:start

Try your new app by going to ``http://localhost:8000`` in a browser!
Expand Down
2 changes: 1 addition & 1 deletion reference/configuration/framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1755,7 +1755,7 @@ strict_email

**type**: ``Boolean`` **default**: ``false``

.. versionadded:: 4.1
.. deprecated:: 4.1

The ``strict_email`` option was deprecated in Symfony 4.1. Use the new
``email_validation_mode`` option instead.
Expand Down
2 changes: 1 addition & 1 deletion reference/configuration/kernel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Kernel Name
**type**: ``string`` **default**: ``src`` (i.e. the directory name holding
the kernel class)

.. versionadded:: 4.2
.. deprecated:: 4.2

The ``kernel.name`` parameter and the ``Kernel::getName()`` method were
deprecated in Symfony 4.2. If you need a unique ID for your kernels use the
Expand Down
2 changes: 1 addition & 1 deletion reference/configuration/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ logout_on_user_change

**type**: ``boolean`` **default**: ``true``

.. versionadded:: 4.1
.. deprecated:: 4.1

The ``logout_on_user_change`` option was deprecated in Symfony 4.1.

Expand Down
2 changes: 1 addition & 1 deletion reference/configuration/twig.rst
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ paths

**type**: ``array`` **default**: ``null``

.. versionadded:: 4.2
.. deprecated:: 4.2

Using the ``src/Resources/views/`` directory to store templates was
deprecated in Symfony 4.2. Use instead the directory defined in the
Expand Down
4 changes: 2 additions & 2 deletions reference/constraints/Email.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ checkHost

**type**: ``boolean`` **default**: ``false``

.. versionadded:: 4.2
.. deprecated:: 4.2

This option was deprecated in Symfony 4.2.

Expand All @@ -109,7 +109,7 @@ checkMX

**type**: ``boolean`` **default**: ``false``

.. versionadded:: 4.2
.. deprecated:: 4.2

This option was deprecated in Symfony 4.2.

Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/Locale.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ canonicalize

**type**: ``boolean`` **default**: ``false``

.. versionadded:: 4.1
.. deprecated:: 4.1

Using this option with value ``false`` was deprecated in Symfony 4.1 and it
will throw an exception in Symfony 5.0. Use ``true`` instead.
Expand Down
4 changes: 2 additions & 2 deletions reference/constraints/Url.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ checkDNS

**type**: ``boolean`` **default**: ``false``

.. versionadded:: 4.1
.. deprecated:: 4.1

This option was deprecated in Symfony 4.1 and will be removed in Symfony 5.0,
because checking the DNS records is not reliable enough to validate the
Expand Down Expand Up @@ -167,7 +167,7 @@ dnsMessage

**type**: ``string`` **default**: ``The host could not be resolved.``

.. versionadded:: 4.1
.. deprecated:: 4.1

This option was deprecated in Symfony 4.1 and will be removed in Symfony 5.0,
because checking the DNS records is not reliable enough to validate the
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/integer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ scale

**type**: ``integer`` **default**: ``0``

.. versionadded:: 4.2
.. deprecated:: 4.2

The ``scale`` option is deprecated since Symfony 4.2 and will be removed
in 5.0.
Expand Down
4 changes: 1 addition & 3 deletions reference/forms/types/options/help.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ help
**type**: ``string`` **default**: null

Allows you to define a help message for the form field, which by default is
rendered below the field.

.. code-block:: php
rendered below the field::

$builder->add('zip_code', null, [
'help' => 'The ZIP/Postal code for your credit card\'s billing address.',
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/timezone.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ regions

**type**: ``int`` **default**: ``\DateTimeZone::ALL``

.. versionadded:: 4.2
.. deprecated:: 4.2

This option was deprecated in Symfony 4.2.

Expand Down
1 change: 1 addition & 0 deletions security/form_login_setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ and your generated code may be slightly different:
created: templates/security/login.html.twig

.. versionadded:: 1.8

Support for login form authentication was added to ``make:auth`` in MakerBundle 1.8.

This generates the following: 1) a login route & controller, 2) a template that
Expand Down
2 changes: 1 addition & 1 deletion setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ In other words, your new app is ready!

# optional: install the web server bundle (explained next)
$ cd my-project
$ composer require symfony/web-server-bundle --dev
$ composer require --dev symfony/web-server-bundle

Running your Symfony Application
--------------------------------
Expand Down
2 changes: 1 addition & 1 deletion setup/built_in_web_server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Move into your project directory and run this command:
.. code-block:: terminal

$ cd your-project/
$ composer require symfony/web-server-bundle --dev
$ composer require --dev symfony/web-server-bundle

Starting the Web Server
-----------------------
Expand Down
4 changes: 2 additions & 2 deletions translation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ method or the ``transchoice`` tag/filter in your :ref:`template <translation-tag
For much more information, see :ref:`component-translation-pluralization`
in the Translation component documentation.

.. versionadded:: 4.2
.. deprecated:: 4.2

In Symfony 4.2 the ``Translator::transChoice()`` method was deprecated in
favor of using ``Translator::trans()`` with ``%count%`` as the parameter
Expand Down Expand Up @@ -387,7 +387,7 @@ Symfony looks for message files (i.e. translations) in the following default loc

* the ``Resources/translations/`` directory inside of any bundle.

.. versionadded:: 4.2
.. deprecated:: 4.2

Using the ``src/Resources/<bundle name>/translations/`` directory to store
translations was deprecated in Symfony 4.2. Use instead the directory
Expand Down