-
Notifications
You must be signed in to change notification settings - Fork 641
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
Deprecator Class #2870
Comments
The assumption is that you will fix the deprecation errors when you see them. If we removed them from production (or wrote to a file), the logs would likely be missed by most people. |
Fair, but leaving then in production on a high traffic site has the potential to take it down. I would imagine its fair to assume people should fix these issues in staging, or make their own choice to disable them in production. |
I just added a new You can set that property from return [
'*' => [
// keep this array even if it's empty
],
'production' => [
'components' => [
'deprecator' => [
'logTarget' => 'logs',
],
],
],
]; |
Awesome, When is this fix available to new composer requires? Thank you 🙏 ---- Update I see 3.0.7, testing. |
Thanks this is deployed to our server. I believe it is working. I am now not getting any deprecation errors in the CMS admin panel. Looks like this is good. TY |
Description
The deprecator service class can flood an instance of Craft 3 with too many open writes, as each deprecation error is written to the database on every request.
Per the file:
https://github.com/craftcms/cms/blob/develop/src/services/Deprecator.php
There is no way to turn off Deprecation writes to the DB, and some of the Deprecation errors I am getting are out of my control.
Temporarily we returned false from the Deprecator.
This feature should be removed on production, or write to a file instead, or be controlled by the user.
Additional info
Looks like some of the deprecations are coming from an outdated version of Migration Manager, I can work on updating that, but nevertheless I humbly suggest these should not be written to the DB on each request... :)
I have fixed the config mismatches in the log here as well.
The text was updated successfully, but these errors were encountered: