stable
Clone or download
part of request #29215 - Clean baseline plugin ⬡ This interface was defined in the Adapter namespace, which is a sign that something is not right in the architecture design. In hexagonal architecture, we use interfaces to expose ports to adapters, so Domain and Adapters can interact safely together. Hence, interfaces should only be defined in the domain, and never in adapters. In this particular case, IBuildAdminPermissionsPresenter is a useless interface since it was implemented by an adapter containing adapter logic (e.g build a presenter to render a view). I also took the opportunity to introduce a stub for the RoleAssignmentRepository, in order to stop stubbing it with `new class implements RoleAssignmentRepository` everytime we have code to test which is retrieving RoleAssignments. No functional change expected Change-Id: I40bb645d18c04ef7472a475c9bca48ec144c1a96
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/baseline/include/Adapter/Administration/AdminPermissionsPresenterBuilder.php | +1 | −1 | Go to diff View file |
D | plugins/baseline/include/Adapter/Administration/IBuildAdminPermissionsPresenter.php | +0 | −34 | Go to diff View file |
M | plugins/baseline/include/ServiceAdministrationController.php | +2 | −2 | Go to diff View file |
M | plugins/baseline/tests/unit/Adapter/Administration/AdminPermissionsPresenterBuilderTest.php | +11 | −27 | Go to diff View file |
M | plugins/baseline/tests/unit/Adapter/Administration/PermissionPerGroupBaselineServicePaneBuilderTest.php | +9 | −16 | Go to diff View file |
M | plugins/baseline/tests/unit/ServiceAdministrationControllerTest.php | +20 | −19 | Go to diff View file |
M | plugins/baseline/tests/unit/ServiceSavePermissionsControllerTest.php | +3 | −23 | Go to diff View file |
A | plugins/baseline/tests/unit/Stub/RoleAssignmentRepositoryStub.php | +79 | −0 | Go to diff View file |