Skip to content

Commit 1c51901

Browse files
farhadhfjaviereguiluz
authored andcommitted
[Mailer] feat(mailer): Add AhaSend Mailer doc
1 parent ddb2451 commit 1c51901

File tree

187 files changed

+4032
-3028
lines changed

Some content is hidden

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

187 files changed

+4032
-3028
lines changed

.doctor-rst.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ rules:
2323
forbidden_directives:
2424
directives:
2525
- '.. index::'
26+
- directive: '.. caution::'
27+
replacements: ['.. warning::', '.. danger::']
2628
indention: ~
2729
lowercase_as_in_use_statements: ~
2830
max_blank_lines:
@@ -46,6 +48,7 @@ rules:
4648
no_namespace_after_use_statements: ~
4749
no_php_open_tag_in_code_block_php_directive: ~
4850
no_space_before_self_xml_closing_tag: ~
51+
non_static_phpunit_assertions: ~
4952
only_backslashes_in_namespace_in_php_code_block: ~
5053
only_backslashes_in_use_statements_in_php_code_block: ~
5154
ordered_use_statements: ~
@@ -99,7 +102,6 @@ whitelist:
99102
- '#. The most important config file is ``app/config/services.yml``, which now is'
100103
- 'The bin/console Command'
101104
- '.. _`LDAP injection`: http://projects.webappsec.org/w/page/13246947/LDAP%20Injection'
102-
- '.. versionadded:: 2.7.2' # Doctrine
103105
- '.. versionadded:: 2.8.0' # Doctrine
104106
- '.. versionadded:: 1.9.0' # Encore
105107
- '.. versionadded:: 1.18' # Flex in setup/upgrade_minor.rst

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
key: ${{ runner.os }}-doctor-rst-${{ steps.extract_base_branch.outputs.branch }}
7474

7575
- name: "Run DOCtor-RST"
76-
uses: docker://oskarstark/doctor-rst:1.62.3
76+
uses: docker://oskarstark/doctor-rst:1.64.0
7777
with:
7878
args: --short --error-format=github --cache-file=/github/workspace/.cache/doctor-rst.cache
7979

_build/redirection_map

+3-2
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,7 @@
525525
/testing/functional_tests_assertions /testing#testing-application-assertions
526526
/components https://symfony.com/components
527527
/components/index https://symfony.com/components
528-
/serializer/normalizers /components/serializer#normalizers
529-
/components/serializer#component-serializer-attributes-groups-annotations /components/serializer#component-serializer-attributes-groups-attributes
528+
/serializer/normalizers /serializer#serializer-built-in-normalizers
530529
/logging/monolog_regex_based_excludes /logging/monolog_exclude_http_codes
531530
/security/named_encoders /security/named_hashers
532531
/components/inflector /string#inflector
@@ -572,3 +571,5 @@
572571
/doctrine/registration_form /security#security-make-registration-form
573572
/form/form_dependencies /form/create_custom_field_type
574573
/doctrine/reverse_engineering /doctrine#doctrine-adding-mapping
574+
/components/serializer /serializer
575+
/serializer/custom_encoder /serializer/encoders#serializer-custom-encoder

bundles.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The Bundle System
44
=================
55

6-
.. caution::
6+
.. warning::
77

88
In Symfony versions prior to 4.0, it was recommended to organize your own
99
application code using bundles. This is :ref:`no longer recommended <best-practice-no-application-bundles>` and bundles
@@ -58,7 +58,7 @@ Start by creating a new class called ``AcmeBlogBundle``::
5858
{
5959
}
6060

61-
.. caution::
61+
.. warning::
6262

6363
If your bundle must be compatible with previous Symfony versions you have to
6464
extend from the :class:`Symfony\\Component\\HttpKernel\\Bundle\\Bundle` instead.
@@ -118,7 +118,7 @@ to be adjusted if needed:
118118

119119
.. _bundles-legacy-directory-structure:
120120

121-
.. caution::
121+
.. warning::
122122

123123
The recommended bundle structure was changed in Symfony 5, read the
124124
`Symfony 4.4 bundle documentation`_ for information about the old

bundles/best_practices.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ with Symfony Flex to install a specific Symfony version:
246246
# recommended to have a better output and faster download time)
247247
composer update --prefer-dist --no-progress
248248
249-
.. caution::
249+
.. warning::
250250

