icingaweb2 icon indicating copy to clipboard operation
icingaweb2 copied to clipboard

Support PHP 8.4 (with ICINGAWEB_ENVIRONMENT=dev)

Open Al2Klimov opened this issue 1 year ago • 6 comments

RC1 is already in Debian experimental.

Admittedly, I haven't tried it out, yet.

Al2Klimov avatar Oct 02 '24 15:10 Al2Klimov

Tests

  1. Get Debian stable
  2. Upgrade to testing
  3. Upgrade to unstable
  4. Upgrade to experimental, but keep unstable repo
  5. apt install libapache2-mod-php8.4 *
  6. apt install icingaweb2
  7. Open IW2 in browser

*) Skipping this step shows the regular login page btw. due to PHP 8.2

First page load

Deprecated: React\Promise\Timer\timeout(): Implicitly marking parameter $loop as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/react/promise-timer/src/functions.php on line 138

Deprecated: React\Promise\Timer\sleep(): Implicitly marking parameter $loop as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/react/promise-timer/src/functions.php on line 225

Deprecated: React\Promise\Timer\resolve(): Implicitly marking parameter $loop as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/react/promise-timer/src/functions.php on line 283

Deprecated: React\Promise\Timer\reject(): Implicitly marking parameter $loop as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/react/promise-timer/src/functions.php on line 326

Deprecated: Clue\React\Block\sleep(): Implicitly marking parameter $loop as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/clue/block-react/src/functions.php on line 49

Deprecated: Clue\React\Block\await(): Implicitly marking parameter $loop as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/clue/block-react/src/functions.php on line 116

Deprecated: Clue\React\Block\awaitAny(): Implicitly marking parameter $loop as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/clue/block-react/src/functions.php on line 227

Deprecated: Clue\React\Block\awaitAll(): Implicitly marking parameter $loop as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/clue/block-react/src/functions.php on line 325

Deprecated: Cron\CronExpression::factory(): Implicitly marking parameter $fieldFactory as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/ipl/vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php on line 151

Deprecated: Cron\CronExpression::__construct(): Implicitly marking parameter $fieldFactory as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/ipl/vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php on line 182

Deprecated: Icinga\Application\Config::__construct(): Implicitly marking parameter $config as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/php/Icinga/Application/Config.php on line 73

Deprecated: Icinga\Web\Session::create(): Implicitly marking parameter $session as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/php/Icinga/Web/Session.php on line 29

Deprecated: Icinga\Web\Session\PhpSession::create(): Implicitly marking parameter $options as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/php/Icinga/Web/Session/PhpSession.php on line 46

Deprecated: Icinga\Web\Session\PhpSession::__construct(): Implicitly marking parameter $options as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/php/Icinga/Web/Session/PhpSession.php on line 59

Deprecated: Constant E_STRICT is deprecated in /usr/share/php/Icinga/Application/ApplicationBootstrap.php on line 582

Deprecated: ini_set(): session.sid_bits_per_character INI setting is deprecated in /usr/share/php/Icinga/Web/Session/PhpSession.php on line 87

Deprecated: Zend_Controller_Front::dispatch(): Implicitly marking parameter $request as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Front.php on line 835

Deprecated: Zend_Controller_Front::dispatch(): Implicitly marking parameter $response as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Front.php on line 835

Deprecated: Zend_Layout_Controller_Plugin_Layout::__construct(): Implicitly marking parameter $layout as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Layout/Controller/Plugin/Layout.php on line 51

Deprecated: Zend_Layout_Controller_Action_Helper_Layout::__construct(): Implicitly marking parameter $layout as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Layout/Controller/Action/Helper/Layout.php on line 59

Deprecated: Zend_Controller_Action_Helper_Abstract::setActionController(): Implicitly marking parameter $actionController as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Action/Helper/Abstract.php on line 55

Deprecated: Zend_Controller_Action::run(): Implicitly marking parameter $request as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Action.php on line 549

Deprecated: Zend_Controller_Action::run(): Implicitly marking parameter $response as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Action.php on line 549

Deprecated: Zend_Controller_Action::_forward(): Implicitly marking parameter $params as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Action.php on line 717

Deprecated: Zend_Controller_Action::forward(): Implicitly marking parameter $params as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Action.php on line 748

