Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ce574b3

Browse filesBrowse files
committed
Merge branch '3.4' into 4.2
* 3.4: Expanding on repositoryMethod Mentioned the LDAP query scopes
2 parents d95f533 + 8f3e142 commit ce574b3
Copy full SHA for ce574b3

File tree

Expand file treeCollapse file tree

2 files changed

+17
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+17
-4
lines changed

‎components/ldap.rst

Copy file name to clipboardExpand all lines: components/ldap.rst
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,16 @@ array, you may use the
103103

104104
// Do something with the results array
105105

106+
By default, LDAP queries use the ``Symfony\Component\Ldap\Adapter::SCOPE_SUB``
107+
scope, which corresponds to the ``LDAP_SCOPE_SUBTREE`` scope of the
108+
:phpfunction:`ldap_search` function. You can also use ``SCOPE_BASE`` (related
109+
to the ``LDAP_SCOPE_BASE`` scope of :phpfunction:`ldap_read`) and ``SCOPE_ONE``
110+
(related to the ``LDAP_SCOPE_ONELEVEL`` scope of :phpfunction:`ldap_list`)::
111+
112+
use Symfony\Component\Ldap\Adapter;
113+
114+
$query = $ldap->query('dc=symfony,dc=com', '...', ['scope' => Adapter::SCOPE_ONE]);
115+
106116
Creating or Updating Entries
107117
----------------------------
108118

‎reference/constraints/UniqueEntity.rst

Copy file name to clipboardExpand all lines: reference/constraints/UniqueEntity.rst
+7-4Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,13 @@ not need to be used.
169169
repositoryMethod
170170
~~~~~~~~~~~~~~~~
171171

172-
**type**: ``string`` **default**: ``findBy()``
172+
**type**: ``string`` **default**: ``findBy``
173173

174-
The name of the repository method to use for making the query to determine
175-
the uniqueness. If it's left blank, the ``findBy()`` method will be used.
176-
This method should return a countable result.
174+
The name of the repository method used to determine the uniqueness. If it's left
175+
blank, ``findBy()`` will be used. The method receives as its argument a
176+
``fieldName => value`` associative array (where ``fieldName`` is each of the
177+
fields configured in the ``fields`` option). The method should return a
178+
`countable PHP variable`_.
177179

178180
entityClass
179181
~~~~~~~~~~~
@@ -297,3 +299,4 @@ also has a ``null`` value, validation would fail.
297299
.. include:: /reference/constraints/_payload-option.rst.inc
298300

299301
.. _`race conditions`: https://en.wikipedia.org/wiki/Race_condition
302+
.. _`countable PHP variable`: https://php.net/manual/function.is-countable.php

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.