diff --git a/src/Builder.php b/src/Builder.php index 9f0a5bd9..78c36b27 100644 --- a/src/Builder.php +++ b/src/Builder.php @@ -148,7 +148,7 @@ public function expiresAt($expiration, $replicateAsHeader = false) private function convertToDate($value) { if (! $value instanceof DateTimeImmutable) { - trigger_error('Using integers for registered date claims is deprecated, please use DateTimeImmutable objects instead.', E_USER_DEPRECATED); + @trigger_error('Using integers for registered date claims is deprecated, please use DateTimeImmutable objects instead.', E_USER_DEPRECATED); return new DateTimeImmutable('@' . $value); } @@ -331,7 +331,7 @@ protected function setRegisteredClaim($name, $value, $replicate) $this->configureClaim($name, $value); if ($replicate) { - trigger_error('Replicating claims as headers is deprecated and will removed from v4.0. Please manually set the header if you need it replicated.', E_USER_DEPRECATED); + @trigger_error('Replicating claims as headers is deprecated and will removed from v4.0. Please manually set the header if you need it replicated.', E_USER_DEPRECATED); $this->headers[$name] = $value; } @@ -412,7 +412,7 @@ private function configureClaim($name, $value) public function withClaim($name, $value) { if (in_array($name, RegisteredClaims::ALL, true)) { - trigger_error('The use of the method "withClaim" is deprecated for registered claims. Please use dedicated method instead.', E_USER_DEPRECATED); + @trigger_error('The use of the method "withClaim" is deprecated for registered claims. Please use dedicated method instead.', E_USER_DEPRECATED); } return $this->forwardCallToCorrectClaimMethod($name, $value); @@ -468,7 +468,7 @@ public function set($name, $value) public function sign(Signer $signer, $key) { if (! $key instanceof Key) { - trigger_error('Implicit conversion of keys from strings is deprecated. Please use InMemory or LocalFileReference classes.', E_USER_DEPRECATED); + @trigger_error('Implicit conversion of keys from strings is deprecated. Please use InMemory or LocalFileReference classes.', E_USER_DEPRECATED); $key = new Key($key); } @@ -503,7 +503,7 @@ public function unsign() public function getToken(Signer $signer = null, Key $key = null) { if ($signer === null || $key === null) { - trigger_error('Not specifying the signer and key to Builder#getToken() is deprecated. Please move the arguments from Builder#sign() to Builder#getToken().', E_USER_DEPRECATED); + @trigger_error('Not specifying the signer and key to Builder#getToken() is deprecated. Please move the arguments from Builder#sign() to Builder#getToken().', E_USER_DEPRECATED); } $signer = $signer ?: $this->signer; diff --git a/src/Signer/BaseSigner.php b/src/Signer/BaseSigner.php index 34f47c9f..9bd97045 100644 --- a/src/Signer/BaseSigner.php +++ b/src/Signer/BaseSigner.php @@ -54,7 +54,7 @@ public function verify($expected, $payload, $key) private function getKey($key) { if (is_string($key)) { - trigger_error('Implicit conversion of keys from strings is deprecated. Please use InMemory or LocalFileReference classes.', E_USER_DEPRECATED); + @trigger_error('Implicit conversion of keys from strings is deprecated. Please use InMemory or LocalFileReference classes.', E_USER_DEPRECATED); $key = new Key($key); } diff --git a/src/Token.php b/src/Token.php index dfb259d9..dda4168f 100644 --- a/src/Token.php +++ b/src/Token.php @@ -293,7 +293,7 @@ public function isExpired(DateTimeInterface $now = null) } if ($now === null) { - trigger_error('Not providing the current time is deprecated. Please pass an instance of DateTimeInterface.', E_USER_DEPRECATED); + @trigger_error('Not providing the current time is deprecated. Please pass an instance of DateTimeInterface.', E_USER_DEPRECATED); } $now = $now ?: new DateTimeImmutable();