10000 Merge branch '4.2' · symfony/symfony-docs@c07bbc2 · GitHub
[go: up one dir, main page]

Skip to content

Commit c07bbc2

Browse files
committed
Merge branch '4.2'
* 4.2: Document the multi-host DSN for Memcache caches Minor reword in the testing article Mentioned all the debug:* commands Clarify a sentence Update serializer.rst Fix typos and improve wording for the Lock component documentation More precision about the log directory permissions Updated the output of debug:autowiring Minor tweak for translation:update command Added some missing steps in the main form login article
2 parents 50c0823 + 44c2f94 commit c07bbc2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+260
-57
lines changed

components/cache/adapters/memcached_adapter.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ helper method allows creating and configuring a `Memcached`_ class instance usin
6464
// etc...
6565
]);
6666

67+
// a single DSN can define multiple servers using the following syntax:
68+
// host[hostname-or-IP:port] (where port is optional). Sockets must include a trailing ':'
69+
$client = MemcachedAdapter::createConnection(
70+
'memcached:?host[localhost]&host[localhost:12345]&host[/some/memcached.sock:]=3'
71+
);
72+
73+
.. versionadded:: 4.2
74+
75+
The option to define multiple servers in a single DSN was introduced in Symfony 4.2.
76+
6777
The `Data Source Name (DSN)`_ for this adapter must use the following format:
6878

6979
.. code-block:: text

components/http_kernel.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ below for more details).
549549
There are two main listeners to ``kernel.exception`` when using the
550550
Symfony Framework.
551551

552-
**ExceptionListener in HttpKernel**
552+
**ExceptionListener in the HttpKernel Component**
553553

554554
The first comes core to the HttpKernel component
555555
and is called :class:`Symfony\\Component\\HttpKernel\\EventListener\\ExceptionListener`.
@@ -578,7 +578,7 @@ below for more details).
578578
controller to render is passed as a constructor argument to this listener.
579579
This controller will return the final ``Response`` for this error page.
580580

581-
**ExceptionListener in Security**
581+
**ExceptionListener in the Security Component**
582582

583583
The other important listener is the
584584
:class:`Symfony\\Component\\Security\\Http\\Firewall\\ExceptionListener`.

components/lock.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ with the ``release()`` method.
106106

107107
The trickiest part when working with expiring locks is choosing the right TTL.
108108
If it's too short, other processes could acquire the lock before finishing the
109-
job; it it's too long and the process crashes before calling the ``release()``
109+
job; if it's too long and the process crashes before calling the ``release()``
110110
method, the resource will stay locked until the timeout::
111111

112112
// ...
@@ -449,8 +449,8 @@ Some file systems (such as some types of NFS) do not support locking.
449449
always be locked on the same machine or to use a well configured shared file
450450
system.
451451

452-
Files on file system can be removed during a maintenance operation. For instance
453-
to cleanup the ``/tmp`` directory or after a reboot of the machine when directory
452+
Files on the file system can be removed during a maintenance operation. For instance,
453+
to clean up the ``/tmp`` directory or after a reboot of the machine when a directory
454454
uses tmpfs. It's not an issue if the lock is released when the process ended, but
455455
it is in case of ``Lock`` reused between requests.
456456

@@ -479,7 +479,7 @@ needs space to add new items.
479479

480480
.. caution::
481481

482-
Number of items stored in the Memcached must be under control. If it's not
482+
The number of items stored in Memcached must be under control. If it's not
483483
possible, LRU should be disabled and Lock should be stored in a dedicated
484484
Memcached service away from Cache.
485485

