Install
Works with Drupal: ^10.3 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Release notes
Fixed all the issues!
1. No composer.json
2. No .gitignore
3. No .cspell.json
4. No .gitlab-ci.yml
---
user_live_status.info.yml
5. core_version_requirement: ^10 || ^11 — should be ^10.3 || ^11
6. Missing package key
---
user_live_status.module
7. Missing declare(strict_types=1)
8. Missing @file docblock
9. user_live_status_page_attachments() has /** Attach status library globally.
*/ — must be Implements hook_page_attachments().
10. Both hooks should be migrated to src/Hook/UserLiveStatusHooks.php with
#[Hook] attributes
11. \Drupal::currentUser() and \Drupal::entityTypeManager() static calls in
hook_toolbar() — OOP class should inject services
12. t('Set status') procedural call in hook — should use $this->t() in OOP
class
13. Helper functions _user_live_status_toolbar_links() and
_user_live_status_toolbar_link() should become private methods in the Hook
class
---
user_live_status.install
14. Missing declare(strict_types=1)
15. Missing @file docblock
16. Empty line after opening brace in both user_live_status_install() and
user_live_status_uninstall()
17. Inline comments missing full stops (PHPCS): // Create Field Storage if not
exists, // Attach field to User bundle, // Show field on User form, // Show
field on User view
---
src/Controller/UserLiveStatusController.php
18. Missing declare(strict_types=1)
19. Missing class docblock
20. Missing method docblock on setStatus()
21. Missing return type on setStatus() — should be : RedirectResponse
22. Emoji 🔥 in code comment — not appropriate for production code
---
user_live_status_toolbar.links.toolbar.yml
23. File name uses wrong prefix — Drupal discovers
MODULE_NAME.links.toolbar.yml, so this file
(user_live_status_toolbar.links.toolbar.yml) is never loaded. Should be
user_live_status.links.toolbar.yml
24. Only defines online and offline status links — busy and away are missing
(inconsistent with the 4-option toolbar built by hook_toolbar())