Confirmed [E_DEPRECATED] Return type of Laminas\Feed\Writer\Feed::count()

Old Nick

Well-known member
Hello, idk what's happend... Always the same model, these 6 errors seem to repeat themselves endlessly. There are more than 3,000 since this morning. (XF 2.3 RC2)

Capture d'écran 2024-06-12 194552.webp

Code:
ErrorException: [E_DEPRECATED] Return type of Laminas\Feed\Writer\Feed::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice src/vendor/laminas/laminas-feed/src/Writer/Feed.php:157

Code:
#0 src/vendor/laminas/laminas-feed/src/Writer/Feed.php(14): XF::handlePhpError(8192, '[E_DEPRECATED] ...', '/srv/data/web/v...', 157)
#1 src/vendor/composer/ClassLoader.php(576): include('/srv/data/web/v...')
#2 src/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}('/srv/data/web/v...')
#3 src/vendor/laminas/laminas-zendframework-bridge/src/Autoloader.php(112): Composer\Autoload\ClassLoader->loadClass('Laminas\\Feed\\Wr...')
#4 src/XF/Pub/View/Forum/Rss.php(14): Laminas\ZendFrameworkBridge\Autoloader::Laminas\ZendFrameworkBridge\{closure}('Laminas\\Feed\\Wr...')
#5 src/XF/Mvc/Renderer/AbstractRenderer.php(91): XF\Pub\View\Forum\Rss->renderRss()
#6 src/XF/Mvc/Renderer/Xml.php(72): XF\Mvc\Renderer\AbstractRenderer->renderViewObject('XF:Forum\\Rss', '', Array)
#7 src/XF/Mvc/Dispatcher.php(461): XF\Mvc\Renderer\Xml->renderView('XF:Forum\\Rss', '', Array)
#8 src/XF/Mvc/Dispatcher.php(443): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Rss), Object(XF\Mvc\Reply\View))
#9 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Rss), Object(XF\Mvc\Reply\View))
#10 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'rss')
#11 src/XF/App.php(2607): XF\Mvc\Dispatcher->run()
#12 src/XF.php(533): XF\App->run()
#13 index.php(20): XF::runApp('XF\\Pub\\App')
#14 {main}

Code:
array(4) {
  ["url"] => string(19) "/forums/-/index.rss"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Last edited:
PHP 8.2.13

First error in the log at 9AM and last just now at 7PM and nothing since... There were 3045 errors, I haven't changed anything in the ACP since...
 
I can reproduce this, it looks like we'll need to address it. As always with deprecations, they're only logged for informational purposes when debug mode is enabled and should not actually cause issues for end-users.
 
This server error can be reproduced on XenForo Cloud when not in development mode. Just add /featured/index.rss to the forum URL.

Not in my testing it can't. These are deprecations, they are only logged in debug / developer mode.
 
Back
Top Bottom