Working on the Drupal site, got PHP updated to v8.1. Running Drush commands throws the following error:
Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /var/www/vendor/consolidation/site-alias/src/SiteSpecParser.php on line 144
Steps to reproduce
- Install Drupal on PHP8,1.
- Run a Drush command from the root of the project
- Observe error messages in command line
Expected behavior
No errors
Actual behavior
Aforementioned error is displayed
System Configuration
PHP 8.1