Skip to content

Commit b44554c

Browse files
committed
Merge branch '5.4' into 6.2
* 5.4: minor [Mailer] remove bcc for signed messages [Attributes] Add attributes overview Update mailer.rst
2 parents fb40677 + 2696122 commit b44554c

File tree

10 files changed

+114
-3
lines changed

10 files changed

+114
-3
lines changed

components/serializer.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

@@ -1395,6 +1399,8 @@ having unique identifiers::
13951399
var_dump($serializer->serialize($org, 'json'));
13961400
// {"name":"Les-Tilleuls.coop","members":[{"name":"K\u00e9vin", organization: "Les-Tilleuls.coop"}]}
13971401

1402+
.. _serializer_handling-serialization-depth:
1403+
13981404
Handling Serialization Depth
13991405
----------------------------
14001406

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

1701+
.. _serializer_interfaces-and-abstract-classes:
1702+
16951703
Serializing Interfaces and Abstract Classes
16961704
-------------------------------------------
16971705

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
@@ -1033,6 +1033,12 @@ using for example OpenSSL or obtained at an official Certificate Authority (CA).
10331033
The email recipient must have the CA certificate in the list of trusted issuers
10341034
in order to verify the signature.
10351035

1036+
.. caution::
1037+
1038+
If you use message signature, sending to ``Bcc`` will be removed from the
1039+
message. If you need to send a message to multiple recipients, you need
1040+
to compute a new signature for each recipient.
1041+
10361042
S/MIME Signer
10371043
.............
10381044

@@ -1727,7 +1733,7 @@ the :class:`Symfony\\Bundle\\FrameworkBundle\\Test\\MailerAssertionsTrait`::
17271733
$client->request('GET', '/mail/send');
17281734
$this->assertResponseIsSuccessful();
17291735

1730-
$this->assertEmailCount(1);
1736+
$this->assertEmailCount(1); // use assertQueuedEmailCount() when using Messenger
17311737

17321738
$email = $this->getMailerMessage();
17331739

@@ -1749,3 +1755,6 @@ the :class:`Symfony\\Bundle\\FrameworkBundle\\Test\\MailerAssertionsTrait`::
17491755
.. _`default_socket_timeout`: https://www.php.net/manual/en/filesystem.configuration.php#ini.default-socket-timeout
17501756
.. _`RFC 3986`: https://www.ietf.org/rfc/rfc3986.txt
17511757
.. _`App Password`: https://support.google.com/accounts/answer/185833
1758+
1759+
1760+

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`

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

@@ -1085,6 +1087,8 @@ array element. For example, to retrieve the ``handler_two`` handler::
10851087
;
10861088
};
10871089
1090+
.. _tags_as-tagged-item:
1091+
10881092
The ``#[AsTaggedItem]`` attribute
10891093
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10901094

0 commit comments

Comments
 (0)