Skip to content

Commit fb45989

Browse files
committed
Merge branch '6.1' into 6.2
* 6.1: [Contributing] [Code] Add a step for forking in "Proposing a Change" Bump Symfony version Fix invalid yaml for password hashing in test env Update confusing first class callable syntax
2 parents 341aacf + c8946c2 commit fb45989

File tree

11 files changed

+37
-32
lines changed

11 files changed

+37
-32
lines changed

components/validator.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ If you have lots of validation errors, you can filter them by error code::
5757

5858
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
5959

60-
$violations = $validator->validate(...);
60+
$violations = $validator->validate(/* ... */);
6161
if (0 !== count($violations->findByCodes(UniqueEntity::NOT_UNIQUE_ERROR))) {
6262
// handle this specific error (display some message, send an email, etc.)
6363
}

contributing/code/pull_requests.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ Get the Symfony source code:
8787

8888
* Fork the `Symfony repository`_ (click on the "Fork" button);
8989

90+
* Uncheck the "Copy the ``X.Y`` branch only";
91+
9092
* After the "forking action" has completed, clone your fork locally
9193
(this will create a ``symfony`` directory):
9294

contributing/documentation/overview.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,16 @@ memorable name for the new branch (if you are fixing a reported issue, use
112112

113113
.. code-block:: terminal
114114
115-
$ git checkout -b improve_install_article upstream/4.4
115+
$ git checkout -b improve_install_article upstream/5.4
116116
117117
In this example, the name of the branch is ``improve_install_article`` and the
118-
``upstream/4.4`` value tells Git to create this branch based on the ``4.4``
118+
``upstream/5.4`` value tells Git to create this branch based on the ``5.4``
119119
branch of the ``upstream`` remote, which is the original Symfony Docs repository.
120120

121121
Fixes should always be based on the **oldest maintained branch** which contains
122-
the error. Nowadays this is the ``4.4`` branch. If you are instead documenting a
122+
the error. Nowadays this is the ``5.4`` branch. If you are instead documenting a
123123
new feature, switch to the first Symfony version that included it, e.g.
124-
``upstream/5.4``.
124+
``upstream/6.2``.
125125

126126
**Step 5.** Now make your changes in the documentation. Add, tweak, reword and
127127
even remove any content and do your best to comply with the
@@ -155,7 +155,7 @@ changes should be applied:
155155
:align: center
156156

157157
In this example, the **base fork** should be ``symfony/symfony-docs`` and
158-
the **base** branch should be the ``4.4``, which is the branch that you selected
158+
the **base** branch should be the ``5.4``, which is the branch that you selected
159159
to base your changes on. The **head fork** should be your forked copy
160160
of ``symfony-docs`` and the **compare** branch should be ``improve_install_article``,
161161
which is the name of the branch you created and where you made your changes.
@@ -205,7 +205,7 @@ contribution to the Symfony docs:
205205
# create a new branch based on the oldest maintained version
206206
$ cd projects/symfony-docs/
207207
$ git fetch upstream
208-
$ git checkout -b my_changes upstream/4.4
208+
$ git checkout -b my_changes upstream/5.4
209209
210210
# ... do your changes
211211
@@ -254,8 +254,8 @@ into multiple branches, corresponding to the different versions of Symfony itsel
254254
The latest (e.g. ``5.x``) branch holds the documentation for the development branch of
255255
the code.
256256

257-
Unless you're documenting a feature that was introduced after Symfony 4.4,
258-
your changes should always be based on the ``4.4`` branch. Documentation managers
257+
Unless you're documenting a feature that was introduced after Symfony 5.4,
258+
your changes should always be based on the ``5.4`` branch. Documentation managers
259259
will use the necessary Git-magic to also apply your changes to all the active
260260
branches of the documentation.
261261

controller.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ special type of exception::
314314
// throw new NotFoundHttpException('The product does not exist');
315315
}
316316

317-
return $this->render(...);
317+
return $this->render(/* ... */);
318318
}
319319

