leenooks / phpLDAPadmin

phpLDAPadmin - Web based LDAP administration tool
www.phpldapadmin.org
GNU General Public License v2.0
520 stars 166 forks source link

php 8.x support #260

Open mokraemer opened 6 months ago

mokraemer commented 6 months ago

is it planned to support newer php versions?

At the moment deprecated warnings makes it phpLDAPadmin unusable:

Creation of dynamic property page::$index is deprecated
PHP Debug Backtrace
File    /usr/share/phpldapadmin/lib/functions.php (192)
    Function    error (a:5:{i:0;s:88:"Unrecognized error number: 8192: Cr...)

In a first step deprecated warnings should not interfer the execution, and a declaration: #[AllowDynamicProperties] should be added, In the next step this should totally be avoided for further php versions.

williamdes commented 6 months ago

Already supported in Debian by my patch. But not yet available in normal releases. Patch is #202

mokraemer commented 6 months ago

Thanks william. I guess it will not hold for php 9. But it is good for php 8.2,8.3

williamdes commented 6 months ago

Yeah, but anyway I expect that before php 9 I will have done a new patch for the variables. It's not very complicated but takes time

andypost commented 6 months ago

Maybe there's automation tools for that a-la rector?

williamdes commented 6 months ago

In fact I wanted to setup phpstan to detect all variables that are not assigned and fix this bug. For this task phpstan seems to be the easiest path.

mokraemer commented 6 months ago

If you want to make php projects more reliable, you can use phan, but this will give you much more potential problems.

andypost commented 6 months ago

Usually phpstan level 2 with exceptions is enough