Deprecated: Zend_Controller_Dispatcher_Abstract::setResponse(): Implicitly marking parameter $response as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Dispatcher/Abstract.php on line 359

Deprecated: Zend_Controller_Dispatcher_Interface::setResponse(): Implicitly marking parameter $response as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Dispatcher/Interface.php on line 132

Deprecated: Zend_Controller_Action_Helper_ViewRenderer::__construct(): Implicitly marking parameter $view as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Action/Helper/ViewRenderer.php on line 182

Deprecated: Icinga\Application\Modules\Manager::detectInstalledModules(): Implicitly marking parameter $availableDirs as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/php/Icinga/Application/Modules/Manager.php on line 648

Deprecated: Zend_Controller_Router_Route::__construct(): Implicitly marking parameter $translator as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Router/Route.php on line 173

Deprecated: Zend_Controller_Router_Route::setDefaultTranslator(): Implicitly marking parameter $translator as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Router/Route.php on line 491

Deprecated: Zend_Paginator::factory(): Implicitly marking parameter $prefixPaths as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Paginator.php on line 270

Deprecated: Zend_Paginator::setView(): Implicitly marking parameter $view as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Paginator.php on line 936

Deprecated: Zend_Paginator::render(): Implicitly marking parameter $view as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Paginator.php on line 993

Deprecated: Zend_Xml_Security::scan(): Implicitly marking parameter $dom as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Xml/Security.php on line 71

Deprecated: Zend_Xml_Security::scanFile(): Implicitly marking parameter $dom as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Xml/Security.php on line 148

Deprecated: Zend_View_Helper_PaginationControl::paginationControl(): Implicitly marking parameter $paginator as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/View/Helper/PaginationControl.php on line 88

Deprecated: Icinga\Authentication\User\UserBackend::create(): Implicitly marking parameter $backendConfig as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/php/Icinga/Authentication/User/UserBackend.php on line 169

Deprecated: Icinga\Authentication\AuthChain::__construct(): Implicitly marking parameter $config as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/php/Icinga/Authentication/AuthChain.php on line 90

Deprecated: ipl\Stdlib\Str::trimSplit(): Implicitly marking parameter $limit as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/ipl/vendor/ipl/stdlib/src/Str.php on line 79

Fatal error: Uncaught Error: Class "Locale" not found in /usr/share/icinga-php/ipl/vendor/ipl/i18n/src/Locale.php:125 Stack trace: #0 /usr/share/icinga-php/ipl/vendor/ipl/i18n/src/Locale.php(90): ipl\I18n\Locale->parseLocale() #1 /usr/share/php/Icinga/Application/Web.php(504): ipl\I18n\Locale->getPreferred() #2 /usr/share/php/Icinga/Application/ApplicationBootstrap.php(696): Icinga\Application\Web->detectLocale() #3 /usr/share/php/Icinga/Application/Web.php(106): Icinga\Application\ApplicationBootstrap->setupInternationalization() #4 /usr/share/php/Icinga/Application/ApplicationBootstrap.php(388): Icinga\Application\Web->bootstrap() #5 /usr/share/php/Icinga/Application/webrouter.php(105): Icinga\Application\ApplicationBootstrap::start() #6 /usr/share/icingaweb2/public/index.php(4): require_once('...') #7 {main} thrown in /usr/share/icinga-php/ipl/vendor/ipl/i18n/src/Locale.php on line 125

Second page load

Deprecated: Constant E_STRICT is deprecated in /usr/share/php/Icinga/Application/ApplicationBootstrap.php on line 582

Deprecated: ini_set(): session.sid_bits_per_character INI setting is deprecated in /usr/share/php/Icinga/Web/Session/PhpSession.php on line 87

Fatal error: Uncaught Error: Class "Locale" not found in /usr/share/icinga-php/ipl/vendor/ipl/i18n/src/Locale.php:125 Stack trace: #0 /usr/share/icinga-php/ipl/vendor/ipl/i18n/src/Locale.php(90): ipl\I18n\Locale->parseLocale() #1 /usr/share/php/Icinga/Application/Web.php(504): ipl\I18n\Locale->getPreferred() #2 /usr/share/php/Icinga/Application/ApplicationBootstrap.php(696): Icinga\Application\Web->detectLocale() #3 /usr/share/php/Icinga/Application/Web.php(106): Icinga\Application\ApplicationBootstrap->setupInternationalization() #4 /usr/share/php/Icinga/Application/ApplicationBootstrap.php(388): Icinga\Application\Web->bootstrap() #5 /usr/share/php/Icinga/Application/webrouter.php(105): Icinga\Application\ApplicationBootstrap::start() #6 /usr/share/icingaweb2/public/index.php(4): require_once('...') #7 {main} thrown in /usr/share/icinga-php/ipl/vendor/ipl/i18n/src/Locale.php on line 125

