You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PHP 8.1 throws Deprecation errors for this package.
Steps to Reproduce
Use in PHP 8.1
Exception/Log
Example (occurs in all occurrences of jsonSerialize):
Deprecated: Return type of SendGrid\Mail\Content::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Technical details:
sendgrid-php version: 7.11
php version: 8.1
Suggested Fix
There is a temporary fix of adding the #[\ReturnTypeWillChange] annotation to the methods.
The long term fix would be to correctly specify the return type. This will require a major release as it will lock out PHP version prior to PHP 8.1.
The text was updated successfully, but these errors were encountered:
Issue Summary
PHP 8.1 throws Deprecation errors for this package.
Steps to Reproduce
Use in PHP 8.1
Exception/Log
Example (occurs in all occurrences of
jsonSerialize
):Technical details:
Suggested Fix
There is a temporary fix of adding the
#[\ReturnTypeWillChange]
annotation to the methods.The long term fix would be to correctly specify the return type. This will require a major release as it will lock out PHP version prior to PHP 8.1.
The text was updated successfully, but these errors were encountered: