Skip to content

Commit 2f64d14

Browse files
committed
Merge branch '6.2' into 6.3
* 6.2: Minor tweaks Update symfony_server.rst [Mailer] Link to bridges READMEs [Security] Document required badges Fix minor syntax errors Attributes that relate to controller arguments should start with `Map` Migrate the CI away from deprecated features
2 parents fcae243 + bdf8b00 commit 2f64d14

File tree

10 files changed

+125
-54
lines changed

10 files changed

+125
-54
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Get composer cache directory
3434
id: composercache
3535
working-directory: _build
36-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
36+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
3737

3838
- name: Cache dependencies
3939
uses: actions/cache@v3
@@ -63,7 +63,7 @@ jobs:
6363
run: mkdir .cache
6464

6565
- name: "Extract base branch name"
66-
run: echo "##[set-output name=branch;]$(echo ${GITHUB_BASE_REF:=${GITHUB_REF##*/}})"
66+
run: echo "branch=$(echo ${GITHUB_BASE_REF:=${GITHUB_REF##*/}})" >> $GITHUB_OUTPUT
6767
id: extract_base_branch
6868

6969
- name: "Cache DOCtor-RST"
@@ -100,12 +100,12 @@ jobs:
100100
- name: Find modified files
101101
id: find-files
102102
working-directory: docs
103-
run: echo "::set-output name=files::$(git diff --name-only origin/${{ github.base_ref }} HEAD | grep ".rst" | tr '\n' ' ')"
103+
run: echo "files=$(git diff --name-only origin/${{ github.base_ref }} HEAD | grep ".rst" | tr '\n' ' ')" >> $GITHUB_OUTPUT
104104

105105
- name: Get composer cache directory
106106
id: composercache
107107
working-directory: docs/_build
108-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
108+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
109109

110110
- name: Cache dependencies
111111
if: ${{ steps.find-files.outputs.files }}

components/filesystem.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -469,12 +469,12 @@ Finding Directories/Root Directories
469469
PHP offers the function :phpfunction:`dirname` to obtain the directory path of a
470470
file path. This method has a few quirks::
471471

472-
- `dirname()` does not accept backslashes on UNIX
473-
- `dirname("C:/Programs")` returns "C:", not "C:/"
474-
- `dirname("C:/")` returns ".", not "C:/"
475-
- `dirname("C:")` returns ".", not "C:/"
476-
- `dirname("Programs")` returns ".", not ""
477-
- `dirname()` does not canonicalize the result
472+
- ``dirname()`` does not accept backslashes on UNIX
473+
- ``dirname("C:/Programs")`` returns "C:", not "C:/"
474+
- ``dirname("C:/")`` returns ".", not "C:/"
475+
- ``dirname("C:")`` returns ".", not "C:/"
476+
- ``dirname("Programs")`` returns ".", not ""
477+
- ``dirname()`` does not canonicalize the result
478478

479479
:method:`Symfony\\Component\\Filesystem\\Path::getDirectory` fixes these
480480
shortcomings::

components/runtime.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ application outside of the global state in 6 steps:
370370
returns a :class:`Symfony\\Component\\Runtime\\RunnerInterface`: an instance
371371
that knows how to "run" the application object.
372372
#. The ``RunnerInterface::run(object $application)`` is called and it returns the
373-
exit status code as `int`.
373+
exit status code as ``int``.
374374
#. The PHP engine is terminated with this status code.
375375

376376
When creating a new runtime, there are two things to consider: First, what arguments

components/workflow.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ a ``Definition`` and a way to write the states to the objects (i.e. an
2828
instance of a :class:`Symfony\\Component\\Workflow\\MarkingStore\\MarkingStoreInterface`).
2929

3030
Consider the following example for a blog post. A post can have one of a number
31-
of predefined statuses (`draft`, `reviewed`, `rejected`, `published`). In a workflow,
31+
of predefined statuses (``draft``, ``reviewed``, ``rejected``, ``published``). In a workflow,
3232
these statuses are called **places**. You can define the workflow like this::
3333

3434
use Symfony\Component\Workflow\DefinitionBuilder;

contributing/code/standards.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,11 @@ Naming Conventions
230230

231231
* Suffix exceptions with ``Exception``;
232232

