Code Modernization - Group 4.x

Created on 13 January 2024, 10 months ago

Problem/Motivation

The codebase still contains some dependency injection opportunities, such as the use of user::load and group::load in the UserSettings.php file. These could be replaced by adding the entityTypeManager with dependency injection and loading each as needed:

$this->entityTypeManager->getStorage('group')->load($gid);
$this->entityTypeManager->getStorage('user')->load($userprofile);

Now that group 3.2 has been released some code has been marked as deprecated for group 4.x. I should proactively update these sections of code to be ready for the group 4 release. For example, the GroupMembershipLoaderInterface is being phased out and should be replaced by the GroupMembership class.

A few quick notes for when I get to this:

- GroupMembership extends SharedBundleClassBase
- SharedBundleClassBase extends GroupRelationship
- GroupRelationship extends ContentEntityBase (similar to the user class)

I believe I can also leverage entityTypeManager in this case.

📌 Task
Status

Active

Version

3.0

Component

Code

Created by

🇨🇦Canada JayDarnell Guelph, Ontario

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024