Skip to content

Commit bf14d85

Browse files
committed
Merge branch '5.4' into 6.3
* 5.4: Update templating.rst [Expression Language] Clarify number of backslashes to escape a backslash reference the decorated service using the special .inner id
2 parents f3ce5d0 + e6d0c1a commit bf14d85

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

cache.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ Then, register the ``SodiumMarshaller`` service using this key:
804804
- ['%env(base64:CACHE_DECRYPTION_KEY)%']
805805
# use multiple keys in order to rotate them
806806
#- ['%env(base64:CACHE_DECRYPTION_KEY)%', '%env(base64:OLD_CACHE_DECRYPTION_KEY)%']
807-
- '@Symfony\Component\Cache\Marshaller\SodiumMarshaller.inner'
807+
- '@.inner'
808808
809809
.. code-block:: xml
810810
@@ -827,7 +827,7 @@ Then, register the ``SodiumMarshaller`` service using this key:
827827
<!-- use multiple keys in order to rotate them -->
828828
<!-- <argument>env(base64:OLD_CACHE_DECRYPTION_KEY)</argument> -->
829829
</argument>
830-
<argument type="service" id="Symfony\Component\Cache\Marshaller\SodiumMarshaller.inner"/>
830+
<argument type="service" id=".inner"/>
831831
</service>
832832
</services>
833833
</container>
@@ -844,7 +844,7 @@ Then, register the ``SodiumMarshaller`` service using this key:
844844
->addArgument(['env(base64:CACHE_DECRYPTION_KEY)'])
845845
// use multiple keys in order to rotate them
846846
//->addArgument(['env(base64:CACHE_DECRYPTION_KEY)', 'env(base64:OLD_CACHE_DECRYPTION_KEY)'])
847-
->addArgument(new Reference(SodiumMarshaller::class.'.inner'));
847+
->addArgument(new Reference('.inner'));
848848
849849
.. caution::
850850

create_framework/templating.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,14 @@ framework does not need to be modified in any way, create a new
142142
``app.php`` file::
143143

144144
// example.com/src/app.php
145+
use Symfony\Component\HttpFoundation\Request;
145146
use Symfony\Component\HttpFoundation\Response;
146147
use Symfony\Component\Routing;
147148

148149
function is_leap_year(int $year = null): bool
149150
{
150151
if (null === $year) {
151-
$year = date('Y');
152+
$year = (int)date('Y');
152153
}
153154

154155
return 0 === $year % 400 || (0 === $year % 4 && 0 !== $year % 100);

reference/formats/expression_language.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ The component supports:
2828

2929
.. caution::
3030

31-
A backslash (``\``) must be escaped by 4 backslashes (``\\\\``) in a string
32-
and 8 backslashes (``\\\\\\\\``) in a regex::
31+
A backslash (``\``) must be escaped by 3 backslashes (``\\\\``) in a string
32+
and 7 backslashes (``\\\\\\\\``) in a regex::
3333

3434
echo $expressionLanguage->evaluate('"\\\\"'); // prints \
3535
$expressionLanguage->evaluate('"a\\\\b" matches "/^a\\\\\\\\b$/"'); // returns true

session.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,7 +1621,7 @@ Then, register the ``SodiumMarshaller`` service using this key:
16211621
decorates: 'session.marshaller'
16221622
arguments:
16231623
- ['%env(file:resolve:SESSION_DECRYPTION_FILE)%']
1624-
- '@Symfony\Component\Cache\Marshaller\SodiumMarshaller.inner'
1624+
- '@.inner'
16251625
16261626
.. code-block:: xml
16271627
@@ -1637,7 +1637,7 @@ Then, register the ``SodiumMarshaller`` service using this key:
16371637
<argument type="collection">
16381638
<argument>env(file:resolve:SESSION_DECRYPTION_FILE)</argument>
16391639
</argument>
1640-
<argument type="service" id="Symfony\Component\Cache\Marshaller\SodiumMarshaller.inner"/>
1640+
<argument type="service" id=".inner"/>
16411641
</service>
16421642
</services>
16431643
</container>
@@ -1658,7 +1658,7 @@ Then, register the ``SodiumMarshaller`` service using this key:
16581658
->decorate('session.marshaller')
16591659
->args([
16601660
[env('file:resolve:SESSION_DECRYPTION_FILE')],
1661-
service(SodiumMarshaller::class.'.inner'),
1661+
service('.inner'),
16621662
]);
16631663
};
16641664

0 commit comments

Comments
 (0)