Skip to content

Commit ba0d02e

Browse files
committed
feature #14802 [Ldap] Document the case-insensitive attribute names (javiereguiluz)
This PR was merged into the 5.3-dev branch. Discussion ---------- [Ldap] Document the case-insensitive attribute names Fixes #14625. Commits ------- d70cd24 [Ldap] Document the case-insensitive attribute names
2 parents 633222b + d70cd24 commit ba0d02e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

components/ldap.rst

+8
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ delete existing ones::
142142

143143
$phoneNumber = $entry->getAttribute('phoneNumber');
144144
$isContractor = $entry->hasAttribute('contractorCompany');
145+
// attribute names in getAttribute() and hasAttribute() methods are case-sensitive
146+
// pass FALSE as the second method argument to make them case-insensitive
147+
$isContractor = $entry->hasAttribute('contractorCompany', false);
145148

146149
$entry->setAttribute('email', ['[email protected]']);
147150
$entryManager->update($entry);
@@ -153,6 +156,11 @@ delete existing ones::
153156
// Removing an existing entry
154157
$entryManager->remove(new Entry('cn=Test User,dc=symfony,dc=com'));
155158

159+
.. versionadded:: 5.3
160+
161+
The option to make attribute names case-insensitive in ``getAttribute()``
162+
and ``hasAttribute()`` was introduce in Symfony 5.3.
163+
156164
Batch Updating
157165
______________
158166

0 commit comments

Comments
 (0)