251251
If you want to cache your Composer dependencies, **do not** cache the
252252
``vendor/`` directory as this has side-effects. Instead cache

bundles/extension.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ Patterns are transformed into the actual class namespaces using the classmap
200200
generated by Composer. Therefore, before using these patterns, you must generate
201201
the full classmap executing the ``dump-autoload`` command of Composer.
202202

203-
.. caution::
203+
.. warning::
204204

205205
This technique can't be used when the classes to compile use the ``__DIR__``
206206
or ``__FILE__`` constants, because their values will change when loading

bundles/override.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ For example, to override the ``templates/registration/confirmed.html.twig``
1919
template from the AcmeUserBundle, create this template:
2020
``<your-project>/templates/bundles/AcmeUserBundle/registration/confirmed.html.twig``
2121

22-
.. caution::
22+
.. warning::
2323

2424
If you add a template in a new location, you *may* need to clear your
2525
cache (``php bin/console cache:clear``), even if you are in debug mode.

cache.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ Then, register the ``SodiumMarshaller`` service using this key:
829829
//->addArgument(['env(base64:CACHE_DECRYPTION_KEY)', 'env(base64:OLD_CACHE_DECRYPTION_KEY)'])
830830
->addArgument(new Reference('.inner'));
831831
832-
.. caution::
832+
.. danger::
833833

834834
This will encrypt the values of the cache items, but not the cache keys. Be
835835
careful not to leak sensitive data in the keys.

components/cache/adapters/apcu_adapter.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This adapter is a high-performance, shared memory cache. It can *significantly*
55
increase an application's performance, as its cache contents are stored in shared
66
memory, a component appreciably faster than many others, such as the filesystem.
77

8-
.. caution::
8+
.. warning::
99

1010
**Requirement:** The `APCu extension`_ must be installed and active to use
1111
this adapter.
@@ -30,7 +30,7 @@ and cache items version string as constructor arguments::
3030
$version = null
3131
);
3232

33-
.. caution::
33+
.. warning::
3434

3535
Use of this adapter is discouraged in write/delete heavy workloads, as these
3636
operations cause memory fragmentation that results in significantly degraded performance.

components/cache/adapters/couchbasebucket_adapter.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ shared memory; you can store contents independent of your PHP environment.
1414
The ability to utilize a cluster of servers to provide redundancy and/or fail-over
1515
is also available.
1616

17-
.. caution::
17+
.. warning::
1818

1919
**Requirements:** The `Couchbase PHP extension`_ as well as a `Couchbase server`_
2020
must be installed, active, and running to use this adapter. Version ``2.6`` or

components/cache/adapters/couchbasecollection_adapter.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ shared memory; you can store contents independent of your PHP environment.
88
The ability to utilize a cluster of servers to provide redundancy and/or fail-over
99
is also available.
1010

11-
.. caution::
11+
.. warning::
1212

1313
**Requirements:** The `Couchbase PHP extension`_ as well as a `Couchbase server`_
1414
must be installed, active, and running to use this adapter. Version ``3.0`` or

components/cache/adapters/filesystem_adapter.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ and cache root path as constructor parameters::
3333
$directory = null
3434
);
3535

36-
.. caution::
36+
.. warning::
3737

3838
The overhead of filesystem IO often makes this adapter one of the *slower*
3939
choices. If throughput is paramount, the in-memory adapters

components/cache/adapters/memcached_adapter.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ shared memory; you can store contents independent of your PHP environment.
88
The ability to utilize a cluster of servers to provide redundancy and/or fail-over
99
is also available.
1010

11-
.. caution::
11+
.. warning::
1212

1313
**Requirements:** The `Memcached PHP extension`_ as well as a `Memcached server`_
1414
must be installed, active, and running to use this adapter. Version ``2.2`` or
@@ -256,7 +256,7 @@ Available Options
256256
executed in a "fire-and-forget" manner; no attempt to ensure the operation
257257
has been received or acted on will be made once the client has executed it.
258258

259-
.. caution::
259+
.. warning::
260260

261261
Not all library operations are tested in this mode. Mixed TCP and UDP
262262
servers are not allowed.

components/cache/adapters/php_files_adapter.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ file similar to the following::
2828
handles file includes, this adapter has the potential to be much faster than other
2929
filesystem-based caches.
3030

31-
.. caution::
31+
.. warning::
3232

