Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit54ed8c8

Browse files
committed
Merge branch '7.4' into 8.0
* 7.4: Minor tweak [LockableTrait]Do not redeclare $lockFactory through constructor property promotion in the code example
2 parents7c39f50 +f035fcb commit54ed8c8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎console/lockable_trait.rst‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,13 @@ a ``$lockFactory`` property with your own lock factory::
5555
{
5656
use LockableTrait;
5757

58-
public function __construct(private LockFactory $lockFactory)
58+
// don't use PHP constructor property promotion here because the
59+
// LockableTrait already defines the `$lockFactory` property in this class
60+
public function __construct(LockFactory $lockFactory)
5961
{
62+
$this->lockFactory = $lockFactory;
63+
64+
parent::__construct();
6065
}
6166

6267
// ...

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp