laminas / laminas-ldap

Provides support for LDAP operations including but not limited to binding, searching and modifying entries in an LDAP directory
https://docs.laminas.dev/laminas-ldap/
BSD 3-Clause "New" or "Revised" License
8 stars 18 forks source link

Add PHP 8.3 support #47

Closed GuySartorelli closed 11 months ago

GuySartorelli commented 11 months ago
Q A
Documentation no
Bugfix no
BC Break no
New Feature no
RFC no
QA no

Description

PHP 8.3 can't be used with this library due to the strict dependency constraint. Loosening the constraint to allow new versions of PHP 8 to be automatically installable isn't allowed as per https://github.com/laminas/laminas-ldap/issues/46#issuecomment-1824889894, so I'm just adding PHP 8.3 support here.

I've checked against the changes listed in https://php.watch/versions/8.3 and none of the listed changes should break anything this library uses.

Hopefully your CI will automagically pick up that it needs to test against PHP 8.3 - but if not, please let me know what I need to change and I'll change it.

Closes #46

Xerkus commented 11 months ago

php 8.0 reached eol. Please also drop it and update platform to 8.1

GuySartorelli commented 11 months ago

.......... Okay. That's not at all in the scope of what I'm doing this change for, but if that's what has to be done for you to add PHP 8.3 support, I'll do it.

GuySartorelli commented 11 months ago

Done

GuySartorelli commented 11 months ago

Looks like there are some PHP 8.1 failures in CI - those are out of scope for this PR.

Xerkus commented 11 months ago

Those errors appear to be more than just from updates to static analysis tool. They would need to be addressed first before this PR can be merged. I'll take a look at it later.

Xerkus commented 11 months ago

I do not understand why code sniffer invokes fatal error requiring return type will change annotation but it does not fail locally on php 8.2 or via tests

Xerkus commented 11 months ago

Hm. That is a LOT of skipped tests

Xerkus commented 11 months ago

generic ldap resource changed to dedicated objects starting with php 8.1. Since php 8.1 is now minimum the resource type is no longer valid so phpdoc was updated to reflect that and checks for resource were simplified to look only for relevant classes.

Missing ReturnTypeWillChange annotation indicates that support for php 8.1 and 8.2 was incomplete. It was not previously picked up most likely due to disabled online tests. That would be handled in #48