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

Deprecate #[AsDocumentListener] parameters $method and $lazy (not working) #825

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Dec 21, 2023

If you use the TestAttributeListener as it was, in a project, it will throw an exception:

Attempted to call an undefined method named "prePersist" of class "TestAttributeListener". Did you mean to call "onPrePersist"?

Only the event name is used when injected into the manager.

lazy and method have no effect.

@GromNaN GromNaN requested a review from malarzm December 22, 2023 08:23
@GromNaN GromNaN added the bug label Dec 22, 2023
@GromNaN GromNaN merged commit 7fa2155 into doctrine:4.7.x Dec 22, 2023
13 checks passed
@GromNaN GromNaN deleted the deprecate-method branch December 22, 2023 08:48
GromNaN added a commit that referenced this pull request Dec 22, 2023
* 4.7.x:
  Deprecate EventSubscriberInterface in favor of #[AsDocumentListener] (#817)
  Deprecate AsDocumentListener::$method and $lazy (not working) (#825)
  Add priority to #[AsDocumentListener] (#822)
@GromNaN GromNaN changed the title Deprecate AsDocumentListener $method and $lazy (not working) Deprecate #[AsDocumentListener] $method and $lazy (not working) Dec 22, 2023
@GromNaN GromNaN changed the title Deprecate #[AsDocumentListener] $method and $lazy (not working) Deprecate #[AsDocumentListener] parameters $method and $lazy (not working) Dec 22, 2023
@alcaeus alcaeus added this to the 4.7.0 milestone Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants