Skip to content

Commit 7787bad

Browse files
committed
Merge branch '5.0' into 5.1
* 5.0: Update authorization.rst Update filesystem.rst Update TypeHint Serializer.rst
2 parents eece86d + 669b4f2 commit 7787bad

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

components/filesystem.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ of a single file or directory::
193193
$filesystem->rename('/tmp/processed_video.ogg', '/path/to/store/video_647.ogg');
194194
// renames a directory
195195
$filesystem->rename('/tmp/files', '/path/to/store/files');
196+
// if the target already exists, a third boolean argument is available to overwrite.
197+
$filesystem->rename('/tmp/processed_video2.ogg', '/path/to/store/video_647.ogg', true);
196198

197199
``symlink``
198200
~~~~~~~~~~~

components/security/authorization.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ recognizes several strategies:
4747
grant access if there are more voters granting access than there are denying;
4848

4949
``unanimous``
50-
only grant access if none of the voters has denied access;
50+
only grant access if none of the voters has denied access. If all voters
51+
abstained from voting, the decision is based on the ``allow_if_all_abstain``
52+
config option (which defaults to ``false``).
5153

5254
``priority``
5355
grants or denies access by the first voter that does not abstain;

components/serializer.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,12 +463,12 @@ A custom name converter can handle such cases::
463463

464464
class OrgPrefixNameConverter implements NameConverterInterface
465465
{
466-
public function normalize($propertyName)
466+
public function normalize(string $propertyName)
467467
{
468468
return 'org_'.$propertyName;
469469
}
470470

471-
public function denormalize($propertyName)
471+
public function denormalize(string $propertyName)
472472
{
473473
// removes 'org_' prefix
474474
return 'org_' === substr($propertyName, 0, 4) ? substr($propertyName, 4) : $propertyName;

0 commit comments

Comments
 (0)