Problem/Motivation
With Drupal 9, after upgrading to version 4.0.11, this error in the PHP logs:
NOTICE: PHP message: PHP Fatal error: Trait 'Drupal\Core\Entity\BundlePermissionHandlerTrait' not found in /var/www/html/docroot/modules/contrib/environment_indicator/src/EnvironmentIndicatorPermissions.php on line 12
And admin pages do not load (WSOD).
The trait BundlePermissionHandlerTrait class does not exist for Drupal 9 and was not introduced until Drupal core 10.1.x.
Steps to reproduce
- Install Drupal 9
- Install Version 4.0.11 or above of this module.
- Browse to
/admin/modules
Proposed resolution
Starting from 4.0.11, create a new minor or major version of the module that is only compatible with 10.1+
Comments
Comment #2
teknorahComment #4
teknorahI think a minor release (or two) may need to be created, one for the D10 version and one for the D9 version. At that point, merge requests could be pointed to each one, or something?
Comment #5
teknorahComment #6
teknorahI take that back... it was introduced prior to 10.1.x
For whatever reason, it didn't come up before when searching the repo on gitlab, but I see looking at the code this trait was released for Drupal 9.3.x with commit: cffb02aad63664e7930a3d2ec798a8feb054af82
Comment #7
teknorahFor the 3341093-drupal9-version branch, it is sufficient to set
core_version_requirement: ^9.2? or would could I setcore_version_requirement: ~9.2.0to specify is only for Drupal core 9.2.x?Comment #8
gngn commentedLike @tekNorah wrote in #6 the
trait BundlePermissionHandlerTraitclass does exist for Drupal 9.It was introduced in 9.3.0 (so I am adjusting the issue title).
Current 4.0.14 announces compatibility with 9.2 (issue #3301118: Drupal 10 compatibility):
core_version_requirement: ^9.2 || ^10.So I think we should raise that to 9.3
core_version_requirement: ^9.3 || ^10.Btw: Using above posted repo searches show:
I think that's the reason for not finding "trait BundlePermissionHandlerTrait".
Comment #9
joegraduateComment #10
devkinetic commentedThis looks good, it should be bumped up.
Comment #13
isholgueras commentedThanks for the work
Comment #14
isholgueras commented