components/serializer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ when constructing the normalizer::
185185
$classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()));
186186
$normalizer = new ObjectNormalizer($classMetadataFactory);
187187
$serializer = new Serializer([$normalizer]);
188-
$person = $serializer->deserialize($data, 'Acme\Person', 'xml', [
188+
$person = $serializer->deserialize($data, 'App\Model\Person', 'xml', [
189189
'allow_extra_attributes' => false,
190190
]);
191191

form/create_custom_field_type.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ The goal of this field was to extend the choice type to enable selection of the
8787
shipping type. This is achieved by fixing the ``choices`` to a list of available
8888
shipping options.
8989

90+
.. tip::
91+
92+
Run the following command to verify that the form type was successfully
93+
registered in the application:
94+
95+
.. code-block:: terminal
96+
97+
$ php bin/console debug:form
98+
9099
Creating a Template for the Field
91100
---------------------------------
92101

form/create_form_type_extension.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,15 @@ Once the extension is registered, any method that you've overridden (e.g.
7878
``buildForm()``) will be called whenever *any* field of the given type
7979
(``FileType``) is built.
8080

81+
.. tip::
82+
83+
Run the following command to verify that the form type extension was
84+
successfully registered in the application:
85+
86+
.. code-block:: terminal
87+
88+
$ php bin/console debug:form
89+
8190
Adding the extension Business Logic
8291
-----------------------------------
8392

form/type_guesser.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,3 +232,12 @@ and tag it with ``form.type_guesser``:
232232
->getFormFactory();
233233

234234
// ...
235+
236+
.. tip::
237+
238+
Run the following command to verify that the form type guesser was
239+
successfullyregistered in the application:
240+
241+
.. code-block:: terminal
242+
243+
$ php bin/console debug:form

quick_tour/the_architecture.rst

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,21 @@ What other possible classes or interfaces could you use? Find out by running:
6363
6464
$ php bin/console debug:autowiring
6565
66-
=============================================================== =====================================
67-
Class/Interface Type Alias Service ID
68-
=============================================================== =====================================
69-
``Psr\Cache\CacheItemPoolInterface`` alias for "cache.app.recorder"
70-
``Psr\Log\LoggerInterface`` alias for "monolog.logger"
71-
``Symfony\Component\EventDispatcher\EventDispatcherInterface`` alias for "debug.event_dispatcher"
72-
``Symfony\Component\HttpFoundation\RequestStack`` alias for "request_stack"
73-
``Symfony\Component\HttpFoundation\Session\SessionInterface`` alias for "session"
74-
``Symfony\Component\Routing\RouterInterface`` alias for "router.default"
75-
=============================================================== =====================================
66+
# this is just a *small* sample of the output...
67+
68+
Describes a logger instance.
69+
Psr\Log\LoggerInterface (monolog.logger)
70+
71+
Request stack that controls the lifecycle of requests.
72+
Symfony\Component\HttpFoundation\RequestStack (request_stack)
73+
74+
Interface for the session.
75+
Symfony\Component\HttpFoundation\Session\SessionInterface (session)
76+
77+
RouterInterface is the interface that all Router classes must implement.
78+
Symfony\Component\Routing\RouterInterface (router.default)
79+
80+
[...]
7681
7782
This is just a short summary of the full list! And as you add more packages, this
7883
list of tools will grow!

reference/forms/types/birthday.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ option defaults to 120 years ago to the current year.
5050
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\BirthdayType` |
5151
+----------------------+-------------------------------------------------------------------------------+
5252

53+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
54+
5355
Overridden Options
5456
------------------
5557

reference/forms/types/button.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ A simple, non-responsive button.
1919
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\ButtonType` |
2020
+----------------------+----------------------------------------------------------------------+
2121

22+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
23+
2224
Inherited Options
2325
-----------------
2426

reference/forms/types/checkbox.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ if you want to handle submitted values like "0" or "false").
3737
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\CheckboxType` |
3838
+-------------+------------------------------------------------------------------------+
3939

40+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
41+
4042
Example Usage
4143
-------------
4244

reference/forms/types/choice.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ To use this field, you must specify *either* ``choices`` or ``choice_loader`` op
5050
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\ChoiceType` |
5151
+-------------+------------------------------------------------------------------------------+
5252

53+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
54+
5355
Example Usage
5456
-------------
5557

reference/forms/types/collection.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ photos).
4040
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\CollectionType` |
4141
+-------------+-----------------------------------------------------------------------------+
4242

43+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
44+
4345
.. note::
4446

4547
If you are working with a collection of Doctrine entities, pay special

reference/forms/types/color.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ element.
3636
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\ColorType` |
3737
+-------------+---------------------------------------------------------------------+
3838

39+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
40+
3941
Inherited Options
4042
-----------------
4143

reference/forms/types/country.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ the option manually, but then you should just use the ``ChoiceType`` directly.
5454
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\CountryType` |
5555
+-------------+-----------------------------------------------------------------------+
5656

57+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
58+
5759
Field Options
5860
-------------
5961

reference/forms/types/currency.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ manually, but then you should just use the ``ChoiceType`` directly.
4646
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\CurrencyType` |
4747
+-------------+------------------------------------------------------------------------+
4848

49+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
50+
4951
Field Options
5052
-------------
5153

reference/forms/types/date.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ and can understand a number of different input formats via the `input`_ option.
4747
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\DateType` |
4848
+----------------------+-----------------------------------------------------------------------------+
4949

50+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
51+
5052
Basic Usage
5153
-----------
5254

reference/forms/types/dateinterval.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ or an array (see `input`_).
5151
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\DateIntervalType` |
5252
+----------------------+----------------------------------------------------------------------------------+
5353

