Skip to content

PHP 8.2 Deprecated functions "strftime()" and Return type of TrapTable::count() #82

Description

@Tqnsls

Get debug logs

Listed below.

Describe the bug

I updated from PHP 7.2 to PHP 8.2 since according to the requirements the module supports php 7 and later.

Deprecation notices:
Image

PHP Deprecated:  Function strftime() is deprecated in /usr/share/icingaweb2/modules/trapdirector/application/controllers/ReceivedController.php on line 92
PHP Deprecated:  Function strftime() is deprecated in /usr/share/icingaweb2/modules/trapdirector/library/Trapdirector/Tables/TrapTableList.php on line 71
PHP Deprecated:  Function strftime() is deprecated in /usr/share/icingaweb2/modules/trapdirector/library/Trapdirector/Tables/TrapTable.php on line 53
PHP Deprecated:  Return type of Icinga\Module\TrapDirector\Tables\TrapTable::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attrib                                                                                                                                                                                                                       ute should be used to temporarily suppress the notice in /usr/share/icingaweb2/modules/trapdirector/library/Trapdirector/Tables/TrapTable.php on line 138

To Reproduce

Update / Install PHP 8.2.

Expected behavior

No deprecation notices.

Your Environment:

  • trapdirector version (in icinga web 2 : System - About): 1.0.6
  • Icinga Web 2 version and modules (in icinga web 2 : System - About): icingaweb2-2.12.4
  • Icinga 2 version (icinga2 --version): icinga2 r2.15.0-1
  • Operating System and version: RHEL 8.10
  • Webserver, PHP versions: PHP 8.2.28 (cli) (built: Mar 11 2025 17:58:12) (NTS gcc x86_64)
  • [PHP Modules]
    • bz2,calendar,Core,ctype,curl,date,dom,exif,fileinfo,filter,ftp,gd,gettext,hash,iconv,intl,json,ldap,libxml,mbstring,mysqli,mysqlnd,openssl,pcntl,pcre,PDO,pdo_mysql,pdo_pgsql,pdo_sqlite,pgsql,Phar,posix,random,readline,Reflection,session,shmop,SimpleXML,soap,sockets,SPL,sqlite3,standard,sysvmsg,sysvsem,sysvshm,tokenizer,xml,xmlreader,xmlwriter,xsl,Zend OPcache,zlib
    • [Zend Modules] Zend OPcache

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions