Skip to content

Commit ca022ce

Browse files
committed
minor #11195 Consistency changes (OskarStark)
This PR was squashed before being merged into the 4.2 branch (closes #11195). Discussion ---------- Consistency changes This PR brings more consistency to the 4.2 branch and should be reviewed commit by commit. Commits ------- 1673298 Consistency changes
2 parents a2b8c5f + 1673298 commit ca022ce

27 files changed

+41
-41
lines changed

bundles/configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ The ``Configuration`` class to handle the sample configuration looks like::
197197
}
198198
}
199199

200-
.. versionadded:: 4.2
200+
.. deprecated:: 4.2
201201

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

components/config/definition.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ implements the :class:`Symfony\\Component\\Config\\Definition\\ConfigurationInte
6868
}
6969
}
7070

71-
.. versionadded:: 4.2
71+
.. deprecated:: 4.2
7272

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

components/serializer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ The ``CsvEncoder`` encodes to and decodes from CSV.
762762
You can pass the context key ``as_collection`` in order to have the results
763763
always as a collection.
764764

765-
.. versionadded:: 4.2
765+
.. deprecated:: 4.2
766766

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

components/var_dumper.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ server, which outputs it to its own console or to an HTML file:
111111
.. code-block:: terminal
112112
113113
# displays the dumped data in the console:
114-
$ ./bin/console server:dump
114+
$ php bin/console server:dump
115115
[OK] Server listening on tcp://0.0.0.0:9912
116116
117117
# stores the dumped data in a file using the HTML format:
118-
$ ./bin/console server:dump --format=html > dump.html
118+
$ php bin/console server:dump --format=html > dump.html
119119
120120
Inside a Symfony application, the output of the dump server is configured with
121121
the :ref:`dump_destination option <configuration-debug-dump_destination>` of the

controller.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ use:
298298
$ php bin/console make:crud Product
299299
300300
.. versionadded:: 1.2
301+
301302
The ``make:crud`` command was introduced in MakerBundle 1.2.
302303

303304
.. index::

controller/upload_file.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ There are some important things to consider in the code of the above controller:
189189
use the :method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::guessExtension`
190190
method to let Symfony guess the right extension according to the file MIME type;
191191

192-
.. versionadded:: 4.1
192+
.. deprecated:: 4.1
193193

