Problem/Motivation
We need to add Drupal 11 support while preserving backwards compatibility for Drupal 9 and 10.
Deprecations reported by the Upgrade Status module:
| File name | Line | Error |
|---|---|---|
| modules/contrib/content_moderation_notifications/src/Form/ContentModerationNotificationsFormBase.php | 156 | Call to deprecated function user_role_names(). Deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use Drupal\user\Entity\Role::loadMultiple() and, if necessary, an inline implementation instead. |
| modules/contrib/content_moderation_notifications/src/Form/ContentModerationNotificationsFormBase.php | 238 | Relying on entity queries to check access by default is deprecated in drupal:9.2.0 and an error will be thrown from drupal:10.0.0. Call \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with TRUE or FALSE to specify whether access should be checked. |
| modules/contrib/content_moderation_notifications/src/NotificationInformation.php | 112 | Relying on entity queries to check access by default is deprecated in drupal:9.2.0 and an error will be thrown from drupal:10.0.0. Call \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with TRUE or FALSE to specify whether access should be checked. |
| modules/contrib/content_moderation_notifications/content_moderation_notifications.info.yml | 5 | Value of core_version_requirement: ^9 || ^10 is not compatible with the next major version of Drupal core. See https://drupal.org/node/3070687. |
| { can ignore } modules/contrib/content_moderation_notifications/src/Notification.php | 130 | Call to deprecated method renderPlain() of class Drupal\Core\Render\Renderer. Deprecated in drupal:10.3.0 and is removed from drupal:12.0.0. Use Drupal\Core\Render\RendererInterface::renderInIsolation() instead. |
| { can ignore } modules/contrib/content_moderation_notifications/src/Notification.php | 142 | Call to deprecated method renderPlain() of class Drupal\Core\Render\Renderer. Deprecated in drupal:10.3.0 and is removed from drupal:12.0.0. Use Drupal\Core\Render\RendererInterface::renderInIsolation() instead. |
| { can ignore } modules/contrib/content_moderation_notifications/src/Notification.php | 188 | Call to deprecated method renderPlain() of class Drupal\Core\Render\Renderer. Deprecated in drupal:10.3.0 and is removed from drupal:12.0.0. Use Drupal\Core\Render\RendererInterface::renderInIsolation() instead. |
Issue fork content_moderation_notifications-3466635
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
aziza_a commentedComment #5
sarwan_verma commentedHi,
I have resolved the Drupal 11 compatibility issues and created MR!22.
Please review and verify it.
Thanks!
Comment #6
luke.leberComment #8
mark_fullmerComment #9
mark_fullmerThe latest round of changes to the existing MR opts for using Drupal's DeprecationHelper so that versions before Drupal 10.3 still use
renderPlain, per https://www.drupal.org/node/3407994 .Also, the replacement for user_role_names() was wrong, so I updated that.
Finally, I refactored the test logic to work with Drupal 11.
Setting to "Needs review."
Comment #10
mark_fullmerMarking as RTBC, based on the comment above from the MR.
Comment #11
adel-by commentedTested and works as expected.
Comment #14
jhedstromThanks all! I'll cut a new release shortly.