Al2Klimov avatar Oct 23 '24 15:10 Al2Klimov

php 8.4 came to trixie a few weeks ago, and considering that trixie freezing is during the next few months, it would be great that icingaweb2 with php 8.4 support would made it into the freeze

https://release.debian.org/testing/freeze_policy.html

2025-03-15 - Milestone 1 - Transition and Toolchain Freeze 2025-04-15 - Milestone 2 - Soft Freeze 2025-05-15 - Milestone 3 - Hard Freeze - for key packages and packages without autopkgtests TBA - Milestone 4 - Full Freeze

flucas1 avatar Feb 24 '25 10:02 flucas1

Good point! As most of our packages are PHP based, this issue could also delay our own packages for distro versions with PHP 8.4 expected in Q2+:

  • Debian 13
  • Fedora 42

Al2Klimov avatar Feb 28 '25 13:02 Al2Klimov

@flucas1 Thanks for the alert! Feel free to integrate

  • #5359

as a patch into Debian's packages. It fixed PHP 8.4 for me.

Al2Klimov avatar Apr 25 '25 07:04 Al2Klimov

In openSUSE Tumbleweed (PHP 8.4) Icinga web fails to render with the following error messages:

[...]

Deprecated: Clue\React\Block\awaitAll(): Implicitly marking parameter $loop as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/icinga-php/vendor/vendor/clue/block-react/src/functions.php on line 325
Deprecated: Icinga\Application\Config::__construct(): Implicitly marking parameter $config as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/php/Icinga/Application/Config.php on line 73
Deprecated: Icinga\Web\Session::create(): Implicitly marking parameter $session as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/php/Icinga/Web/Session.php on line 29
Deprecated: Icinga\Web\Session\PhpSession::create(): Implicitly marking parameter $options as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/php/Icinga/Web/Session/PhpSession.php on line 46
Deprecated: Constant E_STRICT is deprecated in /usr/share/php/Icinga/Application/ApplicationBootstrap.php on line 582
Deprecated: Icinga\Web\Session\PhpSession::__construct(): Implicitly marking parameter $options as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/php/Icinga/Web/Session/PhpSession.php on line 59

Fatal error:  Uncaught ErrorException: ini_set(): Session ini settings cannot be changed after headers have already been sent in /usr/share/php/Icinga/Web/Session/PhpSession.php:87
Stack trace:
#0 [internal function]: Icinga\Application\ApplicationBootstrap->{closure:Icinga\Application\ApplicationBootstrap::setupErrorHandling():574}(2, 'ini_set(): Sess...', '/usr/share/php/...', 87)
#1 /usr/share/php/Icinga/Web/Session/PhpSession.php(87): ini_set('session.use_tra...', false)
#2 /usr/share/php/Icinga/Web/Session/PhpSession.php(48): Icinga\Web\Session\PhpSession->__construct(Array)
#3 /usr/share/php/Icinga/Web/Session.php(32): Icinga\Web\Session\PhpSession::create()
#4 /usr/share/php/Icinga/Application/Web.php(357): Icinga\Web\Session::create()
#5 /usr/share/php/Icinga/Application/Web.php(93): Icinga\Application\Web->setupSession()
#6 /usr/share/php/Icinga/Application/ApplicationBootstrap.php(388): Icinga\Application\Web->bootstrap()
#7 /usr/share/php/Icinga/Application/webrouter.php(105): Icinga\Application\ApplicationBootstrap::start()
#8 /usr/share/icingaweb2/public/index.php(4): require_once('/usr/share/php/...')
#9 {main}
  thrown in /usr/share/php/Icinga/Web/Session/PhpSession.php on line 87

szotsaki avatar May 05 '25 07:05 szotsaki

May I ask to release a new patch version to include this change? In 8.4-using distributions Icingaweb is unusable by default (without any exaggeration).

szotsaki avatar Jun 20 '25 17:06 szotsaki