Skip to content

Commit 9b5d1a4

Browse files
committed
Merge branch '6.2' into 6.3
* 6.2: Rename context minor [Mailer] remove bcc for signed messages [Attributes] Add attributes overview Update mailer.rst
2 parents 725a1d5 + b44554c commit 9b5d1a4

File tree

12 files changed

+118
-7
lines changed

12 files changed

+118
-7
lines changed

components/serializer.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ data.
232232
Context
233233
-------
234234

235-
Many Serializer features can be configured :doc:`using a context </serializer#serializer-context>`.
235+
Many Serializer features can be configured :doc:`using a context </serializer#serializer_serializer-context>`.
236236

237237
.. _component-serializer-attributes-groups:
238238

@@ -432,6 +432,8 @@ If some serialization groups are set, only attributes allowed by those groups ca
432432

433433
As for groups, attributes can be selected during both the serialization and deserialization process.
434434

435+
.. _serializer_ignoring-attributes:
436+
435437
Ignoring Attributes
436438
-------------------
437439

@@ -628,6 +630,8 @@ processes::
628630
$anne = $normalizer->denormalize(['first_name' => 'Anne'], 'Person');
629631
// Person object with firstName: 'Anne'
630632

633+
.. _serializer_name-conversion:
634+
631635
Configure name conversion using metadata
632636
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
633637

@@ -1193,7 +1197,7 @@ Option Description Defaul
11931197
Context Builders
11941198
----------------
11951199

1196-
Instead of passing plain PHP arrays to the :ref:`serialization context <serializer-context>`,
1200+
Instead of passing plain PHP arrays to the :ref:`serialization context <serializer_serializer-context>`,
11971201
you can use "context builders" to define the context using a fluent interface::
11981202

11991203
use Symfony\Component\Serializer\Context\Encoder\CsvEncoderContextBuilder;
@@ -1396,6 +1400,8 @@ having unique identifiers::
13961400
var_dump($serializer->serialize($org, 'json'));
13971401
// {"name":"Les-Tilleuls.coop","members":[{"name":"K\u00e9vin", organization: "Les-Tilleuls.coop"}]}
13981402

1403+
.. _serializer_handling-serialization-depth:
1404+
13991405
Handling Serialization Depth
14001406
----------------------------
14011407

@@ -1693,6 +1699,8 @@ will be thrown. The type enforcement of the properties can be disabled by settin
16931699
the serializer context option ``ObjectNormalizer::DISABLE_TYPE_ENFORCEMENT``
16941700
to ``true``.
16951701

1702+
.. _serializer_interfaces-and-abstract-classes:
1703+
16961704
Serializing Interfaces and Abstract Classes
16971705
-------------------------------------------
16981706

console.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ available in the ``configure()`` method::
206206
}
207207
}
208208

209+
.. _console_registering-the-command:
210+
209211
Registering the Command
210212
~~~~~~~~~~~~~~~~~~~~~~~
211213

@@ -533,13 +535,13 @@ call ``setAutoExit(false)`` on it to get the command result in ``CommandTester``
533535
$application->setAutoExit(false);
534536

535537
$tester = new ApplicationTester($application);
536-
538+
537539

538540
.. caution::
539541

540542
When testing ``InputOption::VALUE_NONE`` command options, you must pass an
541543
empty value to them::
542-
544+
543545
$commandTester = new CommandTester($command);
544546
$commandTester->execute(['--some-option' => '']);
545547

event_dispatcher.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ listener class:
143143
method (which makes event listeners invokable);
144144
#. If the ``__invoke()`` method is not defined either, throw an exception.
145145

146+
.. _event-dispatcher_event-listener-attributes:
147+
146148
Defining Event Listeners with PHP Attributes
147149
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
148150

mailer.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,12 @@ using for example OpenSSL or obtained at an official Certificate Authority (CA).
10431043
The email recipient must have the CA certificate in the list of trusted issuers
10441044
in order to verify the signature.
10451045

1046+
.. caution::
1047+
1048+
If you use message signature, sending to ``Bcc`` will be removed from the
1049+
message. If you need to send a message to multiple recipients, you need
1050+
to compute a new signature for each recipient.
1051+
10461052
S/MIME Signer
10471053
.............
10481054

@@ -1751,7 +1757,7 @@ the :class:`Symfony\\Bundle\\FrameworkBundle\\Test\\MailerAssertionsTrait`::
17511757
$client->request('GET', '/mail/send');
17521758
$this->assertResponseIsSuccessful();
17531759

1754-
$this->assertEmailCount(1);
1760+
$this->assertEmailCount(1); // use assertQueuedEmailCount() when using Messenger
17551761

17561762
$email = $this->getMailerMessage();
17571763

@@ -1773,3 +1779,6 @@ the :class:`Symfony\\Bundle\\FrameworkBundle\\Test\\MailerAssertionsTrait`::
17731779
.. _`default_socket_timeout`: https://www.php.net/manual/en/filesystem.configuration.php#ini.default-socket-timeout
17741780
.. _`RFC 3986`: https://www.ietf.org/rfc/rfc3986.txt
17751781
.. _`App Password`: https://support.google.com/accounts/answer/185833
1782+
1783+
1784+

