Install

Works with Drupal: ^8 || ^9 || ^10 || ^11

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 12.05 KB
MD5: d591bb2a019673912461d74f5644d402
SHA-1: 85bad51ccb1c750018cf4ae7bc86900cef2b1b5f
SHA-256: f2b3edd5568efe93c8fd2ecd47d904857a3791b8753c01b35fa66213e82ee512
Download zip 17.54 KB
MD5: 1bab333c745385f0e296e6384d7dde1c
SHA-1: d34eb25c030852987e25dfe391b265493012e355
SHA-256: 10a8d37927ff968badd28edf63cfd46ad515a563b0e07f8ec85e498b988946f7

Release notes

Automated Drupal 11 compatibility fixes for views_role_based_global_text

Drupal 11 release

Dependency Injection Refactor (src/RoleBasedGlobalText.php)
- Added a proper __construct() and create() method to inject current_user and entity_type.manager services via the DI container.
- Replaced the deprecated \Drupal::currentUser() static call with the injected $this->currentUser service — fixing the deprecated code PHPCS issue.
- Replaced user_role_names() (deprecated function) with $this->entityTypeManager->getStorage('user_role')->loadMultiple() + Html::escape().
- Added imports for Html, EntityTypeManagerInterface, AccountInterface, RoleInterface, and ContainerInterface.

New Test Suite
- .gitlab-ci.yml — CI pipeline configuration added.
- tests/modules/views_role_based_global_text_test/ — new test helper submodule with a view fixture.
- tests/src/Functional/ViewsRoleBasedGlobalTextConfigurationTest.php — configuration form tests.
- tests/src/Functional/ViewsRoleBasedGlobalTextTestBase.php — base test class.
- tests/src/Functional/ViewsRoleBasedGlobalTextViewAccessTest.php — role-based access functional tests.

Created by: amitgoyal
Created on: 15 Mar 2026 at 06:53 UTC
Last updated: 15 Mar 2026 at 06:54 UTC
Bug fixes

Other releases