Skip to content

Document SensitiveParameter attributes - part 1#3402

Merged
Girgias merged 1 commit into
php:masterfrom
kocsismate:sensitive-attribute1
May 21, 2024
Merged

Document SensitiveParameter attributes - part 1#3402
Girgias merged 1 commit into
php:masterfrom
kocsismate:sensitive-attribute1

Conversation

@kocsismate
Copy link
Copy Markdown
Member

No description provided.

@kocsismate kocsismate requested a review from Girgias May 20, 2024 21:15
@kocsismate kocsismate requested a review from kamil-tekiela as a code owner May 20, 2024 21:15
@kocsismate
Copy link
Copy Markdown
Member Author

cc @haszi

@kocsismate kocsismate changed the title Document SensitiveParameter attributes Document SensitiveParameter attributes - part 1 May 20, 2024
@kocsismate kocsismate force-pushed the sensitive-attribute1 branch from 27cd810 to 009bed2 Compare May 20, 2024 21:20
@kamil-tekiela
Copy link
Copy Markdown
Member

I didn't look thoroughly but both PRs look fine.

@haszi
Copy link
Copy Markdown
Contributor

haszi commented May 21, 2024

I've noticed that while ldap_connect()'s stub file is showing a signature with 5 parameters with a fallback signature with 2 parameters, doc-en lists a signature with 1 parameter with the two parameter signature being deprecated as of PHP 8.3. This doesn't seem to be correct, is it?

#ifdef HAVE_ORALDAP
    function ldap_connect(?string $uri = null, int $port = 389, string $wallet = UNKNOWN, #[\SensitiveParameter] string $password = UNKNOWN, int $auth_mode = GSLC_SSL_NO_AUTH): LDAP\Connection|false {}
#ifdef LDAP_API_FEATURE_X_OPENLDAP
    function ldap_connect_wallet(?string $uri = null, string $wallet, #[\SensitiveParameter] string $password, int $auth_mode = GSLC_SSL_NO_AUTH): LDAP\Connection|false {}
#endif
#else
    function ldap_connect(?string $uri = null, int $port = 389): LDAP\Connection|false {}
#endif

image

@kocsismate
Copy link
Copy Markdown
Member Author

I've noticed that while ldap_connect()'s stub file is showing a signature with 5 parameters with a fallback signature with 2 parameters, doc-en lists a signature with 1 parameter with the two parameter signature being deprecated as of PHP 8.3. This doesn't seem to be correct, is it?

The function ldap_connect(?string $uri = null, int $port = 389, string $wallet = UNKNOWN, #[\SensitiveParameter] string $password = UNKNOWN, int $auth_mode = GSLC_SSL_NO_AUTH): LDAP\Connection|false {} signature is only available for Oracle, but this signature has never been documented.

So both signatures described in the manual page is correct, albeit the latter one is deprecated.

@Girgias Girgias merged commit 5bc68ad into php:master May 21, 2024
@kocsismate kocsismate deleted the sensitive-attribute1 branch May 21, 2024 11:09
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.

4 participants