Skip to content

Instantly share code, notes, and snippets.

@drubb
Created July 22, 2025 15:49
Show Gist options
  • Select an option

  • Save drubb/b5777d25ef242005081250b659eb4891 to your computer and use it in GitHub Desktop.

Select an option

Save drubb/b5777d25ef242005081250b659eb4891 to your computer and use it in GitHub Desktop.
Patch for Drush 13.6 and Drupal 11.2 to fix core:requirements
diff --git a/src/Commands/core/DrupalCommands.php b/src/Commands/core/DrupalCommands.php
--- a/src/Commands/core/DrupalCommands.php
+++ b/src/Commands/core/DrupalCommands.php
@@ -108,6 +108,10 @@
$min_severity = $options['severity'];
foreach ($requirements as $key => $info) {
$severity = array_key_exists('severity', $info) ? $info['severity'] : -1;
+ if (is_object($severity)) {
+ // From Drupal 11.2, severity might be an object.
+ $severity = $severity->value;
+ }
$rows[$key] = [
'title' => $this->styleRow((string) $info['title'], $options['format'], $severity),
'value' => $this->styleRow(DrupalUtil::drushRender($info['value'] ?? ''), $options['format'], $severity),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment