Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[LDAP] Add docs for applyOperations method #9715

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
May 22, 2018

Conversation

mablae
Copy link
Contributor

@mablae mablae commented May 1, 2018

@javiereguiluz javiereguiluz added this to the next milestone May 4, 2018
@javiereguiluz javiereguiluz added the Waiting Code Merge Docs for features pending to be merged label May 4, 2018
symfony-splitter pushed a commit to symfony/ldap that referenced this pull request May 18, 2018
…ablae)

This PR was merged into the 4.2-dev branch.

Discussion
----------

[LDAP] Add "applyOperations" method to EntryManager

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #27039
| License       | MIT
| Doc PR        | symfony/symfony-docs#9715

This PR adds a new method called `applyOperations` to the LDAP `EntryManager` class.
Internally it is mapping the new `UpdateOperation` object to the `ldap_modify_batch` method.

Tests green against openldap.

Thanks for any feedback.

Todo:

  * [x] Add Docs PR

Commits
-------

8fc09c73c6 Add applyOperations batch method to EntryManager
fabpot added a commit to symfony/symfony that referenced this pull request May 18, 2018
…ablae)

This PR was merged into the 4.2-dev branch.

Discussion
----------

[LDAP] Add "applyOperations" method to EntryManager

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #27039
| License       | MIT
| Doc PR        | symfony/symfony-docs#9715

This PR adds a new method called `applyOperations` to the LDAP `EntryManager` class.
Internally it is mapping the new `UpdateOperation` object to the `ldap_modify_batch` method.

Tests green against openldap.

Thanks for any feedback.

Todo:

  * [x] Add Docs PR

Commits
-------

8fc09c7 Add applyOperations batch method to EntryManager
@xabbuh xabbuh modified the milestones: next, 4.2 May 18, 2018
@xabbuh xabbuh removed the Waiting Code Merge Docs for features pending to be merged label May 18, 2018

Use the EntryManager's ``applyOperations()`` method to update multiple attributes at once::


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one blank line is enough :)

Batch Updating
______________

Use the EntryManager's ``applyOperations()`` method to update multiple attributes at once::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[...] entry manager's [...]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and we could use the method role here:

:method:`Symfony\\Component\\Ldap\\Adapter\\ExtLdap\\EntryManager::applyOperations`

new UpdateOpteration(LDAP_MODIFY_BATCH_ADD, 'mail', '[email protected]'),
));

Possible operation types are ``LDAP_MODIFY_BATCH_ADD``, ``LDAP_MODIFY_BATCH_REMOVE``, ``LDAP_MODIFY_BATCH_REMOVE_ALL``, ``LDAP_MODIFY_BATCH_REPLACE``. Parameter ``$values`` must be ``NULL`` when using ``LDAP_MODIFY_BATCH_REMOVE_ALL`` operation type.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we usually split lines after the first word that crosses the 72nd character

Possible operation types are ``LDAP_MODIFY_BATCH_ADD``, ``LDAP_MODIFY_BATCH_REMOVE``, ``LDAP_MODIFY_BATCH_REMOVE_ALL``, ``LDAP_MODIFY_BATCH_REPLACE``. Parameter ``$values`` must be ``NULL`` when using ``LDAP_MODIFY_BATCH_REMOVE_ALL`` operation type.

.. versionadded:: 4.2
The ``applyOperations()`` was introduced in Symfony 4.2.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The applyOperations() method [...]

@mablae
Copy link
Contributor Author

mablae commented May 19, 2018

Thanks @xabbuh . I just applied your fixes and rebased it.

@javiereguiluz
Copy link
Member

Malte, thanks for contributing this feature to Symfony and for providing the docs for it. Also, it was the first Symfony Docs contribution, so thank you and congrats!

@javiereguiluz javiereguiluz merged commit 74fed75 into symfony:master May 22, 2018
javiereguiluz added a commit that referenced this pull request May 22, 2018
This PR was merged into the master branch.

Discussion
----------

[LDAP] Add docs for applyOperations method

See PR symfony/symfony#27069

Commits
-------

74fed75 [LDAP] Add docs for applyOperations method
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