reference/attributes.rst

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
.. index::
2+
single: Attributes
3+
4+
Symfony Attributes Overview
5+
===========================
6+
7+
Attributes are the successor of annotation since PHP 8. Attributes are native
8+
to the language and Symfony takes full advantage of them across the framework
9+
ans its different components.
10+
11+
Doctrine Bridge
12+
~~~~~~~~~~~~~~~
13+
14+
* :doc:`UniqueEntity </reference/constraints/UniqueEntity>`
15+
16+
Command
17+
~~~~~~~
18+
19+
* :ref:`AsCommand <console_registering-the-command>`
20+
21+
Contracts
22+
~~~~~~~~~
23+
24+
* :ref:`Required <autowiring-calls>`
25+
* :ref:`SubscribedService <service-subscribers-service-subscriber-trait>`
26+
27+
Dependency Injection
28+
~~~~~~~~~~~~~~~~~~~~
29+
30+
* :ref:`AsTaggedItem <tags_as-tagged-item>`
31+
* :ref:`Autoconfigure <lazy-services_configuration>`
32+
* :ref:`AutoconfigureTag <di-instanceof>`
33+
* :ref:`TaggedIterator <tags_reference-tagged-services>`
34+
* :ref:`TaggedLocator <service-subscribers-locators_defining-service-locator>`
35+
* :ref:`Target <autowiring-multiple-implementations-same-type>`
36+
* :ref:`When <service-container_limiting-to-env>`
37+
38+
EventDispatcher
39+
~~~~~~~~~~~~~~~
40+
41+
* :ref:`AsEventListener <event-dispatcher_event-listener-attributes>`
42+
43+
HttpKernel
44+
~~~~~~~~~~
45+
46+
* :doc:`AsController </controller/service>`
47+
48+
Messenger
49+
~~~~~~~~~
50+
51+
* :ref:`AsMessageHandler <messenger-handler>`
52+
53+
Routing
54+
~~~~~~~
55+
56+
* :doc:`Route </routing>`
57+
58+
Security
59+
~~~~~~~~
60+
61+
* :ref:`CurrentUser <security-json-login>`
62+
63+
Serializer
64+
~~~~~~~~~~
65+
66+
* :ref:`Context <serializer_serializer-context>`
67+
* :ref:`DiscriminatorMap <serializer_interfaces-and-abstract-classes>`
68+
* :ref:`Groups <component-serializer-attributes-groups-annotations>`
69+
* :ref:`Ignore <serializer_ignoring-attributes>`
70+
* :ref:`MaxDepth <serializer_handling-serialization-depth>`
71+
* :ref:`SerializedName <serializer_name-conversion>`
72+
73+
Validator
74+
~~~~~~~~~
75+
76+
Each validation constraint comes with a PHP attribute. See
77+
:doc:`/reference/constraints` for a full list of validation constraints.

reference/map.rst.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ Others
3535
* :doc:`Configuring the Kernel </reference/configuration/kernel>`
3636
* :doc:`Twig Extensions (forms, filters, tags, etc) Reference </reference/twig_reference>`
3737
* :doc:`/reference/dic_tags`
38+
* :doc:`Symfony Attributes Overview </reference/attributes>`
3839
* :doc:`/reference/events`

serializer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ possible to set the priority of the tag in order to decide the matching order.
9090
``DateTime`` or ``DateTimeImmutable`` classes to avoid excessive memory
9191
usage and exposing internal details.
9292

93-
.. _serializer-context:
93+
.. _serializer_serializer-context:
9494

9595
Serializer Context
9696
------------------

serializer/custom_context_builders.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ How to Create your Custom Context Builder
1111
The :doc:`Serializer Component </components/serializer>` uses Normalizers
1212
and Encoders to transform any data to any data-structure (e.g. JSON).
1313
That serialization process can be configured thanks to a
14-
:ref:`serialization context <serializer-context>`, which can be built thanks to
14+
:ref:`serialization context <serializer_serializer-context>`, which can be built thanks to
1515
:ref:`context builders <component-serializer-context-builders>`.
1616

1717
Each built-in normalizer/encoder has its related context builder. However, you

service_container.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,8 @@ each time you ask for it.
240240
If you'd prefer to manually wire your service, that's totally possible: see
241241
:ref:`services-explicitly-configure-wire-services`.
242242

243+
.. _service-container_limiting-to-env:
244+
243245
Limiting Services to a specific Symfony Environment
244246
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
245247

service_container/autowiring.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,8 @@ dealing with the ``TransformerInterface``.
392392
// ...
393393
}
394394

395+
.. _autowiring-multiple-implementations-same-type:
396+
395397
Dealing with Multiple Implementations of the Same Type
396398
------------------------------------------------------
397399

service_container/service_subscribers_locators.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,8 @@ This is done by having ``getSubscribedServices()`` return an array of
296296

297297
The above example requires using ``3.2`` version or newer of ``symfony/service-contracts``.
298298

299+
.. _service-subscribers-locators_defining-service-locator:
300+
299301
Defining a Service Locator
300302
--------------------------
301303

@@ -742,6 +744,8 @@ attribute to the locator service defining the name of this custom method:
742744
going to be used, a configuration key (``key`` in the example above) must
743745
be set so the custom method may be called as a fallback.
744746

747+
.. _service-subscribers-service-subscriber-trait:
748+
745749
Service Subscriber Trait
746750
------------------------
747751

service_container/tags.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,8 @@ than one tag. You tag a service twice or more with the ``app.mail_transport``
562562
tag. The second ``foreach`` loop iterates over the ``app.mail_transport``
563563
tags set for the current service and gives you the attributes.
564564

565+
.. _tags_reference-tagged-services:
566+
565567
Reference Tagged Services
566568
~~~~~~~~~~~~~~~~~~~~~~~~~
567569

@@ -1095,6 +1097,8 @@ array element. For example, to retrieve the ``handler_two`` handler::
10951097
;
10961098
};
10971099
1100+
.. _tags_as-tagged-item:
1101+
10981102
The ``#[AsTaggedItem]`` attribute
10991103
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11001104

0 commit comments

Comments
 (0)