laravel-imap icon indicating copy to clipboard operation
laravel-imap copied to clipboard

PHP 8.1 incompatibility: Getting deprecated error.

Open shaprk opened this issue 3 years ago • 0 comments

Hello there, When trying to get messages, I get a long list of deprecated errors that I think are due to PHP 8.0 and 8.1 updates and deprecations.

PHP Deprecated:  Return type of Webklex\PHPIMAP\Attribute::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/webklex/php-imap/src/Attribute.php on line 100                                                                                                                 
PHP Deprecated:  Return type of Webklex\PHPIMAP\Attribute::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/webklex/php-imap/src/Attribute.php on line 110                                                                                                                      
PHP Deprecated:  Return type of Webklex\PHPIMAP\Attribute::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/webklex/php-imap/src/Attribute.php on line 121                                                                                                 
PHP Deprecated:  Return type of Webklex\PHPIMAP\Attribute::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/webklex/php-imap/src/Attribute.php on line 135                                                                                                                   
PHP Deprecated:  strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/vendor/webklex/php-imap/src/Part.php on line 302
PHP Deprecated:  strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/vendor/webklex/php-imap/src/Part.php on line 302
PHP Deprecated:  strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/vendor/webklex/php-imap/src/Part.php on line 302
PHP Deprecated:  strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/vendor/webklex/php-imap/src/Part.php on line 302
PHP Deprecated:  strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/vendor/webklex/php-imap/src/EncodingAliases.php on line 476
PHP Deprecated:  strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/vendor/webklex/php-imap/src/EncodingAliases.php on line 476
PHP Deprecated:  strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/vendor/webklex/php-imap/src/Message.php on line 722
PHP Deprecated:  strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/vendor/webklex/php-imap/src/Message.php on line 573
PHP Deprecated:  strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/vendor/webklex/php-imap/src/Part.php on line 302

After I checked the Webklex/php-imap changelog, in version 3.2.0 the problem has been fixed. But Webklex/laravel-imap requires Webklex/php-imap 3.0 in its composer.json file. So, please update the composer.json file and require the latest version of your other package i.e. Webklex/php-imap and I think the problem will be solved.

shaprk avatar Apr 17 '22 15:04 shaprk