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

Make the user entity a classed object #155

Closed
quicksketch opened this issue Jan 7, 2014 · 4 comments
Closed

Make the user entity a classed object #155

quicksketch opened this issue Jan 7, 2014 · 4 comments

Comments

@quicksketch
Copy link
Member

Sub-issue of #49. Currently Backdrop uses "real" objects only for Comments, since Backdrop was forked just after https://drupal.org/node/1184944, which added the initial conversion of entities into real objects with CRUD support.

This issue is for introducing the User class, which extends Entity, and replacing all the CRUD relevant calls.

Drupal.org issue: https://drupal.org/node/1361228

Note that this issue removes user_save() entirely, which we will likely want to avoid and keep it as a wrapper around $user->save(), though the $edit parameter will likely be dropped.

@quicksketch
Copy link
Member Author

I've prepared the User entity patch in a branch here: https://github.com/quicksketch/backdrop/compare/155;user_classes

This is currently held-up by the way that we store sent e-mails as variables in SimpleTest. Because all variables are loaded on bootstrap, but the entity system isn't loaded yet, SimpleTest currently causes errors when e-mails are sent to users during tests. This issue should be resolved by switching to the state system in testing, which has an issue over here: #141

For now, this issue is going to be postponed briefly for testing purposes while that system is finished up.

@quicksketch
Copy link
Member Author

Now that the Taxonomy entities are converted and cleared the way for users, I've made the official pull request at backdrop/backdrop#129. It's pretty much a 100% backport, with some minor modifications around keeping is_new around instead of enforceIsNew(), and updating some of our Views tests which didn't exist in Drupal 8 at the time.

@quicksketch
Copy link
Member Author

I've merged in backdrop/backdrop#129. Yay! Nodes (#153) and Files (#152) are left.

@quicksketch
Copy link
Member Author

Some followup information: APIs are largely only expanded by this change. Unlike D8, we did not delete user_save() entirely; instead it's just a wrapper around $user->save(), like we're doing for terms, nodes, and files. Regardless, a change log entry is needed for all of these conversions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants