stable

Clone or download

Read-only

refactor: Move register{,_admin}.php to dedicated controllers

No functional changes in all variants of user registration. Algorithm should be easier to follow now (RegisterFormProcessor vs register.php). Note: /account/register.php is kept to not break invitation emails. Note: There is a remaining legacy event in the user registration process, forcing us to depend on both EventDispatcherInterface and EventManager. This will be changed in a dedicated contribution. Part of request #29605: Convert account registration pages to BurningParrot Change-Id: Ia19912f7a159672122a6c77c7ce7e26e9fc20d57

Modified Files

Name
M src/common/Request/RouteCollector.php +115 −0 Go to diff View file
A src/common/User/Account/Register/DisplayAdminRegisterFormController.php +48 −0 Go to diff View file
A src/common/User/Account/Register/DisplayRegisterFormController.php +62 −0 Go to diff View file
R src/www/admin/register_admin.php Go to diff View file
A src/common/User/Account/Register/IProcessRegisterForm.php +31 −0 Go to diff View file
A src/common/User/Account/Register/ProcessAdminRegisterFormController.php +47 −0 Go to diff View file
A src/common/User/Account/Register/ProcessRegisterFormController.php +62 −0 Go to diff View file
A src/common/User/Account/Register/RegisterFormDisplayer.php +98 −0 Go to diff View file
M src/common/User/Account/Register/RegisterFormHandler.php +8 −6 Go to diff View file
M src/common/User/Account/Register/RegisterFormPresenterBuilder.php +19 −4 Go to diff View file
A src/common/User/Account/Register/RegisterFormProcessor.php +198 −0 Go to diff View file
M src/common/account/RegisterByAdminPresenter.class.php +2 −1 Go to diff View file
M src/common/account/RegisterByUserPresenter.class.php +2 −1 Go to diff View file
M src/common/include/BurningParrotCompatiblePageDetector.php +0 −6 Go to diff View file
M src/templates/admin/sidebar_users.mustache +1 −1 Go to diff View file
M src/templates/admin/users/all-users.mustache +1 −1 Go to diff View file
D src/www/account/register.php +0 −225 Go to diff View file
M src/www/include/proj_email.php +0 −12 Go to diff View file
M tests/psalm/tuleap-baseline.xml +1 −1 Go to diff View file
A tests/unit/common/User/Account/Register/DisplayAdminRegisterFormControllerTest.php +78 −0 Go to diff View file
A tests/unit/common/User/Account/Register/DisplayRegisterFormControllerTest.php +123 −0 Go to diff View file
A tests/unit/common/User/Account/Register/IDisplayRegisterFormStub.php +64 −0 Go to diff View file
A tests/unit/common/User/Account/Register/IProcessRegisterFormStub.php +64 −0 Go to diff View file
A tests/unit/common/User/Account/Register/ProcessAdminRegisterFormControllerTest.php +78 −0 Go to diff View file
A tests/unit/common/User/Account/Register/ProcessRegisterFormControllerTest.php +123 −0 Go to diff View file
R src/tests/unit/User/Account/Register/RegisterFormValidationIssueTest.php Go to diff View file