233-
* Prefix PHP attributes with ``As`` where applicable (e.g. ``#[AsCommand]``
234-
instead of ``#[Command]``, but ``#[When]`` is kept as-is);
233+
* Prefix PHP attributes that relate to service configuration with ``As``
234+
(e.g. ``#[AsCommand]``, ``#[AsEventListener]``, etc.);
235+
236+
* Prefix PHP attributes that relate to controller arguments with ``Map``
237+
(e.g. ``#[MapEntity]``, ``#[MapCurrentUser]``, etc.);
235238

236239
* Use UpperCamelCase for naming PHP files (e.g. ``EnvVarProcessor.php``) and
237240
snake case for naming Twig templates and web assets (``section_layout.html.twig``,

mailer.rst

Lines changed: 47 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -99,20 +99,20 @@ Using a 3rd Party Transport
9999
Instead of using your own SMTP server or sendmail binary, you can send emails
100100
via a third-party provider:
101101

102-
================== ==============================================
103-
Service Install with
104-
================== ==============================================
105-
Amazon SES ``composer require symfony/amazon-mailer``
106-
Infobip ``composer require symfony/infobip-mailer``
107-
MailChimp ``composer require symfony/mailchimp-mailer``
108-
MailerSend ``composer require symfony/mailersend-mailer``
109-
Mailgun ``composer require symfony/mailgun-mailer``
110-
Mailjet ``composer require symfony/mailjet-mailer``
111-
MailPace ``composer require symfony/mail-pace-mailer``
112-
Postmark ``composer require symfony/postmark-mailer``
113-
SendGrid ``composer require symfony/sendgrid-mailer``
114-
Sendinblue ``composer require symfony/sendinblue-mailer``
115-
================== ==============================================
102+
===================== ==============================================
103+
Service Install with
104+
===================== ==============================================
105+
`Amazon SES`_ ``composer require symfony/amazon-mailer``
106+
`Infobip`_ ``composer require symfony/infobip-mailer``
107+
`MailChimp`_ ``composer require symfony/mailchimp-mailer``
108+
`Mailgun`_ ``composer require symfony/mailgun-mailer``
109+
`Mailjet`_ ``composer require symfony/mailjet-mailer``
110+
`MailPace`_ ``composer require symfony/mail-pace-mailer``
111+
`MailerSend`_ ``composer require symfony/mailersend-mailer``
112+
`Postmark`_ ``composer require symfony/postmark-mailer``
113+
`SendGrid`_ ``composer require symfony/sendgrid-mailer``
114+
`Sendinblue`_ ``composer require symfony/sendinblue-mailer``
115+
===================== ==============================================
116116

117117
.. versionadded:: 6.2
118118

@@ -169,21 +169,21 @@ transport, but you can force to use one:
169169
This table shows the full list of available DSN formats for each third
170170
party provider:
171171

172-
==================== ==================================================== =========================================== ========================================
173-
Provider SMTP HTTP API
174-
==================== ==================================================== =========================================== ========================================
175-
Amazon SES ses+smtp://USERNAME:PASSWORD@default ses+https://ACCESS_KEY:SECRET_KEY@default ses+api://ACCESS_KEY:SECRET_KEY@default
176-
Google Gmail gmail+smtp://USERNAME:APP-PASSWORD@default n/a n/a
177-
Mailchimp Mandrill mandrill+smtp://USERNAME:PASSWORD@default mandrill+https://KEY@default mandrill+api://KEY@default
178-
Mailgun mailgun+smtp://USERNAME:PASSWORD@default mailgun+https://KEY:DOMAIN@default mailgun+api://KEY:DOMAIN@default
179-
Mailjet mailjet+smtp://ACCESS_KEY:SECRET_KEY@default n/a mailjet+api://ACCESS_KEY:SECRET_KEY@default?sandbox=false
180-
MailPace mailpace+api://API_TOKEN@default n/a mailpace+api://API_TOKEN@default
181-
Postmark postmark+smtp://ID@default n/a postmark+api://KEY@default
182-
Sendgrid sendgrid+smtp://KEY@default n/a sendgrid+api://KEY@default
183-
Sendinblue sendinblue+smtp://USERNAME:PASSWORD@default n/a sendinblue+api://KEY@default
184-
Infobip infobip+smtp://KEY@default n/a infobip+api://KEY@BASE_URL
185-
MailerSend mailersend+smtp://KEY@default n/a mailersend+api://KEY@BASE_URL
186-
==================== ==================================================== =========================================== ========================================
172+
==================== ============================================ ========================================= ========================================
173+
Provider SMTP HTTP API
174+
==================== ============================================ ========================================= ========================================
175+
`Amazon SES`_ ses+smtp://USERNAME:PASSWORD@default ses+https://ACCESS_KEY:SECRET_KEY@default ses+api://ACCESS_KEY:SECRET_KEY@default
176+
`Google Gmail`_ gmail+smtp://USERNAME:APP-PASSWORD@default n/a n/a
177+
`Infobip`_ infobip+smtp://KEY@default n/a infobip+api://KEY@BASE_URL
178+
`Mailchimp Mandrill`_ mandrill+smtp://USERNAME:PASSWORD@default mandrill+https://KEY@default mandrill+api://KEY@default
179+
`MailerSend`_ mailersend+smtp://KEY@default n/a mailersend+api://KEY@BASE_URL
180+
`Mailgun`_ mailgun+smtp://USERNAME:PASSWORD@default mailgun+https://KEY:DOMAIN@default mailgun+api://KEY:DOMAIN@default
181+
`Mailjet`_ mailjet+smtp://ACCESS_KEY:SECRET_KEY@default n/a mailjet+api://ACCESS_KEY:SECRET_KEY@default
182+
`MailPace`_ mailpace+api://API_TOKEN@default n/a mailpace+api://API_TOKEN@default
183+
`Postmark`_ postmark+smtp://ID@default n/a postmark+api://KEY@default
184+
`Sendgrid`_ sendgrid+smtp://KEY@default n/a sendgrid+api://KEY@default
185+
`Sendinblue`_ sendinblue+smtp://USERNAME:PASSWORD@default n/a sendinblue+api://KEY@default
186+
==================== ============================================ ========================================= ========================================
187187

188188
.. versionadded:: 6.3
189189

@@ -1783,16 +1783,27 @@ the :class:`Symfony\\Bundle\\FrameworkBundle\\Test\\MailerAssertionsTrait`::
17831783
}
17841784
}
17851785

1786-
.. _`high availability`: https://en.wikipedia.org/wiki/High_availability
1787-
.. _`load balancing`: https://en.wikipedia.org/wiki/Load_balancing_(computing)
1786+
.. _`Amazon SES`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Mailer/Bridge/Amazon/README.md
1787+
.. _`App Password`: https://support.google.com/accounts/answer/185833
1788+
.. _`default_socket_timeout`: https://www.php.net/manual/en/filesystem.configuration.php#ini.default-socket-timeout
1789+
.. _`DKIM`: https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail
17881790
.. _`download the foundation-emails.css file`: https://github.com/foundation/foundation-emails/blob/develop/dist/foundation-emails.css
1791+
.. _`Google Gmail`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Mailer/Bridge/Google/README.md
1792+
.. _`high availability`: https://en.wikipedia.org/wiki/High_availability
1793+
.. _`Infobip`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Mailer/Bridge/Infobip/README.md
1794+
.. _`Inky`: https://get.foundation/emails/docs/inky.html
17891795
.. _`league/html-to-markdown`: https://github.com/thephpleague/html-to-markdown
1796+
.. _`load balancing`: https://en.wikipedia.org/wiki/Load_balancing_(computing)
1797+
.. _`MailChimp Mandrill`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Mailer/Bridge/Mailchimp/README.md
1798+
.. _`MailerSend`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Mailer/Bridge/MailerSend/README.md
1799+
.. _`Mailgun`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Mailer/Bridge/Mailgun/README.md
1800+
.. _`Mailjet`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Mailer/Bridge/Mailjet/README.md
17901801
.. _`Markdown syntax`: https://commonmark.org/
1791-
.. _`Inky`: https://get.foundation/emails/docs/inky.html
1792-
.. _`S/MIME`: https://en.wikipedia.org/wiki/S/MIME
1793-
.. _`DKIM`: https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail
1802+
.. _`MailPace`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Mailer/Bridge/MailPace/README.md
17941803
.. _`OpenSSL PHP extension`: https://www.php.net/manual/en/book.openssl.php
17951804
.. _`PEM encoded`: https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail
1796-
.. _`default_socket_timeout`: https://www.php.net/manual/en/filesystem.configuration.php#ini.default-socket-timeout
1805+
.. _`Postmark`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Mailer/Bridge/Postmark/README.md
17971806
.. _`RFC 3986`: https://www.ietf.org/rfc/rfc3986.txt
1798-
.. _`App Password`: https://support.google.com/accounts/answer/185833
1807+
.. _`S/MIME`: https://en.wikipedia.org/wiki/S/MIME
1808+
.. _`SendGrid`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Mailer/Bridge/Sendgrid/README.md
1809+
.. _`Sendinblue`: https://github.com/symfony/symfony/blob/{version}/src/Symfony/Component/Mailer/Bridge/Sendinblue/README.md

mercure.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ Testing
615615

616616
During unit testing it's usually not needed to send updates to Mercure.
617617

618-
You can instead make use of the `MockHub` class::
618+
You can instead make use of the ``MockHub`` class::
619619

620620
// tests/FunctionalTest.php
621621
namespace App\Tests\Unit\Controller;

reference/configuration/security.rst

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,60 @@ a ``user_checker`` option to define the service used to perform those checks.
10211021

10221022
Learn more about user checkers in :doc:`/security/user_checkers`.
10231023

1024+
Required Badges
1025+
~~~~~~~~~~~~~~~
1026+
1027+
Firewalls can configure a list of required badges that must be present on the authenticated passport:
1028+
1029+
.. configuration-block::
1030+
1031+
.. code-block:: yaml
1032+
1033+
# config/packages/security.yaml
1034+
security:
1035+
# ...
1036+
1037+
firewalls:
1038+
main:
1039+
# ...
1040+
required_badges: ['CsrfTokenBadge', 'My\Badge']
1041+
1042+
.. code-block:: xml
1043+
1044+
<!-- config/packages/security.xml -->
1045+
<?xml version="1.0" encoding="UTF-8" ?>
1046+
<srv:container xmlns="http://symfony.com/schema/dic/security"
1047+
xmlns:srv="http://symfony.com/schema/dic/services"
1048+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1049+
xsi:schemaLocation="http://symfony.com/schema/dic/services
1050+
https://symfony.com/schema/dic/services/services-1.0.xsd
1051+
http://symfony.com/schema/dic/security
1052+
https://symfony.com/schema/dic/security/security-1.0.xsd">
1053+
1054+
<config>
1055+
<firewall name="main">
1056+
<!-- ... -->
1057+
<required_badge>CsrfTokenBadge</required_badge>
1058+
<required_badge>My\Badge</required_badge>
1059+
</firewall>
1060+
</config>
1061+
</srv:container>
1062+
1063+
.. code-block:: php
1064+
1065+
// config/packages/security.php
1066+
use Symfony\Config\SecurityConfig;
1067+
1068+
return static function (SecurityConfig $security) {
1069+
$mainFirewall = $security->firewall('main');
1070+
$mainFirewall->requiredBadges(['CsrfTokenBadge', 'My\Badge']);
1071+
// ...
1072+
};
1073+
1074+
.. versionadded:: 5.3
1075+
1076+
The ``required_badges`` option was introduced in Symfony 5.3.
1077+
10241078
providers
10251079
---------
10261080

setup.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ the server by pressing ``Ctrl+C`` from your terminal.
144144
Symfony Docker Integration
145145
~~~~~~~~~~~~~~~~~~~~~~~~~~
146146

147-
If you'd like to use Docker with Symfony, see :doc:`setup/docker`
147+
If you'd like to use Docker with Symfony, see :doc:`/setup/docker`.
148148

149149
.. _symfony-flex:
150150

setup/symfony_server.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,11 @@ run the Symfony server in the background:
6565

6666
.. code-block:: terminal
6767
68-
# change the path to the location of your Symfony binary
69-
$ sudo codesign --force --deep --sign - /opt/homebrew/Cellar/symfony-cli/5.4.21/bin/symfony
68+
# find the installed version of the Symfony binary
69+
$ symfony version
70+
71+
# change the path to the location of your Symfony binary and replace {version} too
72+
$ sudo codesign --force --deep --sign - /opt/homebrew/Cellar/symfony-cli/{version}/bin/symfony
7073
7174
Enabling PHP-FPM
7275
----------------

0 commit comments

Comments
 (0)