From b15cd3d0c099780cac61a84d431f342bc046916e Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Mon, 9 Sep 2024 13:26:44 +0200 Subject: [PATCH] [Ldap] Clean `ldap_connect()` call in `LdapTestCase` --- src/Symfony/Component/Ldap/Tests/LdapTestCase.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Symfony/Component/Ldap/Tests/LdapTestCase.php b/src/Symfony/Component/Ldap/Tests/LdapTestCase.php index 39b9184c64c83..f9b347c88a5f6 100644 --- a/src/Symfony/Component/Ldap/Tests/LdapTestCase.php +++ b/src/Symfony/Component/Ldap/Tests/LdapTestCase.php @@ -17,12 +17,7 @@ class LdapTestCase extends TestCase { protected function getLdapConfig() { - 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')); - } - + $h = @ldap_connect('ldap://'.getenv('LDAP_HOST').':'.getenv('LDAP_PORT')); @ldap_set_option($h, \LDAP_OPT_PROTOCOL_VERSION, 3); if (!$h || !@ldap_bind($h)) {