Skip to content

Commit 0cdfc0b

Browse files
committed
propertyName and targetClassNames are not nullable
1 parent 2a3469b commit 0cdfc0b

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/Doctrine/BaseRelation.php

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
abstract class BaseRelation
1818
{
1919
public function __construct(
20-
private ?string $propertyName = null,
21-
private ?string $targetClassName = null,
20+
private string $propertyName,
21+
private string $targetClassName,
2222
private ?string $targetPropertyName = null,
2323
private bool $isSelfReferencing = false,
2424
private bool $mapInverseRelation = true,
@@ -27,16 +27,8 @@ public function __construct(
2727
private ?string $customReturnType = null,
2828
) {
2929
// @TODO - triggers are tmp, do not merge w/ them in place.
30-
if (null === $this->propertyName) {
31-
trigger_deprecation('symfony/maker-bundle', '0.0.0', 'No null propertyName');
32-
}
33-
34-
if (null === $this->targetClassName) {
35-
trigger_deprecation('symfony/maker-bundle', '0.0.0', 'No null targetClassName');
36-
}
37-
3830
if (null === $this->targetPropertyName) {
39-
trigger_deprecation('symfony/maker-bundle', '0.0.0', 'No null targetClassName');
31+
trigger_deprecation('symfony/maker-bundle', '0.0.0', 'No null target property name');
4032
}
4133
}
4234

0 commit comments

Comments
 (0)