Skip to content

Commit 97a311f

Browse files
committed
Fix missing property promotion in soft delete constraints
The $data and $deletedAtColumn constructor parameters were not promoted to properties, causing "Undefined property" errors when accessing $this->data and $this->deletedAtColumn in matches() and toString(). Added 'protected' keyword to enable constructor property promotion.
1 parent df1da4c commit 97a311f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/foundation/src/Testing/Constraints/NotSoftDeletedInDatabase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class NotSoftDeletedInDatabase extends Constraint
1919
*/
2020
public function __construct(
2121
protected Connection $database,
22-
array $data,
23-
string $deletedAtColumn
22+
protected array $data,
23+
protected string $deletedAtColumn
2424
) {
2525
}
2626

src/foundation/src/Testing/Constraints/SoftDeletedInDatabase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class SoftDeletedInDatabase extends Constraint
1919
*/
2020
public function __construct(
2121
protected Connection $database,
22-
array $data,
23-
string $deletedAtColumn
22+
protected array $data,
23+
protected string $deletedAtColumn
2424
) {
2525
}
2626

0 commit comments

Comments
 (0)