3333
While it supports updates and because it is using OPcache as a backend, this adapter is
3434
better suited for append-mostly needs. Using it in other scenarios might lead to

components/cache/adapters/redis_adapter.rst

+82-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Unlike the :doc:`APCu adapter </components/cache/adapters/apcu_adapter>`, and si
1515
shared memory; you can store contents independent of your PHP environment. The ability
1616
to utilize a cluster of servers to provide redundancy and/or fail-over is also available.
1717

18-
.. caution::
18+
.. warning::
1919

2020
**Requirements:** At least one `Redis server`_ must be installed and running to use this
2121
adapter. Additionally, this adapter requires a compatible extension or library that implements
@@ -38,7 +38,13 @@ as the second and third parameters::
3838
// the default lifetime (in seconds) for cache items that do not define their
3939
// own lifetime, with a value 0 causing items to be stored indefinitely (i.e.
4040
// until RedisAdapter::clear() is invoked or the server(s) are purged)
41-
$defaultLifetime = 0
41+
$defaultLifetime = 0,
42+
43+
// $marshaller (optional) An instance of MarshallerInterface to control the serialization
44+
// and deserialization of cache items. By default, native PHP serialization is used.
45+
// This can be useful for compressing data, applying custom serialization logic, or
46+
// optimizing the size and performance of cached items
47+
?MarshallerInterface $marshaller = null
4248
);
4349

4450
Configure the Connection
@@ -266,6 +272,80 @@ performance when using tag-based invalidation::
266272

267273
Read more about this topic in the official `Redis LRU Cache Documentation`_.
268274

