- Issue created by @kristiaanvandeneynde
- last update
over 1 year ago 9,034 pass, 52 fail - @kristiaanvandeneynde opened merge request.
- Status changed to Needs review
over 1 year ago 1:01pm 22 August 2023 - 🇧🇪Belgium kristiaanvandeneynde Antwerp, Belgium
This still needs tests, especially for the shared bundle class concept.
The logic we need to test is:
- No shared bundle class, no bundle class: Entity is instance of GroupRelationship
- No shared bundle class, bundle class: Entity is instance of the bundle class
- Shared bundle class, no bundle class: Entity is instance of the shared bundle class
- Shared bundle class, bundle class: Entity is instance of the bundle class
We should also test the loaders because we never had tests for that in the past. They're just a few simple loaders, but it doesn't hurt to have some tests.
Related:
- Then we need to finally add the missing test from 🐛 Group Membership Loader has accessCheck(true) Needs work (in that issue)
- And also incorporate the performance boost from 📌 Improve performance of the membership loader Needs work
- 🇧🇪Belgium kristiaanvandeneynde Antwerp, Belgium
It is some form of BC break, but I reckon the fallout should be minimal to none because we never typehinted for the return value and allowed people to return just about anything in the past as we had no interface. As long as you had the right methods, you are a-okay and that still holds true with the changes suggested here.
So old code should still keep working as long as we don't start typehinting for GroupMembershipInterface before v4.
- last update
over 1 year ago 9,034 pass, 51 fail - 🇧🇪Belgium kristiaanvandeneynde Antwerp, Belgium
Perhaps we shouldn't remove the old GroupMembership wrapper just yet, though. That's a bit overzealous of me, will add that back in and then look at the test fails.
- last update
over 1 year ago 9,613 pass, 1 fail - last update
over 1 year ago 9,627 pass - last update
over 1 year ago 9,034 pass, 52 fail - last update
over 1 year ago 9,034 pass, 52 fail - last update
over 1 year ago 9,034 pass, 52 fail - last update
over 1 year ago 9,627 pass - 🇧🇪Belgium kristiaanvandeneynde Antwerp, Belgium
Gonna split this up into two issues:
- Create the new concept of bundle classes + test this (new issue)
- Implement a GroupMembership bundle class and deprecate the membership loader (this issue)
- last update
over 1 year ago 9,628 pass - last update
about 1 year ago 9,628 pass - last update
about 1 year ago 9,628 pass - last update
about 1 year ago 9,628 pass - last update
about 1 year ago 9,628 pass - last update
about 1 year ago 9,628 pass - last update
about 1 year ago 9,628 pass -
kristiaanvandeneynde →
committed 80d2cc2c on 3.1.x
Issue #3382559: Deprecate the membership loader in favor of shared...
-
kristiaanvandeneynde →
committed 80d2cc2c on 3.1.x
- Status changed to Fixed
about 1 year ago 12:42pm 25 August 2023 -
kristiaanvandeneynde →
committed 4dc40e96 on 2.1.x
Issue #3382559: Deprecate the membership loader in favor of shared...
-
kristiaanvandeneynde →
committed 4dc40e96 on 2.1.x
- 🇩🇪Germany mvogel
Hi,
nice rewrite, thank you.
One question: Will the Group entity method `getMember()`be rewritten as well in version 2.x, 3.x?public function getMember(AccountInterface $account) { return $this->membershipLoader()->load($this, $account); } public function getMembers($roles = NULL) { return $this->membershipLoader()->loadByGroup($this, $roles); }
- 🇧🇪Belgium kristiaanvandeneynde Antwerp, Belgium
That would be a BC break. For now, I need to keep calling the membership loader because people may have decorated it or swapped it out. Inside of the membership loader, we are already using the new code. Starting from 4.0.0 we will call the new code directly.
Automatically closed - issue fixed for 2 weeks with no activity.