Skip to content

Conversation

@BastianLedererIcinga
Copy link

@BastianLedererIcinga BastianLedererIcinga commented Nov 24, 2025

Changes that had to be addressed

PHP 8.3 -> PHP 8.4

Migration docs: https://www.php.net/manual/en/migration84

  • Function parameters that are null by default must be declared nullable.
  • Changing the value of session.sid_bits_per_character is deprecated.

PHP 8.4 -> PHP 8.5

Migration Docs: https://www.php.net/manual/en/migration85

  • curl_close() is deprecated in PHP 8.5, curl handles are instead freed automatically.
  • Driver specific PDO constants are deprecated this affects some MySQL driver constants,
    instead of PDO::SQL<constant_name> use Pdo\Mysql::<constant_name>.
  • ReflectionProperty::setAccessible has been deprecated, but did not have any effect since PHP 8.1.
  • Float to int casts, where the original value can't be represented as an integer will emit a warning. floor() must be used before the cast to achieve the previous behavior without a warning.
  • The backtick operator is deprecated, shell_exec() must be used instead.
  • Using null as an array offset or passing it to array_key_exists it deprecated, an empty string must be used instead

resolves: #5269
resolves: #5450

{
$id = trim($id);
$timestamp = (int) $timestamp;
$timestamp = (int) floor($timestamp);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make absolutely sure we're dealing with floats here. My feeling is that this change isn't strictly necessary since we're dealing with timestamps and those are usually a result of time() or DateTime->getTimestamp(), in which case it's always an int.

There are probably other cases as well, I won't comment on each one. Please review them again and ensure on your own that you don't floor unnecessarily. It's maybe also an option to prevent decimals in the first place, given the calls are internal only. Though, an exception is Benchmark, as it already floored its timestamp previously so there's no problem to do it still.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change has been reversed.

@nilmerg
Copy link
Member

nilmerg commented Nov 28, 2025

Also, the changes to the monitoring module seem implausible to be complete. You already acknowledged in person that you didn't test it yet since you don't have the IDO enabled/configured. Please talk to @lippserd whether that's necessary to begin with.

@nilmerg nilmerg added this to the 2.13 milestone Nov 28, 2025
@nilmerg
Copy link
Member

nilmerg commented Nov 28, 2025

The fact that 730af4c doesn't conditionally call setAccessible still, means that this only works on PHP >= 8.1, so this plays into the question what will happen with monitoring.

@BastianLedererIcinga BastianLedererIcinga changed the title Replace deprecated features Support PHP 8.4/8.5 Dec 5, 2025
@lippserd lippserd force-pushed the replace-deprecated-features branch 2 times, most recently from 04f618b to bcade4e Compare December 12, 2025 10:31
@lippserd lippserd force-pushed the replace-deprecated-features branch from bcade4e to d5c87b1 Compare December 12, 2025 10:39
@BastianLedererIcinga BastianLedererIcinga force-pushed the replace-deprecated-features branch from 21293ec to d5c87b1 Compare December 12, 2025 12:51
Passing null to non nullable parameters of built-in functions is deprecated since PHP-8.1
@BastianLedererIcinga BastianLedererIcinga force-pushed the replace-deprecated-features branch from 53102a4 to 03995b3 Compare January 22, 2026 09:39
- Remove all errors that were caused by the monitoring module
  as it is no longer a part if this repo
- Remove baselines of php versions that are no longer supported
- Merge baselines standard, 8.1 and 8.x since seperating them
  is no longer necessary.
- Remove errors that are no longer generated
@BastianLedererIcinga BastianLedererIcinga force-pushed the replace-deprecated-features branch from 03995b3 to be1b54a Compare January 22, 2026 11:08
Copy link
Contributor

@sukhwinder33445 sukhwinder33445 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏽

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for PHP 8.5 Support PHP 8.4 (with ICINGAWEB_ENVIRONMENT=dev)

5 participants