275+
Working with Marshaller
276+
-----------------------
277+
278+
TagAwareMarshaller for Tag-Based Caching
279+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
280+
281+
Optimizes caching for tag-based retrieval, allowing efficient management of related items::
282+
283+
$marshaller = new TagAwareMarshaller();
284+
285+
$cache = new RedisAdapter($redis, 'tagged_namespace', 3600, $marshaller);
286+
287+
$item = $cache->getItem('tagged_key');
288+
$item->set(['value' => 'some_data', 'tags' => ['tag1', 'tag2']]);
289+
$cache->save($item);
290+
291+
SodiumMarshaller for Encrypted Caching
292+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
293+
294+
Encrypts cached data using Sodium for enhanced security::
295+
296+
$encryptionKeys = [sodium_crypto_box_keypair()];
297+
$marshaller = new SodiumMarshaller($encryptionKeys);
298+
299+
$cache = new RedisAdapter($redis, 'secure_namespace', 3600, $marshaller);
300+
301+
$item = $cache->getItem('secure_key');
302+
$item->set('confidential_data');
303+
$cache->save($item);
304+
305+
DefaultMarshaller with igbinary Serialization
306+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
307+
308+
Uses ``igbinary` for faster and more efficient serialization when available::
309+
310+
$marshaller = new DefaultMarshaller(true);
311+
312+
$cache = new RedisAdapter($redis, 'optimized_namespace', 3600, $marshaller);
313+
314+
$item = $cache->getItem('optimized_key');
315+
$item->set(['data' => 'optimized_data']);
316+
$cache->save($item);
317+
318+
DefaultMarshaller with Exception on Failure
319+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
320+
321+
Throws an exception if serialization fails, facilitating error handling::
322+
323+
$marshaller = new DefaultMarshaller(false, true);
324+
325+
$cache = new RedisAdapter($redis, 'error_namespace', 3600, $marshaller);
326+
327+
try {
328+
$item = $cache->getItem('error_key');
329+
$item->set('data');
330+
$cache->save($item);
331+
} catch (\ValueError $e) {
332+
echo 'Serialization failed: '.$e->getMessage();
333+
}
334+
335+
SodiumMarshaller with Key Rotation
336+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
337+
338+
Supports key rotation, ensuring secure decryption with both old and new keys::
339+
340+
$keys = [sodium_crypto_box_keypair(), sodium_crypto_box_keypair()];
341+
$marshaller = new SodiumMarshaller($keys);
342+
343+
$cache = new RedisAdapter($redis, 'rotated_namespace', 3600, $marshaller);
344+
345+
$item = $cache->getItem('rotated_key');
346+
$item->set('data_to_encrypt');
347+
$cache->save($item);
348+
269349
.. _`Data Source Name (DSN)`: https://en.wikipedia.org/wiki/Data_source_name
270350
.. _`Redis server`: https://redis.io/
271351
.. _`Redis`: https://github.com/phpredis/phpredis

components/clock.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,18 @@ is expired or not, by modifying the clock's time::
129129
$validUntil = new DateTimeImmutable('2022-11-16 15:25:00');
130130

131131
// $validUntil is in the future, so it is not expired
132-
static::assertFalse($expirationChecker->isExpired($validUntil));
132+
$this->assertFalse($expirationChecker->isExpired($validUntil));
133133

134134
// Clock sleeps for 10 minutes, so now is '2022-11-16 15:30:00'
135135
$clock->sleep(600); // Instantly changes time as if we waited for 10 minutes (600 seconds)
136136

137137
// modify the clock, accepts all formats supported by DateTimeImmutable::modify()
138-
static::assertTrue($expirationChecker->isExpired($validUntil));
138+
$this->assertTrue($expirationChecker->isExpired($validUntil));
139139

140140
$clock->modify('2022-11-16 15:00:00');
141141

142142
// $validUntil is in the future again, so it is no longer expired
143-
static::assertFalse($expirationChecker->isExpired($validUntil));
143+
$this->assertFalse($expirationChecker->isExpired($validUntil));
144144
}
145145
}
146146

components/config/definition.rst

+22-2
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,19 @@ reflect the real structure of the configuration values::
8383
->scalarNode('default_connection')
8484
->defaultValue('mysql')
8585
->end()
86+
->stringNode('username')
87+
->defaultValue('root')
88+
->end()
89+
->stringNode('password')
90+
->defaultValue('root')
91+
->end()
8692
->end()
8793
;
8894

95+
.. versionadded:: 7.2
96+
97+
The ``stringNode()`` method was introduced in Symfony 7.2.
98+
8999
The root node itself is an array node, and has children, like the boolean
90100
node ``auto_connect`` and the scalar node ``default_connection``. In general:
91101
after defining a node, a call to ``end()`` takes you one step up in the
@@ -100,6 +110,7 @@ node definition. Node types are available for:
100110
* scalar (generic type that includes booleans, strings, integers, floats
101111
and ``null``)
102112
* boolean
113+
* string
103114
* integer
104115
* float
105116
* enum (similar to scalar, but it only allows a finite set of values)
@@ -109,6 +120,10 @@ node definition. Node types are available for:
109120
and are created with ``node($name, $type)`` or their associated shortcut
110121
``xxxxNode($name)`` method.
111122

123+
.. versionadded:: 7.2
124+
125+
Support for the ``string`` type was introduced in Symfony 7.2.
126+
112127
Numeric Node Constraints
113128
~~~~~~~~~~~~~~~~~~~~~~~~
114129

@@ -670,7 +685,7 @@ The separator used in keys is typically ``_`` in YAML and ``-`` in XML.
670685
For example, ``auto_connect`` in YAML and ``auto-connect`` in XML. The
671686
normalization would make both of these ``auto_connect``.
672687

673-
.. caution::
688+
.. warning::
674689

675690
The target key will not be altered if it's mixed like
676691
``foo-bar_moo`` or if it already exists.
@@ -800,6 +815,7 @@ A validation rule always has an "if" part. You can specify this part in
800815
the following ways:
801816

802817
- ``ifTrue()``
818+
- ``ifFalse()``
803819
- ``ifString()``
804820
- ``ifNull()``
805821
- ``ifEmpty()``
@@ -818,6 +834,10 @@ A validation rule also requires a "then" part:
818834
Usually, "then" is a closure. Its return value will be used as a new value
819835
for the node, instead of the node's original value.
820836

837+
.. versionadded:: 7.3
838+
839+
The ``ifFalse()`` method was introduced in Symfony 7.3.
840+
821841
Configuring the Node Path Separator
822842
-----------------------------------
823843

@@ -889,7 +909,7 @@ Otherwise the result is a clean array of configuration values::
889909
$configs
890910
);
891911

892-
.. caution::
912+
.. warning::
893913

894914
When processing the configuration tree, the processor assumes that the top
895915
level array key (which matches the extension name) is already stripped off.

components/console/changing_default_command.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ This will print the following to the command line:
5252
5353
Hello World
5454
55-
.. caution::
55+
.. warning::
5656

5757
This feature has a limitation: you cannot pass any argument or option to
5858
the default command because they are ignored.

0 commit comments

Comments
 (0)