Skip to content

Commit e8a3a61

Browse files
committed
Merge remote-tracking branch 'upstream/6.0' into 6.0
* upstream/6.0: Some minor rewords Fixed XML syntax too Typo in class name Fix example in Regex.rst Global variable in TwigConfig should be passed by service function Fixed ambiguous sentence [Contribution] Document the different types of tests run in CI Added header removal notice Minor clarification Minor change at email_validation_mode
2 parents 63a8178 + 82832fa commit e8a3a61

File tree

10 files changed

+81
-17
lines changed

10 files changed

+81
-17
lines changed

contributing/code/pull_requests.rst

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,68 @@ After the `Psalm phar is installed`_, the analysis can be run locally with:
429429
430430
$ psalm.phar src/Symfony/Component/Workflow
431431
432+
Automated Tests
433+
~~~~~~~~~~~~~~~
434+
435+
A series of automated tests will run when submitting the pull request.
436+
These test the code under different conditions, to be sure nothing
437+
important is broken. Test failures can be unrelated to your changes. If you
438+
think this is the case, you can check if the target branch has the same
439+
errors and leave a comment on your PR.
440+
441+
Otherwise, the test failure might be caused by your changes. The following
442+
test scenarios run on each change:
443+
444+
``PHPUnit / Tests``
445+
This job runs on Ubuntu using multiple PHP versions (each in their
446+
own job). These jobs run the testsuite just like you would do locally.
447+
448+
A failure in these jobs often indicates a bug in the code.
449+
450+
``PHPUnit / Tests (high-deps)``
451+
This job checks each package (bridge, bundle or component) in ``src/``
452+
individually by calling ``composer update`` and ``phpunit`` from inside
453+
each package.
454+
455+
A failure in this job often indicates a missing package in the
456+
``composer.json`` of the failing package (e.g.
457+
``src/Symfony/Bundle/FrameworkBundle/composer.json``).
458+
459+
This job also runs relevant packages using a "flipped" test (indicated
460+
by a ``^`` suffix in the package name). These tests checkout the
461+
previous major release (e.g. ``4.4`` for a pull requests on ``5.4``)
462+
and run the tests with your branch as dependency.
463+
464+
A failure in these flipped tests indicate a backwards compatibility
465+
break in your changes.
466+
467+
``PHPUnit / Tests (low-deps)``
468+
This job also checks each package individually, but then uses
469+
``composer update --prefer-lowest`` before running the tests.
470+
471+
A failure in this job often indicates a wrong version range or a
472+
missing package in the ``composer.json`` of the failing package.
473+
474+
``continuous-integration/appveyor/pr``
475+
This job runs on Windows using the x86 architecture and the lowest
476+
supported PHP version. All tests first run without extra PHP
477+
extensions. Then, all skipped tests are run using all required PHP
478+
extensions.
479+
480+
A failure in this job often indicate that your changes do not support
481+
Windows, x86 or PHP with minimal extensions.
482+
483+
``Integration / Tests``
484+
Integration tests require other services (e.g. Redis or RabbitMQ) to
485+
run. This job only runs the tests in the ``integration`` PHPUnit group.
486+
487+
A failure in this job indicates a bug in the communication with these
488+
services.
489+
490+
``PHPUnit / Tests (experimental)``
491+
This job always passes (even with failing tests) and is used by the
492+
core team to prepare for the upcoming PHP versions.
493+
432494
.. _rework-your-patch:
433495

434496
Rework your Pull Request

frontend/encore/babel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Need to extend the Babel configuration further? The easiest way is via
2424
babelConfig.plugins.push('styled-jsx/babel');
2525
}, {
2626
// node_modules is not processed through Babel by default
27-
// but you can whitelist specific modules to process
27+
// but you can allow some specific modules to be processed
2828
includeNodeModules: ['foundation-sites'],
2929
3030
// or completely control the exclude rule (note that you

mailer.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,13 +1101,14 @@ This can be configured by replacing the ``dsn`` configuration entry with a
11011101
;
11021102
};
11031103
1104-
By default the first transport is used. The other transports can be used by
1105-
adding a text header ``X-Transport`` to an email::
1104+
By default the first transport is used. The other transports can be selected by
1105+
adding an ``X-Transport`` header (which Mailer will remove automatically from
1106+
the final email)::
11061107

1107-
// Send using first "main" transport ...
1108+
// Send using first transport ("main"):
11081109
$mailer->send($email);
11091110

1110-
// ... or use the "alternative" one
1111+
// ... or use the transport "alternative":
11111112
$email->getHeaders()->addTextHeader('X-Transport', 'alternative');
11121113
$mailer->send($email);
11131114

