Problem/Motivation
Issues found
1. core_version_requirement: ^10 || ^11 — must be ^10.3 || ^11
2. package: Custom — should be Other
bulk_update_user_roles.module
3. Missing declare(strict_types=1)
4. @file docblock is empty — must have a description
5. hook_permission() — Drupal 7 API, does not exist in Drupal 10/11; dead
code, remove it
6. hook_help() — must move to OOP Hook class
(src/Hook/BulkUpdateUserRolesHooks.php)
src/Form/BulkUpdateUserForm.php
7. Missing declare(strict_types=1)
8. create() missing return type : static
9. getFormId() missing return type : string
10. buildForm() missing return type : array
11. getUserOptions() missing return type : array
12. submitForm() missing return type : void
src/Batch/BulkUpdateUserRoles.php
13. Missing declare(strict_types=1)
14. Class docblock {@inheritdoc} is wrong — class is not overriding anything;
needs a real description
15. User::load($uid) static entity calls — replace with
\Drupal::entityTypeManager()->getStorage('user')->load()
16. addRolesToUser() missing return type : void
17. removeRolesFromUser() missing return type : void
18. finished() missing return type : void
Missing files
19. composer.json
20. .gitignore
21. .cspell.json
22. .gitlab-ci.yml
Comments
Comment #2
zeeshan_khan commentedFixed all issues in release 1.0.4