Skip to content

Commit d160717

Browse files
committed
Merge branch '6.2' into 6.3
* 6.2: [Security] `its` => `their` [Security] Removing "Most applications will only need one firewall" Adding needsRehash() Replace orm-pack with orm Tweaks Changing "white spaces" => "whitespace"
2 parents aa033f6 + f107d91 commit d160717

File tree

5 files changed

+20
-13
lines changed

5 files changed

+20
-13
lines changed

components/string.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,10 @@ There is also a method to get the bytes stored at some position::
165165
b('नमस्ते')->bytesAt(1); // [164]
166166
u('नमस्ते')->bytesAt(1); // [224, 164, 174]
167167

168-
Methods Related to Length and White Spaces
169-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
168+
.. _methods-related-to-length-and-white-spaces:
169+
170+
Methods Related to Length and Whitespace Characters
171+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
170172

171173
::
172174

@@ -190,14 +192,14 @@ Methods Related to Length and White Spaces
190192
END";
191193
u($text)->width(); // 14
192194

193-
// only returns TRUE if the string is exactly an empty string (not even white spaces)
195+
// only returns TRUE if the string is exactly an empty string (not even whitespace)
194196
u('hello world')->isEmpty(); // false
195197
u(' ')->isEmpty(); // false
196198
u('')->isEmpty(); // true
197199

198-
// removes all white spaces from the start and end of the string and replaces two
199-
// or more consecutive white spaces inside contents by a single white space
200-
u(" \n\n hello world \n \n")->collapseWhitespace(); // 'hello world'
200+
// removes all whitespace (' \n\r\t\x0C') from the start and end of the string and
201+
// replaces two or more consecutive whitespace characters with a single space (' ') character
202+
u(" \n\n hello \t \n\r world \n \n")->collapseWhitespace(); // 'hello world'
201203

202204
Methods to Change Case
203205
~~~~~~~~~~~~~~~~~~~~~~
@@ -286,7 +288,7 @@ Methods to Pad and Trim
286288
// repeats the given string the number of times passed as argument
287289
u('_.')->repeat(10); // '_._._._._._._._._._.'
288290

289-
// removes the given characters (by default, white spaces) from the string
291+
// removes the given characters (default: whitespace characters) from the beginning and end of a string
290292
u(' Lorem Ipsum ')->trim(); // 'Lorem Ipsum'
291293
u('Lorem Ipsum ')->trim('m'); // 'Lorem Ipsum '
292294
u('Lorem Ipsum')->trim('m'); // 'Lorem Ipsu'

reference/configuration/security.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,8 +816,7 @@ The name of the ``$_SERVER`` parameter holding the user identifier.
816816
Firewall Context
817817
~~~~~~~~~~~~~~~~
818818

819-
Most applications will only need one :ref:`firewall <firewalls-authentication>`.
820-
But if your application *does* use multiple firewalls, you'll notice that
819+
If your application uses multiple :ref:`firewalls <firewalls-authentication>`, you'll notice that
821820
if you're authenticated in one firewall, you're not automatically authenticated
822821
in another. In other words, the systems don't share a common "context":
823822
each firewall acts like a separate security system.

security.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -824,8 +824,8 @@ Finally, create or update the template:
824824

825825
.. caution::
826826

827-
The ``error`` variable passed into the template is an instance of
828-
:class:`Symfony\\Component\\Security\\Core\\Exception\\AuthenticationException`.
827+
The ``error`` variable passed into the template is an instance
828+
of :class:`Symfony\\Component\\Security\\Core\\Exception\\AuthenticationException`.
829829
It may contain sensitive information about the authentication failure.
830830
*Never* use ``error.message``: use the ``messageKey`` property instead,
831831
as shown in the example. This message is always safe to display.
@@ -1659,7 +1659,7 @@ You can log in a user programmatically using the `login()` method of the
16591659
// you can also log in on a different firewall
16601660
$security->login($user, 'form_login', 'other_firewall');
16611661

1662-
// ... redirect the user to its account page for instance
1662+
// ... redirect the user, e.g. to their account page
16631663
}
16641664
}
16651665

security/passwords.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,12 @@ If you need to create your own, it needs to follow these rules:
827827
828828
return $passwordIsValid;
829829
}
830+
831+
public function needsRehash(string $hashedPassword): bool
832+
{
833+
// Check if a password hash would benefit from rehashing
834+
return $needsRehash;
835+
}
830836
}
831837
832838
Now, define a password hasher using the ``id`` setting:

setup/flex.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ manual steps:
7474

7575
.. code-block:: terminal
7676
77-
$ composer require annotations asset orm-pack twig \
77+
$ composer require annotations asset orm twig \
7878
logger mailer form security translation validator
7979
$ composer require --dev dotenv maker-bundle orm-fixtures profiler
8080

0 commit comments

Comments
 (0)