reference/configuration/framework.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ instance), the host might have been manipulated by an attacker.
607607
The Symfony :method:`Request::getHost() <Symfony\\Component\\HttpFoundation\\Request::getHost>`
608608
method might be vulnerable to some of these attacks because it depends on
609609
the configuration of your web server. One simple solution to avoid these
610-
attacks is to whitelist the hosts that your Symfony application can respond
610+
attacks is to configure a list of hosts that your Symfony application can respond
611611
to. That's the purpose of this ``trusted_hosts`` option. If the incoming
612612
request's hostname doesn't match one of the regular expressions in this list,
613613
the application won't respond and the user will receive a 400 response.
@@ -2708,7 +2708,7 @@ email_validation_mode
27082708

27092709
**type**: ``string`` **default**: ``loose``
27102710

2711-
It controls the way email addresses are validated by the
2711+
Sets the default value for
27122712
:doc:`/reference/constraints/Email` validator. The possible values are:
27132713

27142714
* ``loose``, it uses a simple regular expression to validate the address (it

reference/constraints/Regex.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ need to specify the HTML5 compatible pattern in the ``htmlPattern`` option:
244244
{
245245
#[Assert\Regex(
246246
pattern: '/^[a-z]+$/i',
247-
match: '^[a-zA-Z]+$'
247+
htmlPattern: '^[a-zA-Z]+$'
248248
)]
249249
protected $name;
250250
}

reference/constraints/Uuid.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ UUID
44
Validates that a value is a valid `Universally unique identifier (UUID)`_ per `RFC 4122`_.
55
By default, this will validate the format according to the RFC's guidelines, but this can
66
be relaxed to accept non-standard UUIDs that other systems (like PostgreSQL) accept.
7-
UUID versions can also be restricted using a whitelist.
7+
UUID versions can also be restricted using a list of allowed versions.
88

99
========== ===================================================================
1010
Applies to :ref:`property or method <validation-property-target>`

security.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,8 +1076,8 @@ like this:
10761076
will have ``IS_AUTHENTICATED_REMEMBERED`` but will not have ``IS_AUTHENTICATED_FULLY``.
10771077

10781078
* ``IS_AUTHENTICATED_ANONYMOUSLY``: *All* users (even anonymous ones) have
1079-
this - this is useful when *whitelisting* URLs to guarantee access - some
1080-
details are in :doc:`/security/access_control`.
1079+
this - this is useful when defining a list of URLs with no access restriction
1080+
- some details are in :doc:`/security/access_control`.
10811081

10821082
* ``IS_ANONYMOUS``: *Only* anonymous users are matched by this attribute.
10831083

service_container/factories.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ method name:
204204
205205
App\Email\NewsletterManager:
206206
class: App\Email\NewsletterManager
207-
factory: '@App\Email\NewsletterManagerFactory'
207+
factory: '@App\Email\InvokableNewsletterManagerFactory'
208208
209209
.. code-block:: xml
210210
@@ -220,7 +220,7 @@ method name:
220220
221221
<service id="App\Email\NewsletterManager"
222222
class="App\Email\NewsletterManager">
223-
<factory service="App\Email\NewsletterManagerFactory"/>
223+
<factory service="App\Email\InvokableNewsletterManagerFactory"/>
224224
</service>
225225
</services>
226226
</container>
@@ -237,7 +237,7 @@ method name:
237237
$services = $configurator->services();
238238
239239
$services->set(NewsletterManager::class)
240-
->factory(service(NewsletterManagerFactory::class));
240+
->factory(service(InvokableNewsletterManagerFactory::class));
241241
};
242242
243243
.. _factories-passing-arguments-factory-method:

setup/upgrade_minor.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ probably need to update the version constraint next to each library starting
4141
"...": "...",
4242
4343
"...": "A few libraries starting with
44-
symfony/ follow their versioning scheme. You
44+
symfony/ follow their own versioning scheme. You
4545
do not need to update these versions: you can
4646
upgrade them independently whenever you want",
4747
"symfony/monolog-bundle": "^3.5",

templating/global_variables.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,20 @@ the ``@`` character, which is the usual syntax to
9292
9393
<twig:config>
9494
<!-- ... -->
95-
<twig:global key="uuid">@App\Generator\UuidGenerator</twig:global>
95+
<twig:global key="foo" id="App\Generator\UuidGenerator" type="service"/>
9696
</twig:config>
9797
</container>
9898
9999
.. code-block:: php
100100
101101
// config/packages/twig.php
102102
use Symfony\Config\TwigConfig;
103+
use function Symfony\Component\DependencyInjection\Loader\Configurator\service;
103104
104105
return static function (TwigConfig $twig) {
105106
// ...
106107
107-
$twig->global('uuid')->value('@App\Generator\UuidGenerator');
108+
$twig->global('uuid')->value(service('App\Generator\UuidGenerator'));
108109
};
109110
110111
Now you can use the ``uuid`` variable in any Twig template to access to the

0 commit comments

Comments
 (0)