Skip to content
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

Improvement in the listener description #937

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 2 additions & 6 deletions Resources/doc/entity-listeners.rst
Expand Up @@ -14,12 +14,8 @@ entity manager it should be registered with. Example:
user_listener:
class: \UserListener
tags:
- { name: doctrine.orm.entity_listener }
-
name: doctrine.orm.entity_listener
event: preUpdate
entity: App\Entity\User
entity_manager: custom
- { name: doctrine.orm.entity_listener, entity: App\Entity\User, event: preUpdate }
Copy link
Member

Choose a reason for hiding this comment

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

The example shows the minimum attributes for a tag and what other attributes are available. Your changes drop this visualization. If your goal was to reduce confusion by removing one tag, you should create a new configuration block with the minimum and maximum amount of tag attributes.

You also need to adapt the XML part for the configuration to be equal to the YAML ones.

Can you please also add the lazy attribute to the configuration block with the maximum amount of tag attributes?


.. code-block:: xml

<?xml version="1.0" ?>
Expand Down