194194
The :method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getClientSize`
195195
method was deprecated in Symfony 4.1 and will be removed in Symfony 5.0.

doctrine.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ which will help generate some code:
2929
.. code-block:: terminal
3030
3131
$ composer require symfony/orm-pack
32-
$ composer require symfony/maker-bundle --dev
32+
$ composer require --dev symfony/maker-bundle
3333
3434
Configuring the Database
3535
~~~~~~~~~~~~~~~~~~~~~~~~
@@ -117,6 +117,7 @@ need. The command will ask you some questions - answer them like done below:
117117
(press enter again to finish)
118118
119119
.. versionadded:: 1.3
120+
120121
The interactive behavior of the ``make:entity`` command was introduced
121122
in MakerBundle 1.3.
122123

@@ -332,9 +333,7 @@ to experiment:
332333
$ php bin/console make:controller ProductController
333334
334335
Inside the controller, you can create a new ``Product`` object, set data on it,
335-
and save it!
336-
337-
.. code-block:: php
336+
and save it::
338337

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

732731
.. code-block:: terminal
733732
734-
$ composer require doctrine/doctrine-fixtures-bundle --dev
733+
$ composer require --dev doctrine/doctrine-fixtures-bundle
735734
736735
Then, use the ``make:fixtures`` command to generate an empty fixture class:
737736

doctrine/registration_form.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Make sure MakerBundle is installed:
2121

2222
.. code-block:: terminal
2323
24-
$ composer require symfony/maker-bundle --dev
24+
$ composer require --dev symfony/maker-bundle
2525
2626
If you need any other dependencies, MakerBundle will tell you when you run each
2727
command.
@@ -50,6 +50,7 @@ To easiest way to build your registration form is by using the ``make:registrati
5050
command:
5151

5252
.. versionadded:: 1.11
53+
5354
The ``make:registration-form`` was introduced in MakerBundle 1.11.0.
5455

5556
.. code-block:: terminal

form/form_themes.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -287,30 +287,30 @@ following complex example where a ``TaskManagerType`` has a collection of
287287

288288
class TaskManagerType extends AbstractType
289289
{
290-
public function buildForm(FormBuilderInterface $builder, array $options = array())
290+
public function buildForm(FormBuilderInterface $builder, array $options = [])
291291
{
292292
// ...
293-
$builder->add('taskLists', CollectionType::class, array(
293+
$builder->add('taskLists', CollectionType::class, [
294294
'entry_type' => TaskListType::class,
295295
'block_name' => 'task_lists',
296-
));
296+
]);
297297
}
298298
}
299299

300300
class TaskListType extends AbstractType
301301
{
302-
public function buildForm(FormBuilderInterface $builder, array $options = array())
302+
public function buildForm(FormBuilderInterface $builder, array $options = [])
303303
{
304304
// ...
305-
$builder->add('tasks', CollectionType::class, array(
305+
$builder->add('tasks', CollectionType::class, [
306306
'entry_type' => TaskType::class,
307-
));
307+
]);
308308
}
309309
}
310310

311311
class TaskType
312312
{
313-
public function buildForm(FormBuilderInterface $builder, array $options = array())
313+
public function buildForm(FormBuilderInterface $builder, array $options = [])
314314
{
315315
$builder->add('name');
316316
// ...

frontend/encore/reactjs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Using React? First enable support for it in ``webpack.config.js``:
55

66
.. code-block:: terminal
77
8-
$ yarn add --dev @babel/preset-react
8+
$ yarn add @babel/preset-react --dev
99
$ yarn add react react-dom prop-types
1010
1111
Enable react in your ``webpack.config.js``:

messenger.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ like this:
416416

417417
.. code-block:: terminal
418418
419-
$ bin/console messenger:consume-messages amqp
419+
$ php bin/console messenger:consume-messages amqp
420420
421421
The first argument is the receiver's service name. It might have been created by
422422
your ``transports`` configuration or it can be your own receiver.

messenger/multiple_buses.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ You can also restrict the list to a specific bus by providing its name as argume
259259

260260
.. code-block:: terminal
261261
262-
$ bin/console debug:messenger
262+
$ php bin/console debug:messenger
263263
264264
Messenger
265265
=========

quick_tour/the_big_picture.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Install and run it with:
4646

4747
.. code-block:: terminal
4848
49-
$ composer require server --dev
49+
$ composer require --dev server
5050
$ php bin/console server:start
5151
5252
Try your new app by going to ``http://localhost:8000`` in a browser!

reference/configuration/framework.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1755,7 +1755,7 @@ strict_email
17551755

17561756
**type**: ``Boolean`` **default**: ``false``
17571757

1758-
.. versionadded:: 4.1
1758+
.. deprecated:: 4.1
17591759

17601760
The ``strict_email`` option was deprecated in Symfony 4.1. Use the new
17611761
``email_validation_mode`` option instead.

reference/configuration/kernel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Kernel Name
4646
**type**: ``string`` **default**: ``src`` (i.e. the directory name holding
4747
the kernel class)
4848

49-
.. versionadded:: 4.2
49+
.. deprecated:: 4.2
5050

5151
The ``kernel.name`` parameter and the ``Kernel::getName()`` method were
5252
deprecated in Symfony 4.2. If you need a unique ID for your kernels use the

reference/configuration/security.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ logout_on_user_change
159159

160160
**type**: ``boolean`` **default**: ``true``
161161

162-
.. versionadded:: 4.1
162+
.. deprecated:: 4.1
163163

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

reference/configuration/twig.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ paths
315315

316316
**type**: ``array`` **default**: ``null``
317317

318-
.. versionadded:: 4.2
318+
.. deprecated:: 4.2
319319

320320
Using the ``src/Resources/views/`` directory to store templates was
321321
deprecated in Symfony 4.2. Use instead the directory defined in the

reference/constraints/Email.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ checkHost
9696

9797
**type**: ``boolean`` **default**: ``false``
9898

99-
.. versionadded:: 4.2
99+
.. deprecated:: 4.2
100100

101101
This option was deprecated in Symfony 4.2.
102102

@@ -109,7 +109,7 @@ checkMX
109109

110110
**type**: ``boolean`` **default**: ``false``
111111

112-
.. versionadded:: 4.2
112+
.. deprecated:: 4.2
113113

114114
This option was deprecated in Symfony 4.2.
115115

reference/constraints/Locale.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ canonicalize
9292

9393
**type**: ``boolean`` **default**: ``false``
9494

95-
.. versionadded:: 4.1
95+
.. deprecated:: 4.1
9696

9797
Using this option with value ``false`` was deprecated in Symfony 4.1 and it
9898
will throw an exception in Symfony 5.0. Use ``true`` instead.

reference/constraints/Url.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ checkDNS
8585

8686
**type**: ``boolean`` **default**: ``false``
8787

88-
.. versionadded:: 4.1
88+
.. deprecated:: 4.1
8989

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

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

170-
.. versionadded:: 4.1
170+
.. deprecated:: 4.1
171171

172172
This option was deprecated in Symfony 4.1 and will be removed in Symfony 5.0,
173173
because checking the DNS records is not reliable enough to validate the

reference/forms/types/integer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ scale
8888

8989
**type**: ``integer`` **default**: ``0``
9090

91-
.. versionadded:: 4.2
91+
.. deprecated:: 4.2
9292

9393
The ``scale`` option is deprecated since Symfony 4.2 and will be removed
9494
in 5.0.

reference/forms/types/options/help.rst.inc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ help
44
**type**: ``string`` **default**: null
55

66
Allows you to define a help message for the form field, which by default is
7-
rendered below the field.
8-
9-
.. code-block:: php
7+
rendered below the field::
108

119
$builder->add('zip_code', null, [
1210
'help' => 'The ZIP/Postal code for your credit card\'s billing address.',

reference/forms/types/timezone.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ regions
7272

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

75-
.. versionadded:: 4.2
75+
.. deprecated:: 4.2
7676

7777
This option was deprecated in Symfony 4.2.
7878

security/form_login_setup.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ and your generated code may be slightly different:
3838
created: templates/security/login.html.twig
3939
4040
.. versionadded:: 1.8
41+
4142
Support for login form authentication was added to ``make:auth`` in MakerBundle 1.8.
4243

4344
This generates the following: 1) a login route & controller, 2) a template that

setup.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ In other words, your new app is ready!
3636
3737
# optional: install the web server bundle (explained next)
3838
$ cd my-project
39-
$ composer require symfony/web-server-bundle --dev
39+
$ composer require --dev symfony/web-server-bundle
4040
4141
Running your Symfony Application
4242
--------------------------------

setup/built_in_web_server.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Move into your project directory and run this command:
2727
.. code-block:: terminal
2828
2929
$ cd your-project/
30-
$ composer require symfony/web-server-bundle --dev
30+
$ composer require --dev symfony/web-server-bundle
3131
3232
Starting the Web Server
3333
-----------------------

translation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ method or the ``transchoice`` tag/filter in your :ref:`template <translation-tag
230230
For much more information, see :ref:`component-translation-pluralization`
231231
in the Translation component documentation.
232232

233-
.. versionadded:: 4.2
233+
.. deprecated:: 4.2
234234

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

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

390-
.. versionadded:: 4.2
390+
.. deprecated:: 4.2
391391

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

0 commit comments

Comments
 (0)