Support PHP 8.3
Closed this issue · 2 comments
Describe the bug
Calling ldap_connect() with separate hostname and port is deprecated.
– https://github.com/php/php-src/blob/php-8.3.0RC1/UPGRADING#L184C5-L184C74
But this is exactly what we do:
To Reproduce
- Try to add LDAP resource
- Check PHP deprecation notice on the screen
Expected behavior
LDAP just works.
Screenshots
Your Environment
- Icinga Web 2 version and modules (System - About): master
- Web browser used: Safari
- Icinga 2 version used (
icinga2 --version
): - - PHP version used (
php --version
): 8.3.0 RC3 - Server operating system and version: Fedora 40
Other notable changes
Executing proc_get_status() multiple times
Applicable to:
- icingaweb2/modules/monitoring/library/Monitoring/Command/Transport/RemoteCommandFile.php
- pdfexport/library/Pdfexport/ShellCommand.php
Both shouldn't be strongly affected.
Uses of traits with static properties
Applicable to:
- graphite/library/Graphite/Graphing/GraphingTrait.php
- ipl/web/src/FormElement/ScheduleElement/Common/FieldsUtils.php
The first is mainly used in controllers and clicommands, thus not affected by the new behavior. Though, a widget Graphs
also uses it, probably in parallel with one of the controllers/clicommands. Will check whether that's a problem later.
The latter seems to use them instead of constants. Weird, but not a problem.
Assigning a negative index to an empty array
Difficult to check. phpstan will hopefully do so.
The range() function has had various changes
https://www.php.net/manual/en/migration83.incompatible.php#migration83.incompatible.standard
Funny. range('0', '9')
will now return strings in the array, whereas range('0', '10')
does not. (or anything larger than one char) Should not be applicable to us. If it is, phpstan will hopefully detect it.
Saner Increment/Decrement operators
Difficult to check. phpstan will hopefully do so.
get_class()/get_parent_class() call without arguments
https://www.php.net/manual/en/migration83.deprecated.php#migration83.deprecated.core.get-class
Not applicable to our code parts, but to a vendor part. (zf1-future's OpenId extension, unused by us)
Will check whether that's a problem later.
Did some testing. Seems to have no effect.