Created
July 22, 2025 15:49
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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