Skip to content

PHP8.1 'return type' errors #7467

Open
Open
@thstyl2000

Description

@thstyl2000

Steps to reproduce

  1. Check email
  2. look at logs

Expected behavior

No error logs.

Actual behavior

Following errors appear:

[PHP] Error: Error: Return type of OCA\Mail\AddressList::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /usr/local/www/nextcloud/apps/mail/lib/AddressList.php#109 at <<closure>>

 0. /usr/local/www/nextcloud/apps/mail/lib/AddressList.php line 39
    OC\Log\ErrorHandler::onAll()
 1. /usr/local/www/nextcloud/lib/composer/composer/ClassLoader.php line 571
    include("/usr/local/www/ ... p")
 2. /usr/local/www/nextcloud/lib/composer/composer/ClassLoader.php line 428
    Composer\Autoload\includeFile()
 3. /usr/local/www/nextcloud/apps/mail/lib/Db/Message.php line 134
    Composer\Autoload\ClassLoader->loadClass()
 4. /usr/local/www/nextcloud/apps/mail/lib/Model/IMAPMessage.php line 742
    OCA\Mail\Db\Message->__construct()
 5. /usr/local/www/nextcloud/apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php line 427
    OCA\Mail\Model\IMAPMessage->toDbMessage()
 6. <<closure>>
    OCA\Mail\Service\Sync\ImapToDbSynchronizer::OCA\Mail\Service\Sync\{closure}("*** sensitive parameters replaced ***")
 7. /usr/local/www/nextcloud/apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php line 428
    array_map()
 8. /usr/local/www/nextcloud/apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php line 236
    OCA\Mail\Service\Sync\ImapToDbSynchronizer->runPartialSync()
 9. /usr/local/www/nextcloud/apps/mail/lib/Service/Sync/SyncService.php line 127
    OCA\Mail\Service\Sync\ImapToDbSynchronizer->sync()
10. /usr/local/www/nextcloud/apps/mail/lib/Controller/MailboxesController.php line 161
    OCA\Mail\Service\Sync\SyncService->syncMailbox()
11. /usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 225
    OCA\Mail\Controller\MailboxesController->sync()
12. /usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 133
    OC\AppFramework\Http\Dispatcher->executeController()
13. /usr/local/www/nextcloud/lib/private/AppFramework/App.php line 172
    OC\AppFramework\Http\Dispatcher->dispatch()
14. /usr/local/www/nextcloud/lib/private/Route/Router.php line 298
    OC\AppFramework\App::main()
15. /usr/local/www/nextcloud/lib/base.php line 1030
    OC\Route\Router->match()
16. /usr/local/www/nextcloud/index.php line 36
    OC::handleRequest()

POST /apps/mail/api/mailboxes/32/sync
from 192.168.1.2 by ***** at 2022-10-20T07:53:46+00:00
[PHP] Error: Error: Return type of ChristophWurst\KItinerary\Itinerary::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /usr/local/www/nextcloud/apps/mail/vendor/christophwurst/kitinerary/src/Itinerary.php#52 at <<closure>>

 0. /usr/local/www/nextcloud/apps/mail/vendor/christophwurst/kitinerary/src/Itinerary.php line 31
    OC\Log\ErrorHandler::onAll()
 1. /usr/local/www/nextcloud/lib/composer/composer/ClassLoader.php line 571
    include("/usr/local/www/ ... p")
 2. /usr/local/www/nextcloud/lib/composer/composer/ClassLoader.php line 428
    Composer\Autoload\includeFile()
 3. /usr/local/www/nextcloud/apps/mail/lib/Service/ItineraryService.php line 77
    Composer\Autoload\ClassLoader->loadClass()
 4. /usr/local/www/nextcloud/apps/mail/lib/Service/ItineraryService.php line 84
    OCA\Mail\Service\ItineraryService->getCached()
 5. /usr/local/www/nextcloud/apps/mail/lib/Controller/MessagesController.php line 292
    OCA\Mail\Service\ItineraryService->extract()
 6. /usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 225
    OCA\Mail\Controller\MessagesController->getItineraries()
 7. /usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 133
    OC\AppFramework\Http\Dispatcher->executeController()
 8. /usr/local/www/nextcloud/lib/private/AppFramework/App.php line 172
    OC\AppFramework\Http\Dispatcher->dispatch()
 9. /usr/local/www/nextcloud/lib/private/Route/Router.php line 298
    OC\AppFramework\App::main()
10. /usr/local/www/nextcloud/lib/base.php line 1030
    OC\Route\Router->match()
11. /usr/local/www/nextcloud/index.php line 36
    OC::handleRequest()

GET /apps/mail/api/messages/112296/itineraries
from 192.168.1.2 by ***** at 2022-10-20T07:53:32+00:00

Mail app version

1.14.1

Mailserver or service

dovecot

Operating system

freebsd 13.1

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database

MariaDB

Additional info

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

  • Status

    🏗️ In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions