Skip to content

Commit 6488a62

Browse files
committed
Make invariant violation exception mandatory
1 parent efb8dff commit 6488a62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Serializer/InvariantViolation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class InvariantViolation
1717
private $message;
1818
private $exception;
1919

20-
public function __construct($normalizedValue, string $message, ?\Throwable $exception = null)
20+
public function __construct($normalizedValue, string $message, \Throwable $exception)
2121
{
2222
$this->normalizedValue = $normalizedValue;
2323
$this->message = $message;
@@ -34,7 +34,7 @@ public function getMessage(): string
3434
return $this->message;
3535
}
3636

37-
public function getException(): ?\Throwable
37+
public function getException(): \Throwable
3838
{
3939
return $this->exception;
4040
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy