-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Magento should create a log entry if an observer does not implement ObserverInterface #21755
Comments
Hi @bnymn. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @bnymn do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @engcom-backlog-nazar. Thank you for working on this issue.
|
✅ Confirmed by @engcom-backlog-nazar Issue Available: @engcom-backlog-nazar, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
Hi @Nazar65. Thank you for working on this issue.
|
Hi @bnymn. Thank you for your report.
The fix will be available with the upcoming 2.3.2 release. |
Summary (*)
In developer mode, if an observer does not implement ObserverInterface, Magento throws an exception. This is the expected behavior.
What I don't understand is that it does not do anything for other deploy modes (default and production). It silently discards the observer without even putting an entry to logs.
Examples (*)
This is the method where problem occurs. There is only one condition for developer mode, but other deploy modes are ignored.
Proposed solution
We can put an else condition. Then, we can log the same exception message in warning level.
The text was updated successfully, but these errors were encountered: