We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 465bd9d commit c744140Copy full SHA for c744140
ServiceSubscriberTrait.php
@@ -51,7 +51,7 @@ public static function getSubscribedServices(): array
51
$attribute = $attribute->newInstance();
52
$attribute->key ??= self::class.'::'.$method->name;
53
$attribute->type ??= $returnType instanceof \ReflectionNamedType ? $returnType->getName() : (string) $returnType;
54
- $attribute->nullable = $returnType->allowsNull();
+ $attribute->nullable = $attribute->nullable ?: $returnType->allowsNull();
55
56
if ($attribute->attributes) {
57
$services[] = $attribute;
0 commit comments