-
Notifications
You must be signed in to change notification settings - Fork 898
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
Avoid storing the full user object in notifications meta #20800
Merged
thijsoo
merged 33 commits into
trunk
from
avoid-storing-the-full-user-object-in-notifications-meta
Nov 7, 2023
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
4377168
Avoid storing the full WP_User object in db.
pls78 56eb126
Add upgrade routine.
pls78 32f466f
Fix cs
pls78 33e9cf7
Fix cs
pls78 35ad0b5
Fix unit tests
pls78 671c37a
Fix more unit tests
pls78 40cf598
Fix another unit test
pls78 d7c2c2e
Fix integration tests
pls78 3d60c25
Make the 21.6 callback public
pls78 b9ffccc
Enforce the presence of user
pls78 a322c93
Use proper user factory and fix test
pls78 426c143
Fix test by setting the current user properly
pls78 494da26
Revert "Make the 21.6 callback public"
pls78 d7c62c3
Revert " Add upgrade routine."
pls78 b098118
Fix cs
pls78 ae6aec8
Update existing notifications
pls78 c73a8b3
Fix cs
pls78 af9d09e
Fix bug preventing notifications to be fetched
pls78 f06f1ee
Fix cs
pls78 2fad611
Better implementation of the original idea
pls78 0015edd
Update admin/class-yoast-notification.php
pls78 f3b7c7f
Update admin/class-yoast-notification.php
pls78 b0427ae
Deprecate get_user.
pls78 8a63a68
Use factory instead of custom method
pls78 1567063
Fix unit tests
pls78 2fa9853
Fix test
pls78 6220e18
Use create_and_get instead of create
pls78 7115eec
Fix cs
pls78 2bed3d5
Use create_and_get instead of create
pls78 0ecd600
Moves user to user_id logic
pls78 607d8ad
Revert "Moves user to user_id logic"
pls78 65f3241
Streamlined the logic some more
pls78 c3d7f1e
Fix cs
pls78 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing the return value and type is a BC break. I think this is actually just a helper for the method below.
Probably we can just deprecate it?
But perhaps it is wise to not alter it and retrieve the user after getting the ID instead (similar to your
has_capability
change)? For BC sake.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I deprecated it, it wouldn't make sense anymore after this PR gets merged 🙂