Skip to content

Commit 728c1f0

Browse files
committed
fix instance returned in withAccessCheck
1 parent 8594ee1 commit 728c1f0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Type/EntityQuery/EntityQueryType.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ public function hasAccessCheck(): bool
1717

1818
public function withAccessCheck(): self
1919
{
20-
$type = new self(
20+
// The constructor of ObjectType is under backward compatibility promise.
21+
// @see https://phpstan.org/developing-extensions/backward-compatibility-promise
22+
// @phpstan-ignore-next-line
23+
$type = new static(
2124
$this->getClassName(),
2225
$this->getSubtractedType(),
2326
$this->getClassReflection()

0 commit comments

Comments
 (0)