320320
The :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController::createNotFoundException`
@@ -435,10 +435,10 @@ For example, imagine you're processing a :doc:`form </forms>` submission::
435435
);
436436
// $this->addFlash() is equivalent to $request->getSession()->getFlashBag()->add()
437437

438-
return $this->redirectToRoute(...);
438+
return $this->redirectToRoute(/* ... */);
439439
}
440440

441-
return $this->render(...);
441+
return $this->render(/* ... */);
442442
}
443443

444444
After processing the request, the controller sets a flash message in the session

form/data_transformers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ slightly::
112112
$builder->add(
113113
$builder
114114
->create('tags', TextType::class)
115-
->addModelTransformer(...)
115+
->addModelTransformer(/* ... */)
116116
);
117117

118118
Example #2: Transforming an Issue Number into an Issue Entity

form/validation_groups.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ this as an option when :ref:`creating forms in controllers <creating-forms-in-co
1313

1414
$form = $this->createFormBuilder($user, [
1515
'validation_groups' => ['registration'],
16-
])->add(...);
16+
])->add(/* ... */);
1717

1818
When :ref:`creating forms in classes <creating-forms-in-classes>`, add the
1919
following to the ``configureOptions()`` method::

http_client.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1227,7 +1227,7 @@ that network errors can happen when calling e.g. ``getStatusCode()`` too::
12271227
// ...
12281228
try {
12291229
// both lines can potentially throw
1230-
$response = $client->request(...);
1230+
$response = $client->request(/* ... */);
12311231
$headers = $response->getHeaders();
12321232
// ...
12331233
} catch (TransportExceptionInterface $e) {

logging/monolog_exclude_http_codes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ logging these HTTP codes based on the MonologBundle configuration:
5555
$mainHandler = $monolog->handler('main')
5656
// ...
5757
->type('fingers_crossed')
58-
->handler(...)
58+
->handler('...')
5959
;
6060
6161
$mainHandler->excludedHttpCode()->code(403);

messenger.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,7 +1853,7 @@ this globally (or for each transport) to a service that implements
18531853
->context('foo', 'bar');
18541854
18551855
$messenger->transport('async_priority_normal')
1856-
->dsn(...)
1856+
->dsn('...')
18571857
->serializer('messenger.transport.symfony_serializer');
18581858
};
18591859
@@ -2094,8 +2094,8 @@ Then, make sure to "route" your message to *both* transports:
20942094
return static function (FrameworkConfig $framework) {
20952095
$messenger = $framework->messenger();
20962096
2097-
$messenger->transport('async_priority_normal')->dsn(...);
2098-
$messenger->transport('image_transport')->dsn(...);
2097+
$messenger->transport('async_priority_normal')->dsn('...');
2098+
$messenger->transport('image_transport')->dsn('...');
20992099
21002100
$messenger->routing('App\Message\UploadedImage')
21012101
->senders(['image_transport', 'async_priority_normal']);

security/passwords.rst

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,19 +123,22 @@ Further in this article, you can find a
123123
.. configuration-block::
124124

125125
.. code-block:: yaml
126-
126+
127127
# config/packages/test/security.yaml
128-
password_hashers:
129-
# Use your user class name here
130-
App\Entity\User:
131-
algorithm: plaintext # disable hashing (only do this in tests!)
132-
133-
# or use the lowest possible values
134-
App\Entity\User:
135-
algorithm: auto # This should be the same value as in config/packages/security.yaml
136-
cost: 4 # Lowest possible value for bcrypt
137-
time_cost: 3 # Lowest possible value for argon
138-
memory_cost: 10 # Lowest possible value for argon
128+
security:
129+
# ...
130+
131+
password_hashers:
132+
# Use your user class name here
133+
App\Entity\User:
134+
algorithm: plaintext # disable hashing (only do this in tests!)
135+
136+
# or use the lowest possible values
137+
App\Entity\User:
138+
algorithm: auto # This should be the same value as in config/packages/security.yaml
139+
cost: 4 # Lowest possible value for bcrypt
140+
time_cost: 3 # Lowest possible value for argon
141+
memory_cost: 10 # Lowest possible value for argon
139142
140143
.. code-block:: xml
141144

testing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ the container is returned by ``static::getContainer()``::
267267

268268
// (3) run some service & test the result
269269
$newsletterGenerator = $container->get(NewsletterGenerator::class);
270-
$newsletter = $newsletterGenerator->generateMonthlyNews(...);
270+
$newsletter = $newsletterGenerator->generateMonthlyNews(/* ... */);
271271

272272
$this->assertEquals('...', $newsletter->getContent());
273273
}

0 commit comments

Comments
 (0)