54+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
55+
5456
Basic Usage
5557
-----------
5658

reference/forms/types/datetime.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ the data can be a ``DateTime`` object, a string, a timestamp or an array.
5656
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\DateTimeType` |
5757
+----------------------+-----------------------------------------------------------------------------+
5858

59+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
60+
5961
Field Options
6062
-------------
6163

reference/forms/types/email.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ The ``EmailType`` field is a text field that is rendered using the HTML5
2929
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\EmailType` |
3030
+-------------+---------------------------------------------------------------------+
3131

32+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
33+
3234
Inherited Options
3335
-----------------
3436

reference/forms/types/entity.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ objects from the database.
5454
| Class | :class:`Symfony\\Bridge\\Doctrine\\Form\\Type\\EntityType` |
5555
+-------------+------------------------------------------------------------------+
5656

57+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
58+
5759
Basic Usage
5860
-----------
5961

reference/forms/types/file.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ The ``FileType`` represents a file input in your form.
3131
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\FileType` |
3232
+-------------+---------------------------------------------------------------------+
3333

34+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
35+
3436
Basic Usage
3537
-----------
3638

reference/forms/types/form.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ on all types for which ``FormType`` is the parent.
4646
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType` |
4747
+-----------+--------------------------------------------------------------------+
4848

49+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
50+
4951
Field Options
5052
-------------
5153

reference/forms/types/hidden.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ The hidden type represents a hidden input field.
2323
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\HiddenType` |
2424
+-------------+----------------------------------------------------------------------+
2525

26+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
27+
2628
Overridden Options
2729
------------------
2830

reference/forms/types/integer.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ integers. By default, all non-integer values (e.g. 6.78) will round down
4242
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\IntegerType` |
4343
+-------------+-----------------------------------------------------------------------+
4444

45+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
46+
4547
Field Options
4648
-------------
4749

reference/forms/types/language.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ manually, but then you should just use the ``ChoiceType`` directly.
5656
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\LanguageType` |
5757
+-------------+------------------------------------------------------------------------+
5858

59+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
60+
5961
Field Options
6062
-------------
6163

reference/forms/types/locale.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ manually, but then you should just use the ``ChoiceType`` directly.
5757
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\LocaleType` |
5858
+-------------+------------------------------------------------------------------------+
5959

60+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
61+
6062
Field Options
6163
-------------
6264

reference/forms/types/money.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ how the input and output of the data is handled.
4343
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\MoneyType` |
4444
+-------------+---------------------------------------------------------------------+
4545

46+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
47+
4648
Field Options
4749
-------------
4850

reference/forms/types/number.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ that you want to use for your number.
3838
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\NumberType` |
3939
+-------------+----------------------------------------------------------------------+
4040

41+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
42+
4143
Field Options
4244
-------------
4345

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.. tip::
2+
3+
The full list of options defined and inherited by this form type is
4+
available running this command in your app:
5+
6+
.. code-block:: terminal
7+
8+
# replace 'FooType' by the class name of your form type
9+
$ php bin/console debug:form FooType

reference/forms/types/password.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ The ``PasswordType`` field renders an input password text box.
3131
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\PasswordType` |
3232
+-------------+------------------------------------------------------------------------+
3333

34+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
35+
3436
Field Options
3537
-------------
3638

reference/forms/types/percent.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ This field adds a percentage sign "``%``" after the input box.
4040
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\PercentType` |
4141
+-------------+-----------------------------------------------------------------------+
4242

43+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
44+
4345
Field Options
4446
-------------
4547

reference/forms/types/radio.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ If you want to have a boolean field, use :doc:`CheckboxType </reference/forms/ty
4040
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\RadioType` |
4141
+-------------+---------------------------------------------------------------------+
4242

43+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
44+
4345
Inherited Options
4446
-----------------
4547

reference/forms/types/range.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ The ``RangeType`` field is a slider that is rendered using the HTML5
2929
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\RangeType` |
3030
+-------------+---------------------------------------------------------------------+
3131

32+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
33+
3234
Basic Usage
3335
-----------
3436

reference/forms/types/repeated.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ accuracy.
3535
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\RepeatedType` |
3636
+-------------+------------------------------------------------------------------------+
3737

38+
.. include:: /reference/forms/types/options/_debug_form.rst.inc
39+
3840
Example Usage
3941
-------------
4042

0 commit comments

Comments
 (0)
0