Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

LDAP - Wrong phpdoc for safe functions after PHP 8.1 #479

Open
psuet opened this issue Nov 30, 2024 · 0 comments
Open

LDAP - Wrong phpdoc for safe functions after PHP 8.1 #479

psuet opened this issue Nov 30, 2024 · 0 comments

Comments

@psuet
Copy link

psuet commented Nov 30, 2024

For nearly all LDAP functions in PHP 8.1

The ldap parameter expects an LDAP\Connection instance now; previously, a valid ldap link resource was expected.
https://www.php.net/manual/en/function.ldap-add.php

Currently Safe notes that the first parameter is still a resource. Thus PHPStan (and other tooling) returns an error when using the safe functions:

Parameter #1 $ldap of function Safe\ldap_add expects resource|null, LDAP\Connection given.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant