Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 01d2fd4

Browse filesBrowse files
committed
minor #7823 Mentioned that form related services can now be private (javiereguiluz)
This PR was squashed before being merged into the master branch (closes #7823). Discussion ---------- Mentioned that form related services can now be private This fixes #7687. Commits ------- d7fd0cb Mentioned that form related services can now be private
2 parents 782b092 + d7fd0cb commit 01d2fd4
Copy full SHA for 01d2fd4
Expand file treeCollapse file tree

6 files changed

+25
-0
lines changed

‎form/create_custom_field_type.rst

Copy file name to clipboardExpand all lines: form/create_custom_field_type.rst
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,10 @@ the ``genders`` parameter value as the first argument to its to-be-created
339339
Make sure the services file is being imported. See :ref:`service-container-imports-directive`
340340
for details.
341341

342+
.. versionadded:: 3.3
343+
Prior to Symfony 3.3, you needed to define form type services as ``public``.
344+
Starting from Symfony 3.3, you can also define them as ``private``.
345+
342346
First, add a ``__construct`` method to ``GenderType``, which receives the gender
343347
configuration::
344348

‎form/create_form_type_extension.rst

Copy file name to clipboardExpand all lines: form/create_form_type_extension.rst
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ The ``extended_type`` key of the tag is the type of field that this extension sh
131131
be applied to. In your case, as you want to extend the ``Symfony\Component\Form\Extension\Core\Type\FileType``
132132
field type, you will use that as the ``extended_type``.
133133

134+
.. versionadded:: 3.3
135+
Prior to Symfony 3.3, you needed to define type extension services as ``public``.
136+
Starting from Symfony 3.3, you can also define them as ``private``.
137+
134138
.. tip::
135139

136140
There is an optional tag attribute called ``priority``, which

‎form/data_transformers.rst

Copy file name to clipboardExpand all lines: form/data_transformers.rst
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,11 +334,16 @@ Define the form type as a service in your configuration files.
334334
)
335335
->addTag('form.type')
336336
;
337+
337338
.. tip::
338339

339340
For more information about defining form types as services, read
340341
:doc:`register your form type as a service </form/form_dependencies>`.
341342

343+
.. versionadded:: 3.3
344+
Prior to Symfony 3.3, you needed to define form type services as ``public``.
345+
Starting from Symfony 3.3, you can also define them as ``private``.
346+
342347
Now, you can easily use your ``TaskType``::
343348

344349
// e.g. in a controller somewhere

‎form/dynamic_form_modification.rst

Copy file name to clipboardExpand all lines: form/dynamic_form_modification.rst
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,10 @@ you need to register it as a service and tag it with :ref:`form.type <dic-tags-f
370370
371371
$container->setDefinition('app.form.friend_message', $definition);
372372
373+
.. versionadded:: 3.3
374+
Prior to Symfony 3.3, you needed to define form type services as ``public``.
375+
Starting from Symfony 3.3, you can also define them as ``private``.
376+
373377
In a controller that extends the :class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller`
374378
class, you can simply call::
375379

‎form/form_dependencies.rst

Copy file name to clipboardExpand all lines: form/form_dependencies.rst
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ Next, register this as a service and tag it with ``form.type``:
136136
->addTag('form.type')
137137
;
138138
139+
.. versionadded:: 3.3
140+
Prior to Symfony 3.3, you needed to define form type services as ``public``.
141+
Starting from Symfony 3.3, you can also define them as ``private``.
142+
139143
That's it! Your controller - where you create the form - doesn't need to change
140144
at all: Symfony is smart enough to load the ``TaskType`` from the container.
141145

‎form/type_guesser.rst

Copy file name to clipboardExpand all lines: form/type_guesser.rst
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,10 @@ creating a service and tagging it as ``form.type_guesser``:
217217
->addTag('form.type_guesser')
218218
;
219219
220+
.. versionadded:: 3.3
221+
Prior to Symfony 3.3, you needed to define type guesser services as ``public``.
222+
Starting from Symfony 3.3, you can also define them as ``private``.
223+
220224
.. sidebar:: Registering a Type Guesser in the Component
221225

222226
If you're using the Form component standalone in your PHP project, use

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.