8000 [Ldap] Fix extension deprecation by alexandre-daubois · Pull Request #58143 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Ldap] Fix extension deprecation #58143

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Ldap] Fix extension deprecation
  • Loading branch information
alexandre-daubois committed Sep 2, 2024
commit 8026481f182db7445d0c07ce48b63e477cf7892e
7 changes: 6 additions & 1 deletion src/Symfony/Component/Ldap/Tests/LdapTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ class LdapTestCase extends TestCase
{
protected function getLdapConfig()
{
$h = @ldap_connect(getenv('LDAP_HOST'), getenv('LDAP_PORT'));
if (\PHP_VERSION_ID < 80300) {
$h = @ldap_connect(getenv('LDAP_HOST'), getenv('LDAP_PORT'));
} else {
$h = @ldap_connect('ldap://'.getenv('LDAP_HOST').':'.getenv('LDAP_PORT'));
}

@ldap_set_option($h, \LDAP_OPT_PROTOCOL_VERSION, 3);

if (!$h || !@ldap_bind($